Module: Wasmtime
- Defined in:
- ext/src/ruby_api/mod.rs,
lib/wasmtime/error.rb,
lib/wasmtime/version.rb
Defined Under Namespace
Classes: Caller, ConversionError, Engine, Error, Extern, Func, FuncType, Global, Instance, Linker, Memory, Module, PoolingAllocationConfig, ResultError, Store, Table, Trap, WasiCtx, WasiCtxBuilder, WasiExit
Constant Summary collapse
- VERSION =
"26.0.0"
Class Method Summary collapse
-
.wat2wasm(wat) ⇒ String
Converts a WAT
String
into Wasm.
Class Method Details
.wat2wasm(wat) ⇒ String
Converts a WAT String
into Wasm.
64 65 66 67 68 69 |
# File 'ext/src/ruby_api/mod.rs', line 64
pub fn wat2wasm(wat: RString) -> Result<RString, Error> {
wat::parse_str(unsafe { wat.as_str()? })
.map(|bytes| RString::from_slice(bytes.as_slice()))
.map_err(|e| crate::error!("{}", e))
}
}
|