WASM Execution Pipeline, File Dispatch & Supporting Infrastructure #52

Merged
admin merged 6 commits from feature/wasm into develop 2026-03-07 22:29:31 +00:00
5 changed files with 258 additions and 19 deletions
Showing only changes of commit b51881ced7 - Show all commits
+1
View File
@@ -17,3 +17,4 @@ AGENTS.md
lessons_learnt.md
*.log
/doc/*.md
wasuro
+1
View File
@@ -24,6 +24,7 @@ declare -a run_steps=(
"compile_stub.sh" "Failed to compile stub!"
"compile_vergen.sh" "Versions failed to compile"
"compile_lvgl.sh" "Failed to compile LVGL!"
"compile_wasuro.sh" "Failed to pull Wasuro!"
"compile_sources.sh" "Failed to compile FPC Sources!"
"compile_link.sh" "Failed linking!"
"compile_isogen.sh" "Failed to create ISO!"
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
# compile_wasuro.sh — Pull Wasuro WASM runtime source into /wasuro
# Clones the repo (sparse, src/wasm only) and copies the Pascal sources
# into /code/wasuro so the FPC build can reference them via -Fu.
set -e
WASURO_REPO="https://gitea.spexeah.com/Spexeah/Wasuro.git"
WASURO_BRANCH="develop"
WASURO_TMP="/tmp/wasuro"
WASURO_OUT="/code/wasuro"
echo " "
echo "======================="
echo " "
echo "Pulling Wasuro WASM runtime..."
echo " "
# Skip if wasuro/ already has .pas files (cached from previous build)
if [ -n "$(find "${WASURO_OUT}" -name '*.pas' 2>/dev/null | head -1)" ]; then
echo "Wasuro sources already present in ${WASURO_OUT}, skipping pull."
echo " "
exit 0
fi
# Clone sparse checkout (only src/wasm)
rm -rf "$WASURO_TMP"
git clone --depth 1 --branch "${WASURO_BRANCH}" --filter=blob:none --sparse \
"${WASURO_REPO}" "${WASURO_TMP}" 2>&1
cd "$WASURO_TMP"
git sparse-checkout set src/wasm 2>&1
cd /code
echo "Copying src/wasm to ${WASURO_OUT}..."
rm -rf "$WASURO_OUT"
mkdir -p "$WASURO_OUT"
cp -a "${WASURO_TMP}/src/wasm/"* "$WASURO_OUT"/
rm -rf "$WASURO_TMP"
TOTAL=$(find "$WASURO_OUT" -name '*.pas' | wc -l)
echo "Copied ${TOTAL} Pascal source files."
echo " "
echo "Wasuro pull complete."
echo " "
+201 -16
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -106,6 +106,10 @@ uses
volcmd,
volumemanager,
vterminal,
wasm,
wasm.vm.io,
wasm.test,
wasm.test.framework,
Windows,
XHCI;
@@ -243,6 +247,10 @@ begin
vfs.init();
storagetest.init;
{ Let's test Wasuro! }
wasm.vm.io.io_set_writechar(@syslog.logchar);
wasm.wasm_init;
{ Management Interfaces }
tracer.push_trace('kmain.STRMGMT');
splash.update(10, 'Initializing storage management...');
@@ -328,6 +336,7 @@ begin
cfifols.UnitTest;
lifo.UnitTest;
circ.UnitTest;
wasm.test.run_all_tests;
splash.update(90, 'Running test suite...');
minh.UnitTest;
maxh.UnitTest;