Skip to content

Commit 6ab0a7e

Browse files
authored
Drop support for WASI preview 0 (#466)
1 parent d1a92e7 commit 6ab0a7e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ext/src/ruby_api/linker.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ impl Linker {
5454

5555
let mut inner: LinkerImpl<StoreData> = LinkerImpl::new(engine.get());
5656
if wasi {
57-
wasi_common::sync::add_to_linker(&mut inner, |s| s.wasi_ctx_mut())
58-
.map_err(|e| error!("{}", e))?
57+
wasi_common::sync::snapshots::preview_1::add_wasi_snapshot_preview1_to_linker(
58+
&mut inner,
59+
|s| s.wasi_ctx_mut(),
60+
)
61+
.map_err(|e| error!("{}", e))?
5962
}
6063
Ok(Self {
6164
inner: RefCell::new(inner),

spec/unit/error_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def module_trapping_on_func
114114
def wasi_module_exiting
115115
Module.new(engine, <<~WAT)
116116
(module
117-
(import "wasi_unstable" "proc_exit"
117+
(import "wasi_snapshot_preview1" "proc_exit"
118118
(func $__wasi_proc_exit (param i32)))
119119
(memory (export "memory") 0)
120120
(func $_start

0 commit comments

Comments
 (0)