tauri-apps / cargo-mobile2

Rust on mobile made easy!
Apache License 2.0
1.6k stars 76 forks source link

cargo mobile init expects `.cargo/config.toml` to contain `rustflags` fields #393

Closed oli-obk closed 17 hours ago

oli-obk commented 1 week ago

Describe the bug

error: Failed to load .cargo file
    Failed to deserialize cargo config at \\?\C:\Users\oli\Documents\Rust\solar_sailors\.cargo\config.toml: TOML parse error at line 1, column 1
      |
    1 | [target.wasm32-unknown-unknown]
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    missing field `rustflags`

Steps To Reproduce create a .cargo/config.toml file with the following content:

[target.wasm32-unknown-unknown]
runner = "python wasm.py"

Expected behavior

no error, missing fields are fine, they are treated as empty fields

Screenshots

n/a

Platform and Versions (please complete the following information): [✔] cargo-mobile v0.17.2 • Contains commits up to "" • Installed at "C:\Users\oli\.cargo\.cargo-mobile2" • Windows 10 v10.0 • rustc v1.81.0 (eeb90cda1 2024-9-4)