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

[lib] is not copied over in Cargo.toml #269

Open
rbozan opened this issue Nov 23, 2022 · 2 comments
Open

[lib] is not copied over in Cargo.toml #269

rbozan opened this issue Nov 23, 2022 · 2 comments

Comments

@rbozan
Copy link

rbozan commented Nov 23, 2022

Might be related to #263

Having a Cargo.toml like the following:

[package]
name = "scenario"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["dylib"] # <-- I'm specifying that I want a dynamic library here (.so)

[dependencies]
scenario_builder = { git = "ssh://[email protected]/l4010/scenario_builder.git", features = ["build-scenario"] }
tokio = { version = "1.17.0", features = [ "macros" ] }
anyhow = "1.0.66"

sqlx = { version = "0.5", features = [ "runtime-tokio-rustls", "mysql" ] }

However looking in dummy-src the Cargo.toml now suddenly is:

[dependencies]
anyhow = "1.0.66"
"scenario_builder" = { features = [ "build-scenario" ], git = "ssh://[email protected]/l4010/scenario_builder.git" }
sqlx = { features = [ "runtime-tokio-rustls", "mysql" ], version = "0.5" }
tokio = { features = [ "macros" ], version = "1.17.0" }
[package]
edition = "2021"
name = "scenario"
version = "0.1.0"

Removing the whole [lib] block and crate-type. This results in NOT building a ".so" file but a ".rlib" file.

@rbozan rbozan changed the title [lib] is not copied over [lib] is not copied over in Cargo.toml Nov 23, 2022
@06kellyjac
Copy link

copyLibs = true;?

| `copyLibs` | When true, the resulting binaries are copied to `$out/lib`. <br/> Note: this relies on cargo's `--message-format` argument, set in the default `cargoBuildOptions`. Default: `false` |

@rbozan
Copy link
Author

rbozan commented Dec 2, 2022

copyLibs = true;?

| `copyLibs` | When true, the resulting binaries are copied to `$out/lib`. <br/> Note: this relies on cargo's `--message-format` argument, set in the default `cargoBuildOptions`. Default: `false` |

no that does not help. like I said, it does build a .rlib file as it seems it removes the whole [lib] block I specified .
copyLibs would indeed copy .rlib. but I did not want a .rlib, I wanted a .so file.

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