forked from kiss-community/repo
Network access during Rust builds #21
Labels
No Label
core
extra
help wanted
new package
question
update
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: bonsai/repo#21
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
e3f88301
introduced the bindgen package, which unlike cbindgen, requires the network to build and fetch crates.Ideally, it shouldn't need the network.
I don't really ever deal with Rust and as such have no idea how vendoring packages works.
The cbindgen package has pointers that may or may not be useful.
Simply getting a list of URLs to throw into a sources file will be enough, and it might be possible to just parse Cargo.lock to do this.
This is really going to be a pain in the ass, but I agree that network access should not be required.
I think perhaps the most elegant solution to this would be to package the crates it depends on (and package the ones those depend on) and provide them as
.rlib
s in/lib
.This also happens to be the solution that takes the most work.
After posting my last comment I looked at cbindgen and I hadn’t realized the rust package installs
cargo(1)
.If we want to manually compile everything with
rustc(1)
and avoid the dependency on cargo package management, my previous point still stands, but it’s really not what Rust is designed to do.I just read through the build file for cbindgen. Makes sense, feels hacky, but if it works, it works. I just feel bad about depending on cargo. That’s probably the approach we should take to avoid the massive undertaking of packaging everything bindgen depends on, though.
This may be relevant: https://thomask.sdf.org/blog/2023/11/14/rust-without-crates-io.html