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

Rust Analyzer <-> Maturin interaction #2479

Open
2 tasks done
ion-elgreco opened this issue Feb 13, 2025 · 0 comments
Open
2 tasks done

Rust Analyzer <-> Maturin interaction #2479

ion-elgreco opened this issue Feb 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ion-elgreco
Copy link

ion-elgreco commented Feb 13, 2025

Bug Description

In delta-rs we have a .cargo/config.toml in the root and .carg/config.toml in our python subcrate.

Both of the following rustflags:

[target.aarch64-apple-darwin]
rustflags = [
  "-C", "link-arg=-undefined",
  "-C", "link-arg=dynamic_lookup",
]

Running plain maturin develop will invalidate the incremental compilation.

Only if I manually provide the RUSTFLAGS it works:

RUSTFLAGS="-C link-arg=-undefined -C link-arg=dynamic_lookup" maturin develop

Shouldn't maturin use the .cargo/config.toml during maturin develop

Your maturin version (maturin --version)

1.8.2

Your Python version (python -V)

3.11

Your pip version (pip -V)

UV is used

What bindings you're using

pyo3

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

  1. Create crate with above config
  2. Use VSCode with Rust Analyzer (RA)
  3. Let RA run Cargo check
  4. Now run maturin develop
  5. Change .rs file and save which triggers cargo check
  6. Run maturin develop again (notice it starts from beginning)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant