Skip to content

Cannot test dylib #2890

Closed
Closed
@MarkSwanson

Description

@MarkSwanson

Cargo will create DSOs and compile src/bin/*rs files just fine (which also run fine).

However, Cargo is unable to compile/run test programs for crates that have [lib] crate-type = ["dylib"].

I can not add rlib - if I do then any dependent crates will only link statically - and they MUST link this crate dynamically.

I tried to craft my own rustc, but it seems the thing blocking me is '--test'.

Is there any way at all to write tests against crates with crate-type = ["dylib"] ?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions