[PATCH 5 of 5 RFC] rust: making runnable without LD_LIBRARY_PATH
Georges Racinet
gracinet at anybox.fr
Fri Sep 28 13:31:12 UTC 2018
# HG changeset patch
# User Georges Racinet <gracinet at anybox.fr>
# Date 1538059603 -7200
# Thu Sep 27 16:46:43 2018 +0200
# Node ID e754741646b16fee5534974da44b112a036404c1
# Parent 0fcc7c5de05aa47449cc428e826ca2e76c7517ec
# 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 0fcc7c5de05a -r e754741646b1 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"]
More information about the Mercurial-devel
mailing list