Closed Mange closed 7 years ago
Ah thanks for the bug report! Seems like the issue is that as a dylib
Rust loads the libjson_str
object and assumes it depends on libstd
, so it tries to find it, but it's not in the deps
, so fails.
I've opened a PR that builds both a static linked rlib
for runtime and a dynamic linked dylib
for the compiler plugin on the nightly
channel. This seems to work on my machine for stable
and nightly
.
Do you mind taking that branch for a spin and see if that fixes your issue?
It seems to work! I tried with the 2c477618b2b77343bb5297738464afe0ffedc611 revision and I can now run the bin. :-)
> cargo build
Updating git repository `https://github.com/KodrAus/json_str.git`
Compiling json_str v0.4.0 (https://github.com/KodrAus/json_str.git?rev=2c477618b2b77343bb5297738464afe0ffedc611#2c477618)
Compiling json-str-test v0.1.0 (file:///Users/mange/tmp/json-str-test)
Finished debug [unoptimized + debuginfo] target(s) in 1.26 secs
> ./target/debug/json-str-test
Hello, world!
###
> rustup run nightly rustc --version
rustc 1.16.0-nightly (47c8d9fdc 2017-01-08)
> rustup run nightly cargo build
Compiling json_str v0.4.0 (https://github.com/KodrAus/json_str.git?rev=2c477618b2b77343bb5297738464afe0ffedc611#2c477618)
Compiling json-str-test v0.1.0 (file:///Users/mange/tmp/json-str-test)
Finished debug [unoptimized + debuginfo] target(s) in 1.37 secs
> ./target/debug/json-str-test
Hello, world!
That was fast! Great job!
Glad to hear it worked! I've released this fix as 0.4.0
on crates.io.
Removing the
extern crate json_str
, this problem does not appear.Is there anything else I can help you with? Is there something I need to do? It feels like I should be able to run the built executable without having a Rust ecosystem installed. This happens in release mode too.