denzp / rust-ptx-builder

Convenient `build.rs` helper for NVPTX crates
MIT License
53 stars 9 forks source link

Impossible to publish a crate using this to crates.io #17

Open dr-bonez opened 4 years ago

dr-bonez commented 4 years ago

Since this package requires having the ptx crate as a path dependency, it is impossible to publish a dependent crate to crates.io because of https://github.com/rust-lang/rfcs/pull/2224.

It would be good if you could specify a crate from crates.io in your build.rs instead of a path.

denzp commented 4 years ago

Hi, thanks for checking out the project!

Could you please explain a little in details your use case and where is that path dependency?

Technically, there is no such requirement coming from this crate. It should be possible to create either a binary or library crate that contains both device and host code. With this approach, there is no need to depend on any other local crates via a path. As a bonus, you can still publish device-only crates, that would not even have a dependency on ptx-builder and would be treated any other crate on crates.io.

dr-bonez commented 4 years ago

The crate being compiled by the builder during build.rs is referred to by path: https://docs.rs/ptx-builder/0.5.3/ptx_builder/builder/struct.Builder.html Since this folder must include a Cargo.toml, it cannot be included in the source bundle that is published to crates.io.

dr-bonez commented 4 years ago

For context, the crate I'm trying to publish is https://github.com/dr-bonez/tor-v3-vanity