wasm: add the fprint procedures to fmt

This makes the `log` package work on wasm
This commit is contained in:
Laytan Laats
2024-04-28 16:10:04 +02:00
parent 30cfdd73b0
commit cc5faecced
2 changed files with 53 additions and 7 deletions
+2 -7
View File
@@ -64,13 +64,8 @@ write_at :: proc(fd: Handle, data: []byte, offset: i64) -> (n: int, err: Errno)
unimplemented("core:os procedure not supported on JS target")
}
// NOTE(bill): Uses startup to initialize it
//stdin := get_std_handle(uint(win32.STD_INPUT_HANDLE))
//stdout := get_std_handle(uint(win32.STD_OUTPUT_HANDLE))
//stderr := get_std_handle(uint(win32.STD_ERROR_HANDLE))
stdout: Handle = 1
stderr: Handle = 2
get_std_handle :: proc "contextless" (h: uint) -> Handle {
context = runtime.default_context()