Skip to content

Commit

Permalink
fix: make rustflags optional for deserialization (#395)
Browse files Browse the repository at this point in the history
* fix: make `rustflags` option for deserialization

closes #393

* remove breaking change

---------

Co-authored-by: Lucas Nogueira <[email protected]>
  • Loading branch information
amrbashir and lucasfernog authored Oct 3, 2024
1 parent e66010f commit 1ec0ca5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/dotcargo-optional-fields.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cargo-mobile2": "patch"
---

Fix deserializing targets from `.cargo/config.toml` if the target's `rustflags` field is not specified
1 change: 1 addition & 0 deletions src/dot_cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ impl DotCargoBuild {
#[derive(Debug, Default, Deserialize, Serialize)]
pub struct DotCargoTarget {
pub linker: Option<String>,
#[serde(default)]
pub rustflags: Vec<String>,
}

Expand Down

0 comments on commit 1ec0ca5

Please sign in to comment.