Skip to content

When cargo building pyo3 projects auto-add in the extension-module feature please #325

@gilescope

Description

@gilescope

At the moment maturin warns if a pyo3 project is built without the extension-module feature.

We can already do:

maturin develop --cargo-extra-args="--features pyo3/extension-module"

Why not add that flag in automatically if it's clear that it's not there? Having pyo3/extension-module turned on as a default feature seems like a footgun as people will just run cargo test and expect stuff to work on cli, IDEs etc. but will run into linking problems if they don't use --no-default-features. It's both unergonomic and confusing as the linker errors give no clue that you should have disabled a feature so it's tough on new users.

It would be great if maturin just by default did the right thing :-) -
(it could still squark that it wasn't found so adding it in explicitly.)

thoughs?

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