mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Made most libraries panic on js targets instead of not compiling
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
//+build !js
|
||||
package wasm_js_interface
|
||||
|
||||
import "core:mem"
|
||||
|
||||
PAGE_SIZE :: 64 * 1024
|
||||
page_alloc :: proc(page_count: int) -> (data: []byte, err: mem.Allocator_Error) {
|
||||
panic("vendor:wasm/js not supported on non-js targets")
|
||||
}
|
||||
|
||||
page_allocator :: proc() -> mem.Allocator {
|
||||
panic("vendor:wasm/js not supported on non-js targets")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user