# HG changeset patch # User Georges Racinet <graci...@anybox.fr> # Date 1538059603 -7200 # Thu Sep 27 16:46:43 2018 +0200 # Node ID c5b4c3dd622ec7636eb78211b06cf86bb547444f # Parent 210cd79d35d50e989a7eabbcebb4addde9365f9e # EXP-Topic rustancestors-rfc rust: making runnable without LD_LIBRARY_PATH
Building the Rust code as a static library makes setup.py link it within parsers.so, so that this Rust enhanced proof-of-concept can be tested, benched etc with no modification of tooling, besides the need for a working rustc/cargo (ususally also involving GitHub access). In the long run, a better runtime linking solution should probably be investigated. Notably, if we needed to enhance several extensions with Rust, then this staticlib hack would result in a copy of the Rust standard libraries in each produced extension. diff -r 210cd79d35d5 -r c5b4c3dd622e mercurial/rust/Cargo.toml --- a/mercurial/rust/Cargo.toml Thu Sep 27 16:55:44 2018 +0200 +++ b/mercurial/rust/Cargo.toml Thu Sep 27 16:46:43 2018 +0200 @@ -7,4 +7,4 @@ libc = "*" [lib] -crate-type = ["dylib"] +crate-type = ["staticlib"] _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel