-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support dylib with prefer-dynamic properly #3406
Comments
I disagree this is a feature request. This is bug. If you need more info, this is how I triggered it. I am trying to wrap pub use rug::*; The test sums 2 numbers: #[test]
fn sum() {
let a = rug_dynamic::Integer::from_str_radix("1000000000000000000000000000000000", 10).unwrap();
let b = rug_dynamic::Integer::from(42);
assert_eq!(
a + b,
rug_dynamic::Integer::from_str_radix("1000000000000000000000000000000042", 10).unwrap()
);
} Repo is here: https://github.com/lvella/rug-dynamic Simply run
|
Disclaimer: IANAL
According to section 4 Combined Works:
Option 1 doesn't work with the rust dylib crate type as when you change the dynamic library it will almost certainly be ABI incompatible even when it is still interface-compatible. (It is guaranteed to be ABI incompatible when a different |
As I understand, Section 3 covers generics and inline functions, which can be incorporated into the application object code and still be differently licensed. IANAL either, but despite using terminology of C++, I believe it also applies to Rust, as the concepts are the same. About the unstable ABI, is there no way to compile a modified library using the same rust version so that the compatibility is guaranteed? (provided, of course, that what was changed was not inlined/monomorphized into the user's code) |
I see.
You also have to preserve the |
The behavior that doesn't apply prefer-dynamic for anything linked to dylib or the dylib itself seems a flaw. This triggers errors like rust-lang/rust#19680.
Configuration: (project metadata omitted)
(
[bin]
is implicitly created)#1496 is also a result of this flaw. There's no reason to disable it intendedly.
The text was updated successfully, but these errors were encountered: