mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Begin work in semi-standardized js_wasm32 target
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
//+build js
|
||||
package runtime
|
||||
|
||||
foreign import "odin_env"
|
||||
|
||||
_os_write :: proc "contextless" (data: []byte) -> (int, _OS_Errno) {
|
||||
foreign odin_env {
|
||||
write :: proc "c" (fd: u32, p: []byte) ---
|
||||
}
|
||||
write(1, data)
|
||||
return len(data), 0
|
||||
}
|
||||
Reference in New Issue
Block a user