mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Wasm sized and decode for void values
This commit is contained in:
parent
6802c3e2b1
commit
efc11bd7ed
2 changed files with 11 additions and 0 deletions
|
@ -31,6 +31,11 @@ impl Wasm32Sized for () {
|
|||
const ALIGN_OF_WASM: usize = 0;
|
||||
}
|
||||
|
||||
impl Wasm32Sized for std::convert::Infallible {
|
||||
const SIZE_OF_WASM: usize = 0;
|
||||
const ALIGN_OF_WASM: usize = 0;
|
||||
}
|
||||
|
||||
impl Wasm32Sized for RocStr {
|
||||
const SIZE_OF_WASM: usize = 12;
|
||||
const ALIGN_OF_WASM: usize = 4;
|
||||
|
|
|
@ -182,3 +182,9 @@ impl<T: FromWasm32Memory, U: FromWasm32Memory, V: FromWasm32Memory> FromWasm32Me
|
|||
(t, u, v)
|
||||
}
|
||||
}
|
||||
|
||||
impl FromWasm32Memory for std::convert::Infallible {
|
||||
fn decode(_memory_bytes: &[u8], _offset: u32) -> Self {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue