Skip to content

Commit 79b9073

Browse files
authored
Fix wasi_snapshot, should be wasi_snapshot_preview1 (AssemblyScript#1099)
1 parent ac201fe commit 79b9073

7 files changed

+9
-9
lines changed

cli/util/find.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ function findFiles(dirname, filter) {
1616
exports.files = findFiles;
1717

1818
exports.TS = /\.ts$/;
19-
exports.TS_EXCEPT_DTS = /[^\.][^\d]\.ts$/;
19+
exports.TS_EXCEPT_DTS = /(?:(?!\.d).{2}|^.{0,1})\.ts$/;

std/assembly/bindings/wasi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "./wasi_snapshot";
1+
export * from "./wasi_snapshot_preview1";
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
(module
22
(type $none_=>_none (func))
33
(memory $0 0)
4-
(global $wasi-snapshot/sig (mut i32) (i32.const 1))
4+
(global $wasi-snapshot-preview1/sig (mut i32) (i32.const 1))
55
(export "memory" (memory $0))
66
(start $~start)
77
(func $~start (; 0 ;)
88
i32.const 9
9-
global.set $wasi-snapshot/sig
9+
global.set $wasi-snapshot-preview1/sig
1010
)
1111
)

tests/compiler/wasi-snapshot.ts renamed to tests/compiler/wasi-snapshot-preview1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
subscription_fd_readwrite,
99
signal,
1010
prestat_dir
11-
} from "bindings/wasi_snapshot";
11+
} from "bindings/wasi_snapshot_preview1";
1212

1313
import { Target } from "shared/target";
1414

tests/compiler/wasi-snapshot.untouched.wat renamed to tests/compiler/wasi-snapshot-preview1.untouched.wat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
(global $~lib/shared/target/Target.WASM64 i32 (i32.const 1))
77
(global $~lib/shared/target/Target.JS i32 (i32.const 2))
88
(global $~lib/ASC_TARGET i32 (i32.const 0))
9-
(global $wasi-snapshot/sig (mut i32) (i32.const 1))
9+
(global $wasi-snapshot-preview1/sig (mut i32) (i32.const 1))
1010
(export "memory" (memory $0))
1111
(start $~start)
12-
(func $start:wasi-snapshot (; 0 ;)
12+
(func $start:wasi-snapshot-preview1 (; 0 ;)
1313
i32.const 9
14-
global.set $wasi-snapshot/sig
14+
global.set $wasi-snapshot-preview1/sig
1515
)
1616
(func $~start (; 1 ;)
17-
call $start:wasi-snapshot
17+
call $start:wasi-snapshot-preview1
1818
)
1919
)

0 commit comments

Comments
 (0)