Version is 0.10.0-dev.4176+6d7b0690a (stage2).
pub fn main() void {
const a = @extern(*const fn ([*]const u8) void, .{
.name = "a",
.library_name = "b",
.linkage = .Strong, // or `.Weak`
.is_thread_local = false,
});
a("hello");
}
zig build-exe -target wasm32-freestanding-none -O ReleaseSmall x.zig
This seems to generate malformed Wasm?
$ wasm2wat x.wasm
x.wasm:0000048: error: type mismatch at end of function, expected [] but got [i32]
Version is 0.10.0-dev.4176+6d7b0690a (stage2).
This seems to generate malformed Wasm?