6 set_default(is_plat("wasm") or false)
7 set_description("Enable/Disable JavaScript WebAssembly")
10 -- option: liba-wasm-async
11 option("liba-wasm-async")
15 set_description("Enable/Disable JavaScript Async")
18 -- option: liba-wasm-bigint
19 option("liba-wasm-bigint")
23 set_description("Enable/Disable JavaScript BigInt")
26 if get_config("liba-wasm") and is_plat("wasm") then
29 add_files("src/**.cc")
30 if not has_config("liba-wasm") then
31 add_ldflags("-sWASM=0")
33 if not has_config("liba-wasm-async") then
34 add_ldflags("-sWASM_ASYNC_COMPILATION=0")
36 if has_config("liba-wasm-bigint") then
37 add_ldflags("-sWASM_BIGINT")
38 add_defines("WASM_BIGINT")
40 set_filename("liba.js")
41 add_syslinks("embind")