Closed cpick closed 6 months ago
so maybe I can clone that to create a
cargo-zigbuild doc
subcommand? (If so, I think most of the work would be addingcargo doc
to the cargo_options crate?)
yes, pull requests are welcome.
Pull request opened in #235.
I'm currently running
cargo doc
on macOS using the following:This mostly works (I sometimes have to precede it with a
cargo-zigbuild check --target x86_64-unknown-linux-musl
so likely thecargo doc
command also needs some other environment variables {linker?} set to work with an empty cache/target directory), but I'm wondering if there's a cleaner way?I originally got the idea for the script from https://github.com/rust-cross/cargo-zigbuild/issues/105, but I don't think the ultimate solution from that issue would work in this case. I also tried setting
cargo-zigbuild
as various permutations for $RUSTC_WRAPPER and/or $RUSTC but didn't find success.I took a look at how the
cargo-zigbuild check
command appeared to be implemented and that doesn't look too painful, so maybe I can clone that to create acargo-zigbuild doc
subcommand? (If so, I think most of the work would be addingcargo doc
to the cargo_options crate?)The whole reason I'm trying to pass
--target
intocargo doc
is that my project is using a bunch of libc and nix crate functions and definitions that are very target-specific.