{"id":13648690,"url":"https://github.com/denzp/rust-ptx-builder","last_synced_at":"2025-03-16T14:30:41.982Z","repository":{"id":62443070,"uuid":"119606469","full_name":"denzp/rust-ptx-builder","owner":"denzp","description":"Convenient `build.rs` helper for NVPTX crates","archived":false,"fork":false,"pushed_at":"2020-03-03T13:02:32.000Z","size":93,"stargazers_count":57,"open_issues_count":6,"forks_count":9,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-12T07:56:59.017Z","etag":null,"topics":["cuda","nvptx","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denzp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-30T23:13:41.000Z","updated_at":"2025-02-26T21:44:44.000Z","dependencies_parsed_at":"2022-11-01T21:51:12.352Z","dependency_job_id":null,"html_url":"https://github.com/denzp/rust-ptx-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denzp%2Frust-ptx-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denzp%2Frust-ptx-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denzp%2Frust-ptx-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denzp%2Frust-ptx-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denzp","download_url":"https://codeload.github.com/denzp/rust-ptx-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243818172,"owners_count":20352629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cuda","nvptx","rust"],"created_at":"2024-08-02T01:04:27.620Z","updated_at":"2025-03-16T14:30:41.671Z","avatar_url":"https://github.com/denzp.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Rust PTX Builder\n[![Build Status](https://travis-ci.org/denzp/rust-ptx-builder.svg?branch=master)](https://travis-ci.org/denzp/rust-ptx-builder)\n[![Current Version](https://img.shields.io/crates/v/ptx-builder.svg)](https://crates.io/crates/ptx-builder)\n[![Docs](https://docs.rs/ptx-builder/badge.svg)](https://docs.rs/ptx-builder)\n\n## New Release: 0.5 🎉\n### Say goodbye to proxy crate approach\nThis allows us to use single-source CUDA in **binary**-only crates (ones without `lib.rs`).\n\n### Development breaking changes\nThe crate does not provide a default `panic_handler` anymore.\nFrom now on, it either up to a user, or other crates (e.g. coming soon [`ptx-support` crate](https://github.com/denzp/rust-ptx-support)).\n\nNext workaround should work in common cases,\nalthough it doesn't provide any panic details in runtime:\n``` rust\n#![feature(core_intrinsics)]\n\n#[panic_handler]\nunsafe fn breakpoint_panic_handler(_: \u0026::core::panic::PanicInfo) -\u003e ! {\n    core::intrinsics::breakpoint();\n    core::hint::unreachable_unchecked();\n}\n```\n\n### API Breaking Changes - less boilerplate code\n`build.rs` script was never so compact and clear before:\n``` rust\nuse ptx_builder::error::Result;\nuse ptx_builder::prelude::*;\n\nfn main() -\u003e Result\u003c()\u003e {\n    let builder = Builder::new(\".\")?;\n    CargoAdapter::with_env_var(\"KERNEL_PTX_PATH\").build(builder);\n}\n```\n\n### Documentation improvements\nThis release comes with a significant documentation improvement! [Check it out](https://docs.rs/ptx-builder) :)\n\n## Purpose\nThe library should facilitate CUDA development with Rust.\nIt can be used in a [cargo build script](http://doc.crates.io/build-script.html) of a host crate, and take responsibility for building device crates.\n\n## Features\n1. Obviously, device crates building.\n2. Announcing device crates sources to cargo, so it can automatically rebuild after changes.\n3. Reporting about missing tools, for example:\n```\n[PTX] Unable to get target details\n[PTX]\n[PTX] caused by:\n[PTX]   Command not found in PATH: 'rust-ptx-linker'. You can install it with: 'cargo install ptx-linker'.\n```\n\n## Prerequirements\nThe library depends on a fresh Nightly and [ptx-linker](https://crates.io/crates/ptx-linker).\nThe latter can be installed from crates.io:\n```\ncargo install ptx-linker\n```\n\n## Usage\nFirst, you need to specify a build script in host crate's `Cargo.toml` and declare the library as a *build-dependency*:\n``` toml\n[build-dependencies]\nptx-builder = \"0.5\"\n```\n\nThen, typical `build.rs` might look like:\n``` rust\nuse ptx_builder::error::Result;\nuse ptx_builder::prelude::*;\n\nfn main() -\u003e Result\u003c()\u003e {\n    let builder = Builder::new(\".\")?;\n    CargoAdapter::with_env_var(\"KERNEL_PTX_PATH\").build(builder);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenzp%2Frust-ptx-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenzp%2Frust-ptx-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenzp%2Frust-ptx-builder/lists"}