rust-ptx-builder icon indicating copy to clipboard operation
rust-ptx-builder copied to clipboard

Impossible to publish a crate using this to crates.io

Open dr-bonez opened this issue 4 years ago • 3 comments

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.

dr-bonez avatar Jul 29 '20 21:07 dr-bonez

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.

denzp avatar Aug 01 '20 08:08 denzp

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 avatar Aug 05 '20 06:08 dr-bonez

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

dr-bonez avatar Aug 05 '20 06:08 dr-bonez