Skip to content

Commit

Permalink
Declare MSRV in Cargo.toml instead of rust-toolchain file
Browse files Browse the repository at this point in the history
Having a `rust-toolchain` file forces rustup to download the defined
toolchain version, effectively preventing developers from using the
version they already have installed in case it doesn't match.

Using the `rust-version` field in `Cargo.toml` is the proper way for
declaring a minimum supported rust version in my opinion, and it works
with rust toolchains not installed by rustup.
  • Loading branch information
silwol committed May 17, 2022
1 parent 5e52b64 commit d1b44c6
Showing 36 changed files with 39 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C

### Changed
- #2864 wasmer-cli: remove wasi-experimental-io-devices from default builds
- [#2891](https://github.com/wasmerio/wasmer/pull/2891) Declare MSRV in Cargo.toml instead of rust-toolchain file.

### Fixed
- [#2829](https://github.com/wasmerio/wasmer/pull/2829) Improve error message oriented from JS object.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ license = "MIT"
edition = "2018"
publish = false
autoexamples = false
rust-version = "1.59"

[dependencies]
wasmer = { version = "=2.2.1", path = "lib/api", default-features = false }
3 changes: 2 additions & 1 deletion fuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ version = "0.0.0"
authors = ["Automatically generated"]
publish = false
edition = "2018"
rust-version = "1.59"

[package.metadata]
cargo-fuzz = true
@@ -61,4 +62,4 @@ required-features = ["dylib", "cranelift"]
[[bin]]
name = "deterministic"
path = "fuzz_targets/deterministic.rs"
required-features = ["universal", "dylib", "cranelift", "llvm", "singlepass"]
required-features = ["universal", "dylib", "cranelift", "llvm", "singlepass"]
1 change: 1 addition & 0 deletions lib/api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

#####
# This crate comes in 2 major flavors:
1 change: 1 addition & 0 deletions lib/artifact/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT OR Apache-2.0 WITH LLVM-exception "
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-types = { path = "../types", version = "=2.2.1" }
3 changes: 2 additions & 1 deletion lib/c-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ documentation = "https://wasmerio.github.io/wasmer/c-api/"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[lib]
# The library name is `wasmer` so that we generate dylib like
@@ -101,4 +102,4 @@ native = ["dylib"]
#emscripten = ["wasmer-emscripten"]

[build-dependencies]
cbindgen = "0.19"
cbindgen = "0.19"
1 change: 1 addition & 0 deletions lib/cache/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer = { path = "../api", version = "=2.2.1", default-features = false}
1 change: 1 addition & 0 deletions lib/cli-compiler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ readme = "README.md"
edition = "2018"
default-run = "wasmer-compiler"
build = "build.rs"
rust-version = "1.59"

[[bin]]
name = "wasmer-compiler"
3 changes: 2 additions & 1 deletion lib/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ readme = "README.md"
edition = "2018"
default-run = "wasmer"
build = "build.rs"
rust-version = "1.59"

[[bin]]
name = "wasmer"
@@ -119,4 +120,4 @@ headless-minimal = ["headless", "disable-all-logging", "wasi", "dylib", "univers

# Deprecated features.
jit = ["universal"]
native = ["dylib"]
native = ["dylib"]
1 change: 1 addition & 0 deletions lib/compiler-cranelift/Cargo.toml
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ documentation = "https://docs.rs/wasmer-compiler-cranelift/"
license = "MIT OR Apache-2.0 WITH LLVM-exception"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-compiler = { path = "../compiler", version = "=2.2.1", features = ["translator"], default-features = false }
1 change: 1 addition & 0 deletions lib/compiler-llvm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ documentation = "https://docs.rs/wasmer-compiler-llvm/"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-compiler = { path = "../compiler", version = "=2.2.1", features = [
1 change: 1 addition & 0 deletions lib/compiler-singlepass/Cargo.toml
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ documentation = "https://docs.rs/wasmer-compiler-singlepass/"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-compiler = { path = "../compiler", version = "=2.2.1", features = ["translator"], default-features = false }
1 change: 1 addition & 0 deletions lib/compiler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT OR Apache-2.0 WITH LLVM-exception"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-types = { path = "../types", version = "=2.2.1", default-features = false }
1 change: 1 addition & 0 deletions lib/derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
repository = "https://github.com/wasmerio/wasmer"
license = "MIT"
edition = "2018"
rust-version = "1.59"

[lib]
proc-macro = true
1 change: 1 addition & 0 deletions lib/emscripten/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
byteorder = "1.3"
1 change: 1 addition & 0 deletions lib/engine-dylib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-artifact = { path = "../artifact", version = "=2.2.1" }
1 change: 1 addition & 0 deletions lib/engine-staticlib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-artifact = { path = "../artifact", version = "=2.2.1" }
1 change: 1 addition & 0 deletions lib/engine-universal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT OR Apache-2.0 WITH LLVM-exception "
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-engine-universal-artifact = { path = "../universal-artifact", version = "=2.2.1", features = [
1 change: 1 addition & 0 deletions lib/engine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT OR Apache-2.0 WITH LLVM-exception "
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-types = { path = "../types", version = "=2.2.1" }
1 change: 1 addition & 0 deletions lib/middlewares/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ keywords = ["webassembly", "wasm"]
repository = "https://github.com/wasmerio/wasmer"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer = { path = "../api", version = "=2.2.1", default-features = false, features = ["compiler"] }
1 change: 1 addition & 0 deletions lib/object/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-types = { path = "../types", version = "=2.2.1" }
1 change: 1 addition & 0 deletions lib/types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT OR Apache-2.0 WITH LLVM-exception"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
serde = { version = "1.0", features = ["derive", "rc"], optional = true, default-features = false }
1 change: 1 addition & 0 deletions lib/universal-artifact/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT OR Apache-2.0 WITH LLVM-exception "
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-artifact = { path = "../artifact", version = "=2.2.1" }
3 changes: 2 additions & 1 deletion lib/vfs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ description = "Wasmer Virtual FileSystem"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
license = "MIT"
edition = "2018"
rust-version = "1.59"

[dependencies]
libc = { version = "^0.2", default-features = false, optional = true }
@@ -22,4 +23,4 @@ enable-serde = [
"serde",
"typetag"
]
no-time = []
no-time = []
1 change: 1 addition & 0 deletions lib/vm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT OR Apache-2.0 WITH LLVM-exception"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-types = { path = "../types", version = "=2.2.1" }
1 change: 1 addition & 0 deletions lib/wasi-experimental-io-devices/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[badges]
maintenance = { status = "experimental" }
1 change: 1 addition & 0 deletions lib/wasi-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
wasmer-types = { path = "../types", version = "=2.2.1" }
1 change: 1 addition & 0 deletions lib/wasi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ repository = "https://github.com/wasmerio/wasmer"
license = "MIT"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[lib]
crate-type = ["cdylib", "rlib"]
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

1 change: 1 addition & 0 deletions tests/integration/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ description = "CLI integration tests"
repository = "https://github.com/wasmerio/wasmer"
edition = "2018"
publish = false
rust-version = "1.59"

[dependencies]
anyhow = "1"
1 change: 1 addition & 0 deletions tests/integration/ios/Cargo.toml
Original file line number Diff line number Diff line change
@@ -6,3 +6,4 @@ description = "iOS integration tests"
repository = "https://github.com/wasmerio/wasmer"
edition = "2018"
publish = false
rust-version = "1.59"
1 change: 1 addition & 0 deletions tests/lib/compiler-test-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ version = "0.0.1"
authors = ["Wasmer Engineering <engineering@wasmer.io>"]
edition = "2018"
license = "MIT"
rust-version = "1.59"

description = "A macro to generate easily tests across compilers and engines"
keywords = ["unsafe", "body", "fn", "safety", "hygiene"]
1 change: 1 addition & 0 deletions tests/lib/engine-dummy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ description = "Wasmer placeholder engine"
license = "MIT"
edition = "2018"
publish = false
rust-version = "1.59"

[dependencies]
wasmer-artifact = { path = "../../../lib/artifact", version = "=2.2.1" }
1 change: 1 addition & 0 deletions tests/lib/test-generator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ version = "0.1.0"
edition = "2018"
publish = false
license = "Apache-2.0 WITH LLVM-exception"
rust-version = "1.59"

[dependencies]
anyhow = "1.0"
1 change: 1 addition & 0 deletions tests/lib/wast/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ keywords = ["wasm", "webassembly"]
repository = "https://github.com/wasmerio/wasmer"
readme = "README.md"
edition = "2018"
rust-version = "1.59"

[dependencies]
anyhow = "1.0"
1 change: 1 addition & 0 deletions tests/wasi-wast/Cargo.toml
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ license = "MIT"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
edition = "2018"
publish = false
rust-version = "1.59"

[dependencies]
glob = "0.3"

0 comments on commit d1b44c6

Please sign in to comment.