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

[Consult] How to configure different crate-type on platforms? #94610

Closed
niuhuan opened this issue Mar 4, 2022 · 1 comment
Closed

[Consult] How to configure different crate-type on platforms? #94610

niuhuan opened this issue Mar 4, 2022 · 1 comment

Comments

@niuhuan
Copy link

niuhuan commented Mar 4, 2022

I want use staticlib on macos, and cdylib on android.

dependencies is ok, but crate-type not work

[target.'cfg(target_os="macos")'.dependencies]
tokio = "0"
[target.'cfg(target_os="android")'.dependencies]
jni = "0"
[target.'cfg(target_os="macos")'.lib]
crate-type = ["staticlib"]

[target.'cfg(target_os="android")'.lib]
crate-type = ["cdylib"]

13333

@csmoe
Copy link
Member

csmoe commented Mar 5, 2022

it's a cargo issue, rust-lang/cargo#10083 , you can specify the type with --crate-type from cli. toml configuration is not supported yet.

@csmoe csmoe closed this as completed Mar 5, 2022
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