-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
dylib
support
#372
Comments
Could you elaborate a bit more on the intended usage of this feature? On the cargo side of things - If a |
I would like to save on compilation time, as such it corrosion should probably treat the This is what happens when you build a $ tree dylib
dylib
├── Cargo.lock
├── Cargo.toml
├── src
│ └── lib.rs
└── target
├── CACHEDIR.TAG
└── release
├── build
├── deps
│ ├── dylib.d
│ └── libdylib.so
├── examples
├── incremental
├── libdylib.d
└── libdylib.so I set up a test project corrosion-dylib for testing the different options for rust-to-rust catkin compilation with corrosion. I surely got a lot wrong there but I basically tried to build it how I would assume things to hypothetically work. |
|
Have you tried
In my opinion this would be a cargo issue.
Thanks - I currently don't have much bandwidth - but I'll have a look eventually.
I would be very hesitant - I don't want to get strange bug reports from users using dylibs with binaries of a different Rust version.
Probably not in the short term. In the longer term hopefully an |
Of course there should be a big distinction being made with Thank you for this great project! |
If you are using Rust >= 1.64, you could put |
I would like dylib support for the usecase of getting corrosion to
Is there interest in this? I'm happy to contribute it. Also, potentially could pass --crate-type for targets that are both |
Is the "after users of it are built (staticlib, cdylib or bin)“ bit important? I imagine that would be quite a bit more work than just copying dylibs to the LIBRARY_OUTPUT_DIRECTORY.
I would love to see some contributions to improve the packaging story. Ideally this would include some short documentation to help out other users and some tests to ensure installing works as intended.
Okay, so it seems you do need the dependency information. I see the use case, but maybe you could write a bit more how you would implement this, which edge-cases there are and what is in/out of scope before you start working on a PR.
Until the rlib format is stabilized, corrosion won't use rlibs, so there is no point in ever doing |
It would be nice to have
dylib
support for when there is a shared dylib dependency between multiple rust targets, right now this error message is displayed as it ignoresdylib
s.The idea was to compile a shared rust dependency as a dynamic library because compilation artifacts aren't shared when using corrosion in different catkin packages. This however doesn't work as corrosion will refuse to compile the
dylib
. Using acdylib
is not an acceptable tradeoff as it would require making the library c-ffi-safe which would not be needed with either shared compilation artifacts or adylib
which was compiled with the same compiler as thebin
using it.The text was updated successfully, but these errors were encountered: