-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom source standard library #7
Comments
In my mind it would be better to just to enable the user to supply prebuilt-binary for every crate in the dependency graph using some Cargo.toml syntax. This will solve this use case automatically. But it's worth a separate topic alone, and absolutely doesn't beyond to the MVP. |
Is this feature still pretty far out on the road map? I was looking at transitioning away from |
So we want to fetch the source in a distro context, so rustup isn't appropriate. It's fine for us if it's quite unstable, but I would be nice if there was an escape hatch in Cargo. CC @kloenk |
Miri needs to do its own sysroot build, which it currently does via xargo -- but using However, this issue is one (not the only) blocker on that road: Miri currently supports the MIRI_LIB_SRC env var to configure where to get the sources for the sysroot build from, and that feature is useful often enough that I'd rather not lose it. |
https://github.com/kolloch/crate2nix/ is project I've given cross support and enough stuff to replicate My point in bringing this up is that it should be really easy to get this feature for free once the implementation isn't extremely rigid mixing mechanism and policy. |
cc also rust-lang/rust#101691 which is about making it possible to just compile the standard library in rustc and then using |
In my case I am using msp430 and the linker provides builtins for the hardware multiplier. See https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/msp430/lib2hw_mul.S for relevant code. I want to submit a PR to |
If the project with which you want to test it only depends on libcore and not liballoc, I think you can use |
I tried this, but it still complains about duplicate compiler_builtins rlib. |
I believe I found a suitable, though unstable escape hatch Set the |
`__CARGO_TESTS_ONLY_SRC_ROOT´ unfortunatly does not work. It allows for building, but not for linking. |
hmm, that might be correct for dynamic linking, I haven't verified. but it certainly works with |
So, In my case, I only made changes to core, and I passed This is likely going to trip up a lot more users. |
Here's a workaround for experimenting with changes to std
|
This issue is for tracking the possibility of using custom source for the standard library.
It should be acknowledged that this is unlikely to be on a path to be stabilized for the foreseeable future.
The text was updated successfully, but these errors were encountered: