Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ wat = "1.0.83"
name = "wasm-interpreter"
version = "0.2.0"
edition = "2021"
rust-version = "1.76.0" # Keep this in sync with the requirements!
rust-version = "1.81.0" # Keep this in sync with the requirements!
description = """
A WASM interpreter tailored for safety use-cases, such as automotive and avionics applications
"""
Expand Down
2 changes: 1 addition & 1 deletion crates/benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "benchmark"
version = "0.1.0"
edition = "2021"
rust-version = "1.80.0"
rust-version = "1.81.0"

[dev-dependencies]
criterion = { version = "0.5.1", default-features = false, features = [
Expand Down
2 changes: 1 addition & 1 deletion crates/compare-testsuite-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "compare-testsuite-rs"
version = "0.1.0"
edition = "2021"
rust-version = "1.74.1"
rust-version = "1.81.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion crates/log_wrapper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "log_wrapper"
version = "0.1.0"
edition = "2021"
rust-version = "1.76.0" # Keep this in sync with the requirements!
rust-version = "1.81.0" # Keep this in sync with the requirements!
description = """
A WASM interpreter tailored for safety use-cases, such as automotive and avionics applications
"""
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.sdoc
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ RELATIONS:
UID: REQ-17
TITLE: Minimum Supported Rust Version (MSRV)
STATEMENT: >>>
The interpreter shall compile on Rust ``1.76.0`` and later versions
The interpreter shall compile on Rust ``1.81.0`` and later versions
<<<
RATIONALE: >>>
An MSRV should be clearly stated to specify which toolchain is acceptable.
Expand Down
2 changes: 2 additions & 0 deletions src/core/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ pub enum ValidationError {
InvalidElementMode(u32),
}

impl core::error::Error for ValidationError {}

impl Display for ValidationError {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
match self {
Expand Down
10 changes: 6 additions & 4 deletions src/execution/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub enum RuntimeError {
impl Display for RuntimeError {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
match self {
RuntimeError::Trap(trap_error) => write!(f, "{trap_error}"),
RuntimeError::Trap(trap_error) => write!(f, "Execution trapped: {trap_error}"),
RuntimeError::FunctionNotFound => f.write_str("Function not found"),
RuntimeError::ModuleNotFound => f.write_str("No such module exists"),
RuntimeError::ResumableNotFound => f.write_str("No such resumable exists"),
Expand Down Expand Up @@ -109,6 +109,8 @@ impl Display for RuntimeError {
}
}

impl core::error::Error for RuntimeError {}

#[derive(Debug, PartialEq, Eq, Clone)]
pub enum TrapError {
DivideBy0,
Expand Down Expand Up @@ -153,13 +155,13 @@ impl Display for TrapError {
TrapError::TableAccessOutOfBounds => {
f.write_str("Indirect call: table index out of bounds")
}
TrapError::ReachedUnreachable => {
f.write_str("an unreachable statement was reached, triggered a trap")
}
TrapError::ReachedUnreachable => f.write_str("An unreachable statement was reached"),
}
}
}

impl core::error::Error for TrapError {}

impl From<TrapError> for RuntimeError {
fn from(value: TrapError) -> Self {
Self::Trap(value)
Expand Down