Skip to content

Instantly share code, notes, and snippets.

View kay's full-sized avatar

Doug Lawrie kay

  • United Kingdom
View GitHub Profile
@kay
kay / main.rs
Last active July 16, 2024 15:36
Wasmer 4.3.4 panics when using static typed host functions
/*
[dependencies]
wasmer = { version = "4.3.4" }
*/
use wasmer::{Cranelift, Function, Imports, Instance, Module, RuntimeError, Store, Value};
fn static_return_32_then_64_then_32(lhs: i32, rhs: i32) -> (i32, i64, i32) {
(lhs, lhs as i64 + rhs as i64, rhs)
}