Skip to content

Commit

Permalink
[examples] Update rustc flags for example projects
Browse files Browse the repository at this point in the history
They now all have checked integer arithmetic by default.
  • Loading branch information
Robbepop committed Feb 27, 2019
1 parent 7dda011 commit 02298b8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
3 changes: 2 additions & 1 deletion examples/core/erc20/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[target.wasm32-unknown-unknown]
rustflags = [
"-C", "link-args=-z stack-size=65536 --import-memory"
"-C", "overflow-checks=on",
"-C", "link-args=-z stack-size=65536 --import-memory"
]
3 changes: 2 additions & 1 deletion examples/core/incrementer/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[target.wasm32-unknown-unknown]
rustflags = [
"-C", "link-args=-z stack-size=65536 --import-memory"
"-C", "overflow-checks=on",
"-C", "link-args=-z stack-size=65536 --import-memory"
]
3 changes: 2 additions & 1 deletion examples/core/noop/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[target.wasm32-unknown-unknown]
rustflags = [
"-C", "link-args=-z stack-size=65536 --import-memory"
"-C", "overflow-checks=on",
"-C", "link-args=-z stack-size=65536 --import-memory"
]
5 changes: 2 additions & 3 deletions examples/core/subpeep/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[target.wasm32-unknown-unknown]
rustflags = [
"-C", "link-args=-z stack-size=65536 --import-memory",
"-C", "overflow-checks=on",
"-C", "link-args=-z stack-size=65536 --import-memory"
]

# --export-table could also change its default again in the future
3 changes: 2 additions & 1 deletion examples/model/erc20/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[target.wasm32-unknown-unknown]
rustflags = [
"-C", "link-args=-z stack-size=65536 --import-memory"
"-C", "overflow-checks=on",
"-C", "link-args=-z stack-size=65536 --import-memory"
]
5 changes: 2 additions & 3 deletions examples/model/incrementer/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[target.wasm32-unknown-unknown]
rustflags = [
"-C",
"link-args=-z stack-size=65536 --import-memory",
"-Z force-overflow-checks",
"-C", "overflow-checks=on",
"-C", "link-args=-z stack-size=65536 --import-memory",
]
4 changes: 2 additions & 2 deletions examples/model/incrementer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "fleet-inc"
name = "incrementer"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
Expand All @@ -10,7 +10,7 @@ pdsl_model = { path = "../../../model" }
parity-codec = { version = "3.0", default-features = false, features = ["derive"] }

[lib]
name = "fleet_inc"
name = "incrementer"
crate-type = ["cdylib"]

[features]
Expand Down

0 comments on commit 02298b8

Please sign in to comment.