Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

[env]
# Makes `--target wasm32-mvp` resolve to linera-service/wasm32-mvp.json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than using wasm32-mvp, let's add two targets that we can distinguish:

  • wasm32-linera-chain for on-chain applications (contract and service)
  • wasm32-unknown-js-web for the Web browser (@linera/client)

Then we can throw away the web features that are currently polluting our codebase.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I'll suggest one target for both contract and service, even though it might be cleaner to separate them, because it eases compilation of applications for the end-user)

# anywhere in the repo.
RUST_TARGET_PATH = { value = "linera-service", relative = true }

[build]
# We allow redundant explicit links because `cargo rdme` doesn't know how to resolve implicit intra-crate links.
rustdocflags = ["-Arustdoc::redundant_explicit_links"]
19 changes: 7 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,7 @@ revm-state = { version = "4.0.1", default-features = false, features = [
"serde",
] }
rocksdb = "0.21.0"
# 0.8.2 doesn't build with Rust 1.87. Remove `=` once
# https://github.com/linera-io/linera-protocol/issues/4742 is resolved.
ruzstd = "=0.8.1"
ruzstd = "0.8"
scylla = "~1.1.0"
semver = "1.0.22"
serde = { version = "1.0.197", features = ["derive"] }
Expand Down Expand Up @@ -283,9 +281,9 @@ url = "2.4"
wasm-bindgen = "0.2.100"
wasm-bindgen-futures = "=0.4.50"
wasm-bindgen-test = "0.3.42"
wasm-instrument = { package = "linera-wasm-instrument", version = "0.4.0-linera.1" }
wasmer = { package = "linera-wasmer", version = "4.4.0-linera.7", default-features = false }
wasmer-compiler-singlepass = { package = "linera-wasmer-compiler-singlepass", version = "4.4.0-linera.7", default-features = false, features = [
wasm-instrument = { package = "linera-wasm-instrument", git = "https://github.com/linera-io/wasm-instrument", branch = "bulk-memory-support" }
wasmer = { package = "linera-wasmer", git = "https://github.com/linera-io/wasmer", branch = "fix-rust-probestack", default-features = false }
wasmer-compiler-singlepass = { package = "linera-wasmer-compiler-singlepass", git = "https://github.com/linera-io/wasmer", branch = "fix-rust-probestack", default-features = false, features = [
"std",
"unwind",
"avx",
Expand Down
7 changes: 7 additions & 0 deletions examples/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build]
# Required for rustc to accept the custom wasm32-mvp target spec.
rustflags = ["-Zunstable-options"]

[unstable]
build-std = ["std", "panic_abort"]
json-target-spec = true
Loading
Loading