Skip to content

Specify compile target in one crate #201

@21pages

Description

@21pages

There is several compile target in one crate, such as

[package]
name = "hello"
edition = "2021"
build= "build.rs"
default-run = "test"

[lib]
name = "libhello"
crate-type = ["cdylib", "staticlib", "rlib"]

[[bin]]
name = "naming"
path = "src/naming.rs"
corrosion_import_crate(MANIFEST_PATH ../../Cargo.toml)
target_link_libraries(${BINARY_NAME} PRIVATE libhello)

I just need to compile libhello, but now it compiles libhello, hello, naming.

Is there a way to compile libhello only? May the option can added for enhancement.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions