Skip to content

Commit cacc416

Browse files
authoredFeb 8, 2023
wasi-threads: fix import name (#5748)
* wasi-threads: fix import name As @TerrorJack pointed out in #5484, that PR implements an older name--`thread_spawn`. This change uses the now-official name from the specification--`thread-spawn`. * fix: update name in test
1 parent 46fe366 commit cacc416

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎crates/wasi-threads/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub fn add_to_linker<T: Clone + Send + 'static>(
112112
) -> anyhow::Result<SharedMemory> {
113113
linker.func_wrap(
114114
"wasi",
115-
"thread_spawn",
115+
"thread-spawn",
116116
move |mut caller: Caller<'_, T>, start_arg: i32| -> i32 {
117117
log::trace!("new thread requested via `wasi::thread_spawn` call");
118118
let host = caller.data().clone();

‎tests/all/cli_tests/threads.wat

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(func $__wasi_fd_write (param i32 i32 i32 i32) (result i32)))
77
(import "wasi_snapshot_preview1" "proc_exit"
88
(func $__wasi_proc_exit (param i32)))
9-
(import "wasi" "thread_spawn"
9+
(import "wasi" "thread-spawn"
1010
(func $__wasi_thread_spawn (param i32) (result i32)))
1111

1212
(func (export "_start")

0 commit comments

Comments
 (0)