Skip to content
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

Add cdylib automically via --crate-type #111

Closed
jbis9051 opened this issue Jun 7, 2023 · 1 comment
Closed

Add cdylib automically via --crate-type #111

jbis9051 opened this issue Jun 7, 2023 · 1 comment

Comments

@jbis9051
Copy link

jbis9051 commented Jun 7, 2023

Android requires the Cargo.toml to include

[lib]
crate-type = ["staticlib", "cdylib"]

This is problematic for users who also want to build for iOS. See rust-lang/cargo#4881.

Could this crate leverage rust-lang/cargo#10083 to add cdylib to all the rustc calls instead of requiring it to be specified in Cargo.toml?

@jbis9051 jbis9051 changed the title Add cdylib automically Add cdylib automically via --crate-type Jun 7, 2023
@bbqsrc
Copy link
Owner

bbqsrc commented Jun 8, 2023

cargo-ndk is just a thin wrapper around cargo.

Try cargo ndk rustc --crate-type=cdylib.

@bbqsrc bbqsrc closed this as completed Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants