-
Notifications
You must be signed in to change notification settings - Fork 88
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
rlib crate type for yffi #444
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :) I'm happy to include it.
@Horusiath Thanks for the fast reply! I've just checked the logs for the failing tests. Apparently, the change that needs to be done is a little more significant than the minimal oneliner I hoped for.
I'd suggest implementing option 1 or 2 as the implications of that are minimal. I'd choose option 1. Would this work for you? |
@Horusiath I did a little more digging into it and found out that [lib]
crate-type = ["cdylib", "rlib"] I look forward to your opinion on what I should do with this PR. If you find option 3 OK (considering dependent libraries needing an update), I'd say it's a better long-term choice, IMO. Anyhow, please let me know what you think, and I'll adjust the PR according to your preference. |
@dileping Sorry that it took me so long to respond. I think that option 2 would be the best one out of three: AFAIK everyone who use static/dynamic libs for C interop, do it through yffi. Another option would be to merge yffi into yrs as a dedicated module that can be turned on/off via eg. feature flag. |
@Horusiath, thanks for getting back to me on this. It makes sense. I'll try to arrange some time next week to move this forward. |
@Horusiath, I've just pushed the update here. Please check if that's okay with you. Also, if the PR is accepted, it would be great if you could publish |
Hi guys!
This PR allows
yffi
to be built as a Rust library.Linking several Rust-produced static libs to a single executable is problematic, so it has to be done via an umbrella crate that reexports the APIs and is linked as a big single static lib. Enabling
rlib
foryffi
allows to do just that.This PR should not affect any other functionality.