-
Notifications
You must be signed in to change notification settings - Fork 98
Configure static linking for linux-gnu and windows #371
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
Conversation
Unfortunately this problem is not that easy to solve for Linux, because our code contains proc-macros and those are not supported when building statically as far as I understand from these threads: https://stackoverflow.com/questions/57965805/alpine-dockerfile-cannot-produce-proc-macro-does-not-support-these-crate-typ Not sure if this can be solved - any ideas? |
If I understand it correct this issue should have been solved, see: rust-lang/rust#45601 |
ae11110
to
109abad
Compare
This enforces static linking. Resolves #347.
There is no reason to limit this, all the docker tests are outside of the lib.
unknown-linux-gnu is the default for ubuntu, we don't need to specify this.
This should fix build errors for the arm target.
fe672b1
to
b9d2f1a
Compare
I am closing this as a wontfix. Linking the binaries statically seems non-trivial. |
380: Simplify CI workflow r=thomaseizinger a=thomaseizinger Some patches extracted out of #371. Co-authored-by: Thomas Eizinger <[email protected]>
380: Simplify CI workflow r=thomaseizinger a=thomaseizinger Some patches extracted out of comit-network/xmr-btc-swap#371. Co-authored-by: Thomas Eizinger <[email protected]>
I think configuring this in the
.cargo/config.toml
is the way to go.I read through this:
https://doc.rust-lang.org/reference/linkage.html#static-and-dynamic-c-runtimes
https://stackoverflow.com/questions/31770604/how-to-generate-statically-linked-executables
Since it mentions that this is a common problems with Windows I configured static linking for both the
linux-gnu
andwindows
target.I did not see any reason to release a version that is dynamically linked (i.e. release both, dynamic and static linked), but if there is a good reason please let me know!
Fixes #347