Made most libraries panic on js targets instead of not compiling

This commit is contained in:
Dragos Popescu committed 2023-03-20 04:08:48 +01:00
1 parent fe533fb809
commit adac039a2b
7 files changed
+569 -2

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
//+build js
//+private
package dynlib
_load_library :: proc(path: string, global_symbols := false) -> (Library, bool) {
panic("core:dynlib not supported by JS target")
}
_unload_library :: proc(library: Library) -> bool {
panic("core:dynlib not supported by JS target")
}
_symbol_address :: proc(library: Library, symbol: string) -> (ptr: rawptr, found: bool) {
panic("core:dynlib not supported by JS target")
}