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

build_self_cdylib depends on order of crate-type #4

Open
AnHeuermann opened this issue Apr 8, 2024 · 0 comments · May be fixed by #5
Open

build_self_cdylib depends on order of crate-type #4

AnHeuermann opened this issue Apr 8, 2024 · 0 comments · May be fixed by #5

Comments

@AnHeuermann
Copy link

I have a package that builds multiple crate types:

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

One of my tests is calling build_current_project to build the cdylib crate, but the static C library is build instead.

fn omc_test() {
    let dylib_path = test_cdylib::build_current_project();
    println!("library: {:?}", dylib_path);
}

I changed the order of crate-type in Cargo.toml to fix my test. Is there a way to only build the cdylib crate without changing the Cargo.toml?

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

Successfully merging a pull request may close this issue.

1 participant