diff --git a/compiler/test/stdlib/sys.file.test.gr b/compiler/test/stdlib/wasi.file.test.gr similarity index 97% rename from compiler/test/stdlib/sys.file.test.gr rename to compiler/test/stdlib/wasi.file.test.gr index 93668b292..90432f389 100644 --- a/compiler/test/stdlib/sys.file.test.gr +++ b/compiler/test/stdlib/wasi.file.test.gr @@ -1,6 +1,6 @@ module FileTest -from "sys/file" include File as Fs +from "wasi/file" include File as Fs from "bytes" include Bytes from "result" include Result diff --git a/compiler/test/stdlib/sys.process.test.gr b/compiler/test/stdlib/wasi.process.test.gr similarity index 89% rename from compiler/test/stdlib/sys.process.test.gr rename to compiler/test/stdlib/wasi.process.test.gr index dadc3372e..a9a9b8128 100644 --- a/compiler/test/stdlib/sys.process.test.gr +++ b/compiler/test/stdlib/wasi.process.test.gr @@ -1,7 +1,7 @@ module ProcessTest from "array" include Array -from "sys/process" include Process +from "wasi/process" include Process // Just a smoke test match (Process.argv()) { diff --git a/compiler/test/stdlib/sys.random.test.gr b/compiler/test/stdlib/wasi.random.test.gr similarity index 94% rename from compiler/test/stdlib/sys.random.test.gr rename to compiler/test/stdlib/wasi.random.test.gr index 2b5af8ed3..18e5ef4cf 100644 --- a/compiler/test/stdlib/sys.random.test.gr +++ b/compiler/test/stdlib/wasi.random.test.gr @@ -1,6 +1,6 @@ module RandomTest -from "sys/random" include Random +from "wasi/random" include Random // Just smoke tests, there's a miniscule chance these could fail diff --git a/compiler/test/stdlib/sys.time.test.gr b/compiler/test/stdlib/wasi.time.test.gr similarity index 97% rename from compiler/test/stdlib/sys.time.test.gr rename to compiler/test/stdlib/wasi.time.test.gr index 321d69c12..124978d61 100644 --- a/compiler/test/stdlib/sys.time.test.gr +++ b/compiler/test/stdlib/wasi.time.test.gr @@ -2,7 +2,7 @@ module TimeTest from "int64" include Int64 use Int64.{ (<), (<=) } -from "sys/time" include Time +from "wasi/time" include Time let mt1 = Time.monotonicTime() let mt2 = Time.monotonicTime() diff --git a/compiler/test/suites/stdlib.re b/compiler/test/suites/stdlib.re index 2d9438b73..50a55dbaf 100644 --- a/compiler/test/suites/stdlib.re +++ b/compiler/test/suites/stdlib.re @@ -66,7 +66,7 @@ describe("stdlib", ({test, testSkip}) => { "stdlib_file_stdout", {| from "bytes" include Bytes - from "sys/file" include File + from "wasi/file" include File ignore(File.fdWrite(File.stdout, Bytes.fromString("enterthe"))) print(void) |}, @@ -104,10 +104,10 @@ describe("stdlib", ({test, testSkip}) => { assertStdlib("stack.test"); assertStdlib("priorityqueue.test"); assertStdlib("string.test"); - assertStdlib("sys.file.test"); - assertStdlib(~code=5, "sys.process.test"); - assertStdlib("sys.random.test"); - assertStdlib("sys.time.test"); + assertStdlib("wasi.file.test"); + assertStdlib(~code=5, "wasi.process.test"); + assertStdlib("wasi.random.test"); + assertStdlib("wasi.time.test"); assertStdlib("wasmf32.test"); assertStdlib("wasmf64.test"); assertStdlib("wasmi32.test"); diff --git a/compiler/test/suites/wasi_args.re b/compiler/test/suites/wasi_args.re index 6735ad7a8..b53756ec0 100644 --- a/compiler/test/suites/wasi_args.re +++ b/compiler/test/suites/wasi_args.re @@ -8,7 +8,7 @@ describe("wasi args and env", ({test, testSkip}) => { let assertRun = makeRunner(test_or_skip); let print_wasi_info = {| - from "sys/process" include Process + from "wasi/process" include Process from "array" include Array from "string" include String diff --git a/stdlib/hash.gr b/stdlib/hash.gr index 2da37f2b2..17e71228b 100644 --- a/stdlib/hash.gr +++ b/stdlib/hash.gr @@ -39,7 +39,7 @@ from "runtime/numbers" include Numbers use Numbers.{ coerceNumberToWasmI32 } from "runtime/bigint" include Bigint as BI -from "sys/random" include Random +from "wasi/random" include Random from "result" include Result @unsafe diff --git a/stdlib/random.gr b/stdlib/random.gr index 449209b21..2c205e8b8 100644 --- a/stdlib/random.gr +++ b/stdlib/random.gr @@ -7,7 +7,7 @@ */ module Random -from "sys/random" include Random as WasiRandom +from "wasi/random" include Random as WasiRandom from "result" include Result from "uint32" include Uint32 from "uint64" include Uint64 diff --git a/stdlib/sys/file.gr b/stdlib/wasi/file.gr similarity index 99% rename from stdlib/sys/file.gr rename to stdlib/wasi/file.gr index 497d1c4dd..a181a9c55 100644 --- a/stdlib/sys/file.gr +++ b/stdlib/wasi/file.gr @@ -3,7 +3,7 @@ * * Many of the functions in this module are not intended to be used directly, but rather for other libraries to be built on top of them. * - * @example from "sys/file" include File + * @example from "wasi/file" include File */ module File diff --git a/stdlib/sys/file.md b/stdlib/wasi/file.md similarity index 99% rename from stdlib/sys/file.md rename to stdlib/wasi/file.md index d7eaf6587..6180ce524 100644 --- a/stdlib/sys/file.md +++ b/stdlib/wasi/file.md @@ -7,7 +7,7 @@ Utilities for accessing the filesystem & working with files. Many of the functions in this module are not intended to be used directly, but rather for other libraries to be built on top of them. ```grain -from "sys/file" include File +from "wasi/file" include File ``` ## Types diff --git a/stdlib/sys/process.gr b/stdlib/wasi/process.gr similarity index 99% rename from stdlib/sys/process.gr rename to stdlib/wasi/process.gr index 9fd625685..b977af518 100644 --- a/stdlib/sys/process.gr +++ b/stdlib/wasi/process.gr @@ -3,7 +3,7 @@ * * This includes things like accessing environment variables and sending signals. * - * @example from "sys/process" include Sys/process + * @example from "wasi/process" include Process */ module Process diff --git a/stdlib/sys/process.md b/stdlib/wasi/process.md similarity index 98% rename from stdlib/sys/process.md rename to stdlib/wasi/process.md index fa16661e1..7d120712c 100644 --- a/stdlib/sys/process.md +++ b/stdlib/wasi/process.md @@ -7,7 +7,7 @@ Utilities for accessing functionality and information about the Grain program's This includes things like accessing environment variables and sending signals. ```grain -from "sys/process" include Sys/process +from "wasi/process" include Process ``` ## Types diff --git a/stdlib/sys/random.gr b/stdlib/wasi/random.gr similarity index 97% rename from stdlib/sys/random.gr rename to stdlib/wasi/random.gr index cd6195682..221e189d2 100644 --- a/stdlib/sys/random.gr +++ b/stdlib/wasi/random.gr @@ -1,7 +1,7 @@ /** * System access to random values. * - * @example from "sys/random" include Random + * @example from "wasi/random" include Random */ module Random diff --git a/stdlib/sys/random.md b/stdlib/wasi/random.md similarity index 98% rename from stdlib/sys/random.md rename to stdlib/wasi/random.md index f70e3921b..c7e91e4bc 100644 --- a/stdlib/sys/random.md +++ b/stdlib/wasi/random.md @@ -5,7 +5,7 @@ title: Random System access to random values. ```grain -from "sys/random" include Random +from "wasi/random" include Random ``` ## Values diff --git a/stdlib/sys/time.gr b/stdlib/wasi/time.gr similarity index 97% rename from stdlib/sys/time.gr rename to stdlib/wasi/time.gr index f95ae4e3a..ad387dcde 100644 --- a/stdlib/sys/time.gr +++ b/stdlib/wasi/time.gr @@ -1,7 +1,7 @@ /** * Access to system clocks. * - * @example from "sys/time" include Time + * @example from "wasi/time" include Time */ module Time diff --git a/stdlib/sys/time.md b/stdlib/wasi/time.md similarity index 98% rename from stdlib/sys/time.md rename to stdlib/wasi/time.md index e8b086092..af9ea7ffe 100644 --- a/stdlib/sys/time.md +++ b/stdlib/wasi/time.md @@ -5,7 +5,7 @@ title: Time Access to system clocks. ```grain -from "sys/time" include Time +from "wasi/time" include Time ``` ## Values