summaryrefslogtreecommitdiff
path: root/crates/types
diff options
context:
space:
mode:
Diffstat (limited to 'crates/types')
-rw-r--r--crates/types/src/archive.rs3
-rw-r--r--crates/types/src/instructions.rs4
-rw-r--r--crates/types/src/lib.rs2
3 files changed, 5 insertions, 4 deletions
diff --git a/crates/types/src/archive.rs b/crates/types/src/archive.rs
index 273d6ed..9bf095b 100644
--- a/crates/types/src/archive.rs
+++ b/crates/types/src/archive.rs
@@ -48,6 +48,9 @@ impl Display for TwasmError {
}
#[cfg(feature = "std")]
+extern crate std;
+
+#[cfg(feature = "std")]
impl std::error::Error for TwasmError {}
impl TinyWasmModule {
diff --git a/crates/types/src/instructions.rs b/crates/types/src/instructions.rs
index c932704..402cc9a 100644
--- a/crates/types/src/instructions.rs
+++ b/crates/types/src/instructions.rs
@@ -73,8 +73,7 @@ pub enum ConstInstruction {
///
/// # Differences to the spec
/// * `br_table` stores the jump labels in the following `br_label` instructions to keep this enum small.
-/// * Lables/Blocks: we store the label end offset in the instruction itself and
-/// have seperate EndBlockFrame and EndFunc instructions to mark the end of a block or function.
+/// * Lables/Blocks: we store the label end offset in the instruction itself and use `EndBlockFrame` to mark the end of a block.
/// This makes it easier to implement the label stack iteratively.
///
/// See <https://webassembly.github.io/spec/core/binary/instructions.html>
@@ -121,7 +120,6 @@ pub enum Instruction {
If(BlockArgsPacked, ElseOffset, EndOffset), // If else offset is 0 if there is no else block
Else(EndOffset),
EndBlockFrame,
- EndFunc,
Br(LabelAddr),
BrIf(LabelAddr),
BrTable(BrTableDefault, BrTableLen), // has to be followed by multiple BrLabel instructions
diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs
index 679f3bf..c5c8071 100644
--- a/crates/types/src/lib.rs
+++ b/crates/types/src/lib.rs
@@ -3,7 +3,7 @@
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_assignments, unused_variables))
))]
#![warn(missing_debug_implementations, rust_2018_idioms, unreachable_pub)]
-#![cfg_attr(not(feature = "std"), no_std)]
+#![no_std]
#![cfg_attr(not(feature = "unsafe"), forbid(unsafe_code))]
#![cfg_attr(feature = "unsafe", deny(unused_unsafe))]