perf(scripting): build wamr without libc-wasi (#14305) 603235d269
build wamr without libc-wasi, which no script module needs

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
diff --git a/.rive_head b/.rive_head
index 6eb0cf1..e67461e 100644
--- a/.rive_head
+++ b/.rive_head
@@ -1 +1 @@
-6dcbf68a587a0d0a29906a9b41cba01dac2c0f8e
+603235d26914a14ab897e696c446f4354782b6fa
diff --git a/scripting/premake5_wamr.lua b/scripting/premake5_wamr.lua
index 70da348..d4def62 100644
--- a/scripting/premake5_wamr.lua
+++ b/scripting/premake5_wamr.lua
@@ -1,8 +1,8 @@
 -- WAMR for the wasm scripting backend. Flags proven by the luau_wasm EH
 -- spike: sw-bounds artifacts must never unwind through hardware traps
--- (the longjmp skips the sjlj glue's native frames) and libc-wasi must be
--- compiled in (without it emscripten-built module ctors spin; see
--- spike_eh/README.md). Bounds checks default sw; wasm_hw_bounds below.
+-- (the longjmp skips the sjlj glue's native frames). Bounds checks default
+-- sw; wasm_hw_bounds below. No libc-wasi: AssemblyScript modules import
+-- none, and the runtime serves the Luau host module's two wasi calls itself.
 local dependency = require('dependency')
 -- The patch set carries the rive fast-interp fixes (linear_mem_size
 -- refreshes around growth, gated OOB diagnostics); a clone without them is
@@ -23,7 +23,7 @@
     'WASM_ENABLE_AOT=1',
     'WASM_ENABLE_JIT=0',
     'WASM_ENABLE_LIBC_BUILTIN=1',
-    'WASM_ENABLE_LIBC_WASI=1',
+    'WASM_ENABLE_LIBC_WASI=0',
     'WASM_ENABLE_MODULE_INST_CONTEXT=1',
     'WASM_ENABLE_BULK_MEMORY=1',
     -- Simde-backed v128 in the fast interpreter; scalar modules
@@ -177,18 +177,12 @@
         wamr .. '/core/iwasm/common',
         wamr .. '/core/iwasm/aot',
         wamr .. '/core/iwasm/interpreter',
-        wamr .. '/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/include',
-        wamr .. '/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src',
         wamr .. '/core/shared/include',
         wamr .. '/core/shared/platform/include',
         -- platform_internal.h comes from the per-platform dir.
         platformPath,
         wamr .. '/core/shared/platform/common/libc-util',
         wamr .. '/core/shared/mem-alloc',
-        -- wasm_runtime_common.h pulls the wasi primitives when libc-wasi is
-        -- on, which our config always is.
-        wamr .. '/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src',
-        wamr .. '/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/include',
         wamr .. '/core/shared/utils',
         wamr .. '/core/shared/utils/uncommon',
         simde,
@@ -202,7 +196,6 @@
         wamr .. '/core/iwasm/aot/*.c',
         wamr .. '/core/iwasm/aot/arch/' .. aotReloc,
         wamr .. '/core/iwasm/libraries/libc-builtin/*.c',
-        wamr .. '/core/iwasm/libraries/libc-wasi/**.c',
         platformPath .. '/*.c',
         -- Windows replaces the posix layer wholesale; win_atomic is C++.
         (os.target() == 'windows' and not isNx)
@@ -239,10 +232,6 @@
         -- platform_internal.h comes from the per-platform dir.
         platformPath,
         wamr .. '/core/shared/mem-alloc',
-        -- wasm_runtime_common.h pulls the wasi primitives when libc-wasi is
-        -- on, which our config always is.
-        wamr .. '/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src',
-        wamr .. '/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/include',
         wamr .. '/core/shared/utils',
     },
 }