You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, cbindgen and cxxbridge-cmd need to be preinstalled with the correct version for offline builds to work (when using cbindgen or cxxbridge corrosion functions).
If we could support installing these commands from vendored sources, that would make offline builds easier with less setup required.
The text was updated successfully, but these errors were encountered:
Hey and thanks for trying to help. Just wanted to let you know that through the Nix ecosystem, I was able to simply setting the environment variable CARGO_HOME to a .cargo directory that has a config file with:
And Nix's ecosystem puts in the @vendor@ directory all the required dependencies.
I don't think you should bother too much to track any such potential issues. I have very basic knowledge of the Rust ecosystem because I'm only a distribution packager, so it took me a long time to figure out that using CARGO_HOME could fix this so elegantly. Perhaps The only thing worth learning and noting in the docs is the usage of the CARGO_HOME environment variable - something that took me a long time to figure out.
Interesting - It sounds like cargo install xxx might be installing from the vendored sources then, which "it just works" and this issue can be closed.
it took me a long time to figure out that using CARGO_HOME could fix this so elegantly
I guess it wouldn't harm to add an offline builds section to the common issues page of our documentation.
Just a note: The .cargo/config.toml can also be part of the repo (See the lookup rules), so perhaps this could also be achieved by a distribution-specific patch which just adds this file to the root of the repo during the build process. I would be a bit worried that changing CARGO_HOME might have some other potential side-effects. I guess when using only vendored sources it might not be an issue, but I'm also not a cargo expert.
Currently, cbindgen and
cxxbridge-cmd
need to be preinstalled with the correct version for offline builds to work (when using cbindgen or cxxbridge corrosion functions).If we could support installing these commands from vendored sources, that would make offline builds easier with less setup required.
The text was updated successfully, but these errors were encountered: