* Add/use create_wasi_instance() instead of instantiate_wasi(). * rm Result from Instance::from_handle
16 lines
423 B
Rust
16 lines
423 B
Rust
#![allow(improper_ctypes)]
|
|
|
|
extern crate alloc;
|
|
|
|
mod instantiate;
|
|
mod syscalls;
|
|
|
|
pub use instantiate::{create_wasi_instance, instantiate_wasi, instantiate_wasi_with_context};
|
|
|
|
pub fn is_wasi_module(name: &str) -> bool {
|
|
// FIXME: this should be more conservative, but while WASI is in flux and
|
|
// we're figuring out how to support multiple revisions, this should do the
|
|
// trick.
|
|
name.starts_with("wasi")
|
|
}
|