docs.rs icon indicating copy to clipboard operation
docs.rs copied to clipboard

Can `cargo expand` be made available in the standard build environment?

Open freshtonic opened this issue 10 months ago • 1 comments

Crate name

sqltk

Build failure link

https://docs.rs/crate/sqltk/0.4.0/builds/1636051

Additional details

sqltk's build.rs requires cargo expand to be available.

My testing indicates that it is not installed on the build environment, and lack of network access in build.rs prevents me from installing it.

Is it actually installed, and perhaps I'm invoking it incorrectly? If not, can I request that it be added to the standard build environment?

Kind regards,

James.

freshtonic avatar Jan 17 '25 12:01 freshtonic

For now I don't see us adding a third party cargo extension to the compiler toolchain we use to build docs. Network access won't be allowed for security reasons.

From what I see, you could either drop down to directly using cargo rustc --profile=check -- -Zunpretty=expanded,

or do similar things as other more complex libraries, like using conditional compilation to make your docs build without the need of cargo expand. Often the public documented interface doesn't need the build script output.

syphar avatar Jan 17 '25 13:01 syphar