Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 2 additions & 0 deletions crates/c-api/include/wasmtime/trap.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ enum wasmtime_trap_code_enum {
WASMTIME_TRAP_CODE_CONCURRENT_FUTURE_STREAM_OP = 45,
/// A reference count (for e.g. an `error-context`) overflowed.
WASMTIME_TRAP_CODE_REFERENCE_COUNT_OVERFLOW = 46,
/// A read/write on a stream must be <2**28 items.
WASMTIME_TRAP_CODE_STREAM_OP_TOO_BIG = 47,
};

/**
Expand Down
1 change: 1 addition & 0 deletions crates/c-api/src/trap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const _: () = {
assert!(Trap::CannotResumeThread as u8 == 44);
assert!(Trap::ConcurrentFutureStreamOp as u8 == 45);
assert!(Trap::ReferenceCountOverflow as u8 == 46);
assert!(Trap::StreamOpTooBig as u8 == 47);
};

#[repr(C)]
Expand Down
3 changes: 3 additions & 0 deletions crates/environ/src/trap_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ generate_trap_type! {
/// A reference count (for e.g. an `error-context`) overflowed.
ReferenceCountOverflow = "reference count overflow",

/// A read/write on a stream must be <2**28 items.
StreamOpTooBig = "stream read/write count too large",

// if adding a variant here be sure to update `trap.rs` and `trap.h` as
// mentioned above
}
Expand Down
Loading
Loading