I want to make some changes in libstd and then test them with a toy program. It looks like I can build libstd.so
by going to rust/src/libstd
and doing a (nightly) cargo build
. Once I've done that, how do I get a toy program to build with that libstd instead of the regular version installed on my system?
There are two possibilities in my mind.
Build the compiler from source everytime
Pass an option to rustc that modifies it search path
rustc --help
--cfg SPEC
or -L [KIND=]PATH
) are probably were you would point rustc to your version of the std.I am not very sure how this would work. Ideally someone more knowledgeable could answer this part, because I think it is the preferred solution and way easier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With