You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
480 B
11 lines
480 B
const ByteVec = @import("./vec.zig").ByteVec; |
|
const Diagnostics = @import("./diagnostics.zig").Diagnostics; |
|
const Error = @import("./error.zig").Error; |
|
|
|
pub fn wat2wasm(wat_bytes: []const u8, diag: ?*Diagnostics) !ByteVec { |
|
var result: ByteVec = undefined; |
|
const err = wasmtime_wat2wasm(wat_bytes.ptr, wat_bytes.len, &result); |
|
return Diagnostics.handleError(err, error.Wat2Wasm, result, diag); |
|
} |
|
|
|
extern "c" fn wasmtime_wat2wasm([*]const u8, usize, *ByteVec) ?*Error;
|
|
|