diff --git a/.gitignore b/.gitignore index 0f8d7c2..9933885 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,8 @@ src/graphics/orca_gl31.h __pycache__ scripts/files -ext/angle +# explicitly abandon old ext dir +/ext +src/ext/angle sketches/*/bin \ No newline at end of file diff --git a/ext/wasm3/extra/wapm-package/build/.gitignore b/ext/wasm3/extra/wapm-package/build/.gitignore deleted file mode 100644 index 86d0cb2..0000000 --- a/ext/wasm3/extra/wapm-package/build/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore \ No newline at end of file diff --git a/ext/wasm3/platforms/openwrt/build/Makefile b/ext/wasm3/platforms/openwrt/build/Makefile deleted file mode 100644 index 6ef904d..0000000 --- a/ext/wasm3/platforms/openwrt/build/Makefile +++ /dev/null @@ -1,15 +0,0 @@ - -M3_SRC_DIR := ../../../source - -SOURCES := ../../app/main.c \ - $(shell find $(M3_SRC_DIR) -type f -name '*.c') - -override CFLAGS += -std=c99 -O3 -flto -Dd_m3HasWASI -Wno-error=format-security -Wfatal-errors -I$(M3_SRC_DIR) - -all: wasm3 - -wasm3: $(SOURCES) - $(CC) $(CFLAGS) $(SOURCES) -o wasm3 -lm - -clean: - $(RM) wasm3 diff --git a/orca b/orca index b5ae866..c973d97 100755 --- a/orca +++ b/orca @@ -41,9 +41,9 @@ if use_source: # Use the source checkout's scripts instead of the system-installed scripts. if not is_source: - print("The Orca tool is running from a local source checkout and will") - print("use that instead of the system Orca installation.") - print() + print("The Orca tool is running from a local source checkout and will", file=sys.stderr) + print("use that instead of the system Orca installation.", file=sys.stderr) + print(file=sys.stderr) sys.path.append(source_dir) import scripts.orca diff --git a/samples/breakout/build.bat b/samples/breakout/build.bat index 9d88846..331320b 100644 --- a/samples/breakout/build.bat +++ b/samples/breakout/build.bat @@ -1,19 +1,21 @@ @echo off +set ORCA_DIR=..\.. +set STDLIB_DIR=%ORCA_DIR%\src\libc-shim + :: compile wasm module set wasmFlags=--target=wasm32^ --no-standard-libraries ^ - -fno-builtin ^ + -mbulk-memory ^ + -g -O2 ^ + -D__ORCA__ ^ -Wl,--no-entry ^ -Wl,--export-dynamic ^ - -g ^ - -O2 ^ - -mbulk-memory ^ - -D__ORCA__ ^ - -isystem ..\..\src\libc-shim\include ^ - -I..\..\ext -I ..\..\src + -isystem %STDLIB_DIR%\include ^ + -I%ORCA_DIR%\src ^ + -I%ORCA_DIR%\src\ext -clang %wasmFlags% -o .\module.wasm ..\..\src\orca.c ..\..\src\libc-shim\src\*.c src\main.c +clang %wasmFlags% -o .\module.wasm %ORCA_DIR%\src\orca.c %STDLIB_DIR%\src\*.c src\main.c IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% -orca bundle --orca-dir ..\.. --name Breakout --icon icon.png --resource-dir data module.wasm +orca bundle --orca-dir %ORCA_DIR% --name Breakout --icon icon.png --resource-dir data module.wasm diff --git a/samples/breakout/build.sh b/samples/breakout/build.sh index ce24214..b21abed 100755 --- a/samples/breakout/build.sh +++ b/samples/breakout/build.sh @@ -12,21 +12,19 @@ else fi ORCA_DIR=../.. -STDLIB_DIR=../../src/libc-shim +STDLIB_DIR=$ORCA_DIR/src/libc-shim wasmFlags="--target=wasm32 \ --no-standard-libraries \ - -fno-builtin \ + -mbulk-memory \ + -g -O2 \ + -D__ORCA__ \ -Wl,--no-entry \ -Wl,--export-dynamic \ - -g \ - -O2 \ - -mbulk-memory \ - -D__ORCA__ \ - -I $STDLIB_DIR/include \ - -I $ORCA_DIR/ext \ - -I $ORCA_DIR/src" + -isystem $STDLIB_DIR/include \ + -I $ORCA_DIR/src \ + -I $ORCA_DIR/src/ext" -$CLANG $wasmFlags -o ./module.wasm ../../src/orca.c $STDLIB_DIR/src/*.c src/main.c +$CLANG $wasmFlags -o ./module.wasm $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c src/main.c -orca bundle --orca-dir ../.. --name Breakout --icon icon.png --resource-dir data module.wasm +orca bundle --orca-dir $ORCA_DIR --name Breakout --icon icon.png --resource-dir data module.wasm diff --git a/samples/clock/build.bat b/samples/clock/build.bat index ec92225..95d92c8 100644 --- a/samples/clock/build.bat +++ b/samples/clock/build.bat @@ -1,19 +1,21 @@ @echo off +set ORCA_DIR=..\.. +set STDLIB_DIR=%ORCA_DIR%\src\libc-shim + :: compile wasm module set wasmFlags=--target=wasm32^ --no-standard-libraries ^ - -fno-builtin ^ + -mbulk-memory ^ + -g -O2 ^ + -D__ORCA__ ^ -Wl,--no-entry ^ -Wl,--export-dynamic ^ - -g ^ - -O2 ^ - -mbulk-memory ^ - -D__ORCA__ ^ - -isystem ..\..\src\libc-shim\include ^ - -I..\..\ext -I ..\..\src + -isystem %STDLIB_DIR%\include ^ + -I%ORCA_DIR%\src ^ + -I%ORCA_DIR%\src\ext -clang %wasmFlags% -o .\module.wasm ..\..\src\orca.c ..\..\src\libc-shim\src\*.c src\main.c +clang %wasmFlags% -o .\module.wasm %ORCA_DIR%\src\orca.c %STDLIB_DIR%\src\*.c src\main.c IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% -orca bundle --orca-dir ..\.. --name Clock --icon icon.png --resource-dir data module.wasm +orca bundle --orca-dir %ORCA_DIR% --name Clock --icon icon.png --resource-dir data module.wasm diff --git a/samples/clock/build.sh b/samples/clock/build.sh index d39dbb3..41caf81 100755 --- a/samples/clock/build.sh +++ b/samples/clock/build.sh @@ -12,21 +12,19 @@ else fi ORCA_DIR=../.. -STDLIB_DIR=../../src/libc-shim +STDLIB_DIR=$ORCA_DIR/src/libc-shim wasmFlags="--target=wasm32 \ --no-standard-libraries \ - -fno-builtin \ + -mbulk-memory \ + -g -O2 \ + -D__ORCA__ \ -Wl,--no-entry \ -Wl,--export-dynamic \ - -g \ - -O2 \ - -mbulk-memory \ - -D__ORCA__ \ - -I $STDLIB_DIR/include \ - -I $ORCA_DIR/ext \ - -I $ORCA_DIR/src" + -isystem $STDLIB_DIR/include \ + -I $ORCA_DIR/src \ + -I $ORCA_DIR/src/ext" -$CLANG $wasmFlags -o ./module.wasm ../../src/orca.c $STDLIB_DIR/src/*.c src/main.c +$CLANG $wasmFlags -o ./module.wasm $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c src/main.c -orca bundle --orca-dir ../.. --name Clock --icon icon.png --resource-dir data module.wasm +orca bundle --orca-dir $ORCA_DIR --name Clock --icon icon.png --resource-dir data module.wasm diff --git a/samples/fluid/build.bat b/samples/fluid/build.bat index 5543721..73f4d72 100644 --- a/samples/fluid/build.bat +++ b/samples/fluid/build.bat @@ -1,17 +1,19 @@ @echo off +set ORCA_DIR=..\.. +set STDLIB_DIR=%ORCA_DIR%\src\libc-shim + :: compile wasm module set wasmFlags=--target=wasm32^ --no-standard-libraries ^ - -fno-builtin ^ + -mbulk-memory ^ + -g -O2 ^ + -D__ORCA__ ^ -Wl,--no-entry ^ -Wl,--export-dynamic ^ - -g ^ - -O2 ^ - -mbulk-memory ^ - -D__ORCA__ ^ - -isystem ..\..\src\libc-shim\include ^ - -I..\..\ext -I ..\..\src + -isystem %STDLIB_DIR%\include ^ + -I%ORCA_DIR%\src ^ + -I%ORCA_DIR%\src\ext set shaders=src/shaders/advect.glsl^ src/shaders/blit_div_fragment.glsl^ @@ -31,7 +33,7 @@ set shaders=src/shaders/advect.glsl^ call python3 ../../scripts/embed_text_files.py --prefix=glsl_ --output src/glsl_shaders.h %shaders% IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% -clang %wasmFlags% -o .\module.wasm ..\..\src\orca.c ..\..\src\libc-shim\src\*.c src\main.c +clang %wasmFlags% -o .\module.wasm %ORCA_DIR%\src\orca.c %STDLIB_DIR%\src\*.c src\main.c IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% -orca bundle --orca-dir ..\.. --icon icon.png --name Fluid module.wasm +orca bundle --orca-dir %ORCA_DIR% --name Fluid --icon icon.png module.wasm \ No newline at end of file diff --git a/samples/fluid/build.sh b/samples/fluid/build.sh index f5c1443..21e9cf2 100755 --- a/samples/fluid/build.sh +++ b/samples/fluid/build.sh @@ -12,23 +12,21 @@ else fi ORCA_DIR=../.. -STDLIB_DIR=../../src/libc-shim +STDLIB_DIR=$ORCA_DIR/src/libc-shim python3 ../../scripts/embed_text_files.py --prefix=glsl_ --output src/glsl_shaders.h src/shaders/*.glsl wasmFlags="--target=wasm32 \ --no-standard-libraries \ - -fno-builtin \ + -mbulk-memory \ + -g -O2 \ + -D__ORCA__ \ -Wl,--no-entry \ -Wl,--export-dynamic \ - -g \ - -O2 \ - -mbulk-memory \ - -D__ORCA__ \ - -I $STDLIB_DIR/include \ - -I $ORCA_DIR/ext \ - -I $ORCA_DIR/src" + -isystem $STDLIB_DIR/include \ + -I $ORCA_DIR/src \ + -I $ORCA_DIR/src/ext" -$CLANG $wasmFlags -o ./module.wasm ../../src/orca.c $STDLIB_DIR/src/*.c src/main.c +$CLANG $wasmFlags -o ./module.wasm $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c src/main.c -orca bundle --orca-dir ../.. --icon icon.png --name Fluid module.wasm +orca bundle --orca-dir $ORCA_DIR --name Fluid --icon icon.png module.wasm diff --git a/samples/triangle/build.bat b/samples/triangle/build.bat index 79de6f7..e364017 100644 --- a/samples/triangle/build.bat +++ b/samples/triangle/build.bat @@ -1,19 +1,21 @@ @echo off +set ORCA_DIR=..\.. +set STDLIB_DIR=%ORCA_DIR%\src\libc-shim + :: compile wasm module set wasmFlags=--target=wasm32^ --no-standard-libraries ^ - -fno-builtin ^ + -mbulk-memory ^ + -g -O2 ^ + -D__ORCA__ ^ -Wl,--no-entry ^ -Wl,--export-dynamic ^ - -g ^ - -O2 ^ - -mbulk-memory ^ - -D__ORCA__ ^ - -isystem ..\..\src\libc-shim\include ^ - -I..\..\ext -I ..\..\src + -isystem %STDLIB_DIR%\include ^ + -I%ORCA_DIR%\src ^ + -I%ORCA_DIR%\src\ext -clang %wasmFlags% -o .\module.wasm ..\..\src\orca.c ..\..\src\libc-shim\src\*.c src\main.c +clang %wasmFlags% -o .\module.wasm %ORCA_DIR%\src\orca.c %STDLIB_DIR%\src\*.c src\main.c IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% -orca bundle --orca-dir ..\.. --name Triangle module.wasm +orca bundle --orca-dir %ORCA_DIR% --name Triangle module.wasm diff --git a/samples/triangle/build.sh b/samples/triangle/build.sh index cc31884..cd74b6c 100755 --- a/samples/triangle/build.sh +++ b/samples/triangle/build.sh @@ -12,21 +12,19 @@ else fi ORCA_DIR=../.. -STDLIB_DIR=../../src/libc-shim +STDLIB_DIR=$ORCA_DIR/src/libc-shim wasmFlags="--target=wasm32 \ --no-standard-libraries \ - -fno-builtin \ + -mbulk-memory \ + -g -O2 \ + -D__ORCA__ \ -Wl,--no-entry \ -Wl,--export-dynamic \ - -g \ - -O2 \ - -mbulk-memory \ - -D__ORCA__ \ - -I $STDLIB_DIR/include \ - -I $ORCA_DIR/ext \ - -I $ORCA_DIR/src" + -isystem $STDLIB_DIR/include \ + -I $ORCA_DIR/src \ + -I $ORCA_DIR/src/ext" -$CLANG $wasmFlags -o ./module.wasm ../../src/orca.c ../../src/libc-shim/src/*.c src/main.c +$CLANG $wasmFlags -o ./module.wasm $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c src/main.c -orca bundle --orca-dir ../.. --name Triangle module.wasm +orca bundle --orca-dir $ORCA_DIR --name Triangle module.wasm diff --git a/samples/ui/build.bat b/samples/ui/build.bat index 3c55217..46f5011 100644 --- a/samples/ui/build.bat +++ b/samples/ui/build.bat @@ -1,19 +1,21 @@ @echo off +set ORCA_DIR=..\.. +set STDLIB_DIR=%ORCA_DIR%\src\libc-shim + :: compile wasm module set wasmFlags=--target=wasm32^ --no-standard-libraries ^ - -fno-builtin ^ + -mbulk-memory ^ + -g -O2 ^ + -D__ORCA__ ^ -Wl,--no-entry ^ -Wl,--export-dynamic ^ - -g ^ - -O2 ^ - -mbulk-memory ^ - -D__ORCA__ ^ - -isystem ..\..\src\libc-shim\include ^ - -I..\..\ext -I ..\..\src + -isystem %STDLIB_DIR%\include ^ + -I%ORCA_DIR%\src ^ + -I%ORCA_DIR%\src\ext -clang %wasmFlags% -o .\module.wasm ..\..\src\orca.c ..\..\src\libc-shim\src\*.c src\main.c +clang %wasmFlags% -o .\module.wasm %ORCA_DIR%\src\orca.c %STDLIB_DIR%\src\*.c src\main.c IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% -orca bundle --orca-dir ..\.. --name UI --resource-dir data module.wasm +orca bundle --orca-dir %ORCA_DIR% --name UI --resource-dir data module.wasm diff --git a/samples/ui/build.sh b/samples/ui/build.sh index 8aeea27..2e15876 100755 --- a/samples/ui/build.sh +++ b/samples/ui/build.sh @@ -12,21 +12,19 @@ else fi ORCA_DIR=../.. -STDLIB_DIR=../../src/libc-shim +STDLIB_DIR=$ORCA_DIR/src/libc-shim wasmFlags="--target=wasm32 \ --no-standard-libraries \ + -mbulk-memory \ + -g -O2 \ + -D__ORCA__ \ -Wl,--no-entry \ -Wl,--export-dynamic \ - -g \ - -O2 \ - -mbulk-memory \ - -D__ORCA__ \ - -I $ORCA_DIR/ext \ - -I $STDLIB_DIR/include \ - -I $ORCA_DIR/ext \ - -I $ORCA_DIR/src" + -isystem $STDLIB_DIR/include \ + -I $ORCA_DIR/src \ + -I $ORCA_DIR/src/ext" -$CLANG $wasmFlags -o ./module.wasm ../../src/orca.c $STDLIB_DIR/src/*.c src/main.c +$CLANG $wasmFlags -o ./module.wasm $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c src/main.c -orca bundle --orca-dir ../.. --name UI --resource-dir data module.wasm +orca bundle --orca-dir $ORCA_DIR --name UI --resource-dir data module.wasm diff --git a/scripts/bundle.py b/scripts/bundle.py index 44b6571..bed26f6 100644 --- a/scripts/bundle.py +++ b/scripts/bundle.py @@ -70,8 +70,8 @@ def macos_make_app(args): #----------------------------------------------------------- orca_exe = os.path.join(args.orca_dir, 'build/bin/orca_runtime') orca_lib = os.path.join(args.orca_dir, 'build/bin/liborca.dylib') - gles_lib = os.path.join(args.orca_dir, 'ext/angle/bin/libGLESv2.dylib') - egl_lib = os.path.join(args.orca_dir, 'ext/angle/bin/libEGL.dylib') + gles_lib = os.path.join(args.orca_dir, 'src/ext/angle/bin/libGLESv2.dylib') + egl_lib = os.path.join(args.orca_dir, 'src/ext/angle/bin/libEGL.dylib') renderer_lib = os.path.join(args.orca_dir, 'build/bin/mtl_renderer.metallib') shutil.copy(orca_exe, exe_dir) diff --git a/scripts/checksums.json b/scripts/checksums.json index 06dceb2..9520e90 100644 --- a/scripts/checksums.json +++ b/scripts/checksums.json @@ -1,10 +1,10 @@ { "scripts/files/angle-windows-2019-2023-07-05.zip": "a333b5ccc8462151ee8df65c43cfacd70d9db2413f2e495da65670737b5b2d96", "scripts/files/angle-macos-jank-2023-07-05.zip": "c234b8db179a24757ab9f46610a032123718dd9bed967d2bf8e27d0d17eb0aff", - "ext/angle/bin/libEGL.dll": "b7bf51f83e88129ddc20c0c2cb904ec04c89059a30a2cd29b9b1ea11c80388fb", - "ext/angle/lib/libEGL.dll.lib": "4cec54c534136da413dea86bd271ccb9c5ae88e40aa91d1de7a01e701be8e1d7", - "ext/angle/bin/libGLESv2.dll": "193b53b0a16b702eaa28a73e84527acf7aecfd665e3e3f54a8d9db9ae73111e1", - "ext/angle/lib/libGLESv2.dll.lib": "ee87aac129efe8fe871825d181b85da1b1ea6626cb48be52c2e689f2804b953f", - "ext/angle/bin/libEGL.dylib": "96baea4b1c8578d30738764784d07b509d1153df694c094faba2ee8ccbfde2a9", - "ext/angle/bin/libGLESv2.dylib": "98ce9f6248a6447ba9199e96b8f6d87df9548d43ce583a2615717aab168ecb71" -} + "src/ext/angle/bin/libEGL.dll": "b7bf51f83e88129ddc20c0c2cb904ec04c89059a30a2cd29b9b1ea11c80388fb", + "src/ext/angle/lib/libEGL.dll.lib": "4cec54c534136da413dea86bd271ccb9c5ae88e40aa91d1de7a01e701be8e1d7", + "src/ext/angle/bin/libGLESv2.dll": "193b53b0a16b702eaa28a73e84527acf7aecfd665e3e3f54a8d9db9ae73111e1", + "src/ext/angle/lib/libGLESv2.dll.lib": "ee87aac129efe8fe871825d181b85da1b1ea6626cb48be52c2e689f2804b953f", + "src/ext/angle/bin/libEGL.dylib": "96baea4b1c8578d30738764784d07b509d1153df694c094faba2ee8ccbfde2a9", + "src/ext/angle/bin/libGLESv2.dylib": "98ce9f6248a6447ba9199e96b8f6d87df9548d43ce583a2615717aab168ecb71" +} \ No newline at end of file diff --git a/scripts/dev.py b/scripts/dev.py index 889d821..246921b 100644 --- a/scripts/dev.py +++ b/scripts/dev.py @@ -1,4 +1,3 @@ -from datetime import datetime import glob import os import platform @@ -11,14 +10,15 @@ from . import checksum from .bindgen import bindgen from .gles_gen import gles_gen from .log import * -from .utils import pushd, removeall +from .utils import pushd, removeall, yeetdir, yeetfile from .embed_text_files import * +from .version import check_if_source, is_orca_source, orca_version ANGLE_VERSION = "2023-07-05" def attach_dev_commands(subparsers): - dev_cmd = subparsers.add_parser("dev", help="Commands for building Orca itself. Must be run from the root of an Orca source checkout.") + dev_cmd = subparsers.add_parser("dev", help="Commands for building Orca itself. Must be run from within an Orca source checkout.") dev_cmd.set_defaults(func=orca_source_only) dev_sub = dev_cmd.add_subparsers(required=is_orca_source(), title='commands') @@ -38,38 +38,6 @@ def attach_dev_commands(subparsers): uninstall_cmd.set_defaults(func=dev_shellish(uninstall)) -# Checks if the Orca tool should use a source checkout of Orca instead of a system install. -# This is copy-pasted to the command-line tool so it can work before loading anything. -# -# Returns: (use source, source directory, is actually the source's tool) -def check_if_source(): - def path_is_in_orca_source(path): - dir = path - while True: - try: - os.stat(os.path.join(dir, ".orcaroot")) - return (True, dir) - except FileNotFoundError: - pass - - newdir = os.path.dirname(dir) - if newdir == dir: # TODO: Verify on Windows (it will probably not work) - return (False, None) - dir = newdir - - in_source, current_source_dir = path_is_in_orca_source(os.getcwd()) - script_is_source, script_source_dir = path_is_in_orca_source(os.path.dirname(os.path.abspath(__file__))) - - use_source = in_source or script_is_source - source_dir = current_source_dir or script_source_dir - return (use_source, source_dir, script_is_source) - - -def is_orca_source(): - use_source, _, _ = check_if_source() - return use_source - - def orca_source_only(args): print("The Orca dev commands can only be run from an Orca source checkout.") print() @@ -99,10 +67,10 @@ def build_runtime(args): def clean(args): - yeet("build") - yeet("ext/angle") - yeet("scripts/files") - yeet("scripts/__pycache__") + yeetdir("build") + yeetdir("src/ext/angle") + yeetdir("scripts/files") + yeetdir("scripts/__pycache__") def build_platform_layer(target, release): @@ -145,8 +113,8 @@ def build_platform_layer_lib_win(release): includes = [ "/I", "src", - "/I", "ext", - "/I", "ext/angle/include", + "/I", "src/ext", + "/I", "src/ext/angle/include", ] libs = [ "user32.lib", @@ -161,7 +129,7 @@ def build_platform_layer_lib_win(release): "shlwapi.lib", "dxgi.lib", "dxguid.lib", - "/LIBPATH:ext/angle/lib", + "/LIBPATH:src/ext/angle/lib", "libEGL.dll.lib", "libGLESv2.dll.lib", "/DELAYLOAD:libEGL.dll", @@ -189,7 +157,7 @@ def build_platform_layer_lib_mac(release): cflags = ["-std=c11"] debug_flags = ["-O3"] if release else ["-g", "-DOC_DEBUG", "-DOC_LOG_COMPILE_DEBUG"] ldflags = [f"-L{sdk_dir}/usr/lib", f"-F{sdk_dir}/System/Library/Frameworks/"] - includes = ["-Isrc", "-Isrc/util", "-Isrc/platform", "-Iext", "-Iext/angle/include"] + includes = ["-Isrc", "-Isrc/util", "-Isrc/platform", "-Isrc/ext", "-Isrc/ext/angle/include"] # compile metal shader subprocess.run([ @@ -228,7 +196,7 @@ def build_platform_layer_lib_mac(release): *ldflags, "-dylib", "-o", "build/bin/liborca.dylib", "build/orca_c.o", "build/orca_objc.o", - "-Lext/angle/bin", "-lc", + "-Lsrc/ext/angle/bin", "-lc", "-framework", "Carbon", "-framework", "Cocoa", "-framework", "Metal", "-framework", "QuartzCore", "-weak-lEGL", "-weak-lGLESv2", ], check=True) @@ -271,14 +239,14 @@ def build_wasm3(release): def build_wasm3_lib_win(release): - for f in glob.iglob("./ext/wasm3/source/*.c"): + for f in glob.iglob("./src/ext/wasm3/source/*.c"): name = os.path.splitext(os.path.basename(f))[0] subprocess.run([ "cl", "/nologo", "/Zi", "/Zc:preprocessor", "/c", "/O2", f"/Fo:build/obj/{name}.obj", - "/I", "./ext/wasm3/source", + "/I", "./src/ext/wasm3/source", f, ], check=True) subprocess.run([ @@ -288,7 +256,7 @@ def build_wasm3_lib_win(release): def build_wasm3_lib_mac(release): - includes = ["-Iext/wasm3/source"] + includes = ["-Isrc/ext/wasm3/source"] debug_flags = ["-g", "-O2"] flags = [ *debug_flags, @@ -297,7 +265,7 @@ def build_wasm3_lib_mac(release): "-Dd_m3VerboseErrorMessages", ] - for f in glob.iglob("ext/wasm3/source/*.c"): + for f in glob.iglob("src/ext/wasm3/source/*.c"): name = os.path.splitext(os.path.basename(f))[0] + ".o" subprocess.run([ "clang", "-c", *flags, *includes, @@ -330,9 +298,9 @@ def build_orca_win(release): # compile orca includes = [ "/I", "src", - "/I", "ext", - "/I", "ext/angle/include", - "/I", "ext/wasm3/source", + "/I", "src/ext", + "/I", "src/ext/angle/include", + "/I", "src/ext/wasm3/source", ] libs = [ "/LIBPATH:build/bin", @@ -355,9 +323,9 @@ def build_orca_mac(release): includes = [ "-Isrc", - "-Iext", - "-Iext/angle/include", - "-Iext/wasm3/source" + "-Isrc/ext", + "-Isrc/ext/angle/include", + "-Isrc/ext/wasm3/source" ] libs = ["-Lbuild/bin", "-Lbuild/lib", "-lorca", "-lwasm3"] debug_flags = ["-O2"] if release else ["-g", "-DOC_DEBUG -DOC_LOG_COMPILE_DEBUG"] @@ -390,7 +358,7 @@ def build_orca_mac(release): def gen_all_bindings(): - gles_gen("ext/gl.xml", + gles_gen("src/ext/gl.xml", "src/wasmbind/gles_api.json", "src/graphics/orca_gl31.h" ) @@ -459,15 +427,15 @@ def verify_angle(): checkfiles = None if platform.system() == "Windows": checkfiles = [ - "ext/angle/bin/libEGL.dll", - "ext/angle/lib/libEGL.dll.lib", - "ext/angle/bin/libGLESv2.dll", - "ext/angle/lib/libGLESv2.dll.lib", + "src/ext/angle/bin/libEGL.dll", + "src/ext/angle/lib/libEGL.dll.lib", + "src/ext/angle/bin/libGLESv2.dll", + "src/ext/angle/lib/libGLESv2.dll.lib", ] elif platform.system() == "Darwin": checkfiles = [ - "ext/angle/bin/libEGL.dylib", - "ext/angle/bin/libGLESv2.dylib", + "src/ext/angle/bin/libEGL.dylib", + "src/ext/angle/bin/libGLESv2.dylib", ] if checkfiles is None: @@ -512,11 +480,7 @@ def download_angle(): with ZipFile(filepath, "r") as anglezip: anglezip.extractall(path="scripts/files") - shutil.copytree(f"scripts/files/angle/", "ext/angle", dirs_exist_ok=True) - -def yeet(path): - os.makedirs(path, exist_ok=True) - shutil.rmtree(path) + shutil.copytree(f"scripts/files/angle/", "src/ext/angle", dirs_exist_ok=True) def prompt(msg): @@ -529,29 +493,40 @@ def prompt(msg): else: print("Please enter \"yes\" or \"no\" and press return.") - -def install_path(): +def install_dir(): if platform.system() == "Windows": - orca_dir = os.path.join(os.getenv("LOCALAPPDATA"), "orca") + return os.path.join(os.getenv("LOCALAPPDATA"), "orca") else: - orca_dir = os.path.expanduser(os.path.join("~", ".orca")) - - bin_dir = os.path.join(orca_dir, "bin") - - return (orca_dir, bin_dir) + return os.path.expanduser(os.path.join("~", ".orca")) def install(args): - dest, bin_dir = install_path() + dest = install_dir() + bin_dir = os.path.join(dest, "bin") + src_dir = os.path.join(dest, "src") + version_file = os.path.join(dest, ".orcaversion") + + version = orca_version() + existing_version = None + try: + with open(version_file, "r") as f: + existing_version = f.read().strip() + except FileNotFoundError: + pass if not args.no_confirm: - print("The Orca command-line tools will be installed to:") + print(f"The Orca command-line tools (version {version}) will be installed to:") print(dest) print() + if existing_version is not None: + print(f"This will overwrite version {existing_version}.") + print() if not prompt("Proceed with the installation?"): return - yeet(bin_dir) + yeetdir(bin_dir) + yeetdir(src_dir) + yeetfile(version_file) # The MS Store version of Python does some really stupid stuff with AppData: # https://git.handmade.network/hmn/orca/issues/32 @@ -562,14 +537,19 @@ def install(args): # paths we need, the following scripts work regardless of Python install. # # Also apparently you can't just do mkdir in a subprocess call here, hence the - # trivial batch script. + # trivial batch scripts. if platform.system() == "Windows": subprocess.run(["scripts\\mkdir.bat", bin_dir], check=True) + subprocess.run(["scripts\\mkdir.bat", src_dir], check=True) + subprocess.run(["scripts\\touch.bat", version_file], check=True) shutil.copytree("scripts", os.path.join(bin_dir, "sys_scripts")) shutil.copy("orca", bin_dir) + shutil.copytree("src", src_dir, dirs_exist_ok=True) if platform.system() == "Windows": shutil.copy("orca.bat", bin_dir) + with open(version_file, "w") as f: + f.write(version) print() if platform.system() == "Windows": @@ -582,7 +562,7 @@ def install(args): print("Orca has been added to your PATH. Restart any open terminals to use it.") else: print("No worries. You can manually add Orca to your PATH in the Windows settings") - print("this in the Windows settings by searching for \"environment variables\".") + print("by searching for \"environment variables\".") else: print("The Orca tools have been installed. Make sure the Orca tools are on your PATH by") print("adding the following to your shell config:") diff --git a/scripts/orca.py b/scripts/orca.py index f161b05..6b67877 100644 --- a/scripts/orca.py +++ b/scripts/orca.py @@ -1,15 +1,28 @@ #!/usr/bin/env python3 import argparse +import sys from .bundle import attach_bundle_commands +from .source import attach_source_commands from .dev import attach_dev_commands +from .version import attach_version_command parser = argparse.ArgumentParser() +parser.add_argument("-?", action="help", help=argparse.SUPPRESS) -subparsers = parser.add_subparsers(required=True, title='commands') +subparsers = parser.add_subparsers(required=True, title="commands") attach_bundle_commands(subparsers) +attach_source_commands(subparsers) attach_dev_commands(subparsers) +attach_version_command(subparsers) -args = parser.parse_args() +# Hack to run the actual version command if we pass -v or --version. +# Using argparse action="version" requires us to pass a single string +# and doesn't allow us to run our own custom version-printing function. +argv = sys.argv[1:] +if argv[0] in ["-v", "--version"]: + argv = ["version"] + +args = parser.parse_args(argv) args.func(args) diff --git a/scripts/source.py b/scripts/source.py new file mode 100644 index 0000000..5266cb4 --- /dev/null +++ b/scripts/source.py @@ -0,0 +1,189 @@ +import hashlib +import json +import os +import re +import shutil + +from .log import * +from .utils import yeetdir +from .version import src_dir, orca_version + + +def attach_source_commands(subparsers): + source_cmd = subparsers.add_parser("source", help="Commands for helping compile the Orca source code into your project.") + source_sub = source_cmd.add_subparsers(title="commands") + + cflags_cmd = source_sub.add_parser("cflags", help="Get help setting up a C or C++ compiler to compile the Orca source.") + cflags_cmd.add_argument("srcdir", nargs="?", default=src_dir(), help="the directory containing the Orca source code (defaults to system installation)") + cflags_cmd.set_defaults(func=shellish(cflags)) + + vendor_cmd = source_sub.add_parser("vendor", help="Copy the Orca source code into your project.") + vendor_cmd.add_argument("dir", type=str, help="the directory into which the Orca source code will be copied") + vendor_cmd.set_defaults(func=shellish(vendor)) + + +def vendor(args): + # Verify that we are ok to vendor into the requested dir. + if os.path.exists(args.dir): + try: + with open(vendor_file_path(args.dir), "r") as f: + vendor_info = json.load(f) + version = vendor_info["version"] + print(f"Orca version {version} is currently installed in that directory.") + + if vendor_checksum(args.dir) != vendor_info["checksum"]: + log_error(f"The contents of your vendor directory have been modified. This command will exit to avoid overwriting any local changes. To proceed, manually delete {args.dir} and try again.") + exit(1) + except FileNotFoundError: + if len(os.listdir(args.dir)) > 0: + log_error(f"The requested directory already exists and does not appear to contain Orca source code. To avoid deleting anything important, please either provide the correct path or manually empty {args.dir} first.") + exit(1) + + yeetdir(args.dir) + shutil.copytree(src_dir(), args.dir) + with open(vendor_file_path(args.dir), "w") as f: + json.dump({ + "version": orca_version(), + "checksum": vendor_checksum(args.dir), + }, f, indent=2) + print(f"Version {orca_version()} of the Orca source code has been copied to {args.dir}.") + + +def vendor_file_path(vendor_dir): + return os.path.join(vendor_dir, ".orcavendor") + + +def vendor_checksum(dir): + return dirhash(dir, excluded_extensions=["orcavendor"]) + + +def cflags(args): + if not os.path.exists(os.path.join(args.srcdir, "orca.h")): + log_error(f"The provided path does not seem to contain the Orca source code: {args.srcdir}") + exit(1) + + def path_contains(a, b): + a_abs = os.path.abspath(a) + b_abs = os.path.abspath(b) + return os.path.commonpath([a_abs, b_abs]) == a_abs + + def nicepath(path): + path_abs = os.path.abspath(path) + if path_contains(os.getcwd(), path_abs): + return os.path.relpath(path_abs) + else: + return path_abs + + include = nicepath(args.srcdir) + orcac = nicepath(os.path.join(args.srcdir, "orca.c")) + extinclude = nicepath(os.path.join(args.srcdir, "ext")) + sysinclude = nicepath(os.path.join(args.srcdir, "libc-shim/include")) + libcsource = nicepath(os.path.join(args.srcdir, "libc-shim/src/*.c")) + + print("To compile Orca as part of your C or C++ project, you must:") + print(f"> Put the following directory on your SYSTEM include search path:") + print(f" {sysinclude}") + print(f"> Put the following directories on your include search path:") + print(f" {include}") + print(f" {extinclude}") + print(f"> Compile the following file as a single translation unit:") + print(f" {orcac}") + print(f"> Compile the following files as separate translation units:") + print(f" {libcsource}") + print() + print("The following clang flags are also required:") + print("> --target=wasm32 (to compile to wasm)") + print("> --no-standard-libraries (to use only our libc shim)") + print("> -mbulk-memory (to enable memset/memcpy intrinsics, which are required)") + print("> -D__ORCA__ (to signal that the Orca source code is being compiled to run on Orca itself)") + print("> -Wl,--no-entry (to prevent wasm-ld from looking for a _start symbol)") + print("> -Wl,--export-dynamic (to expose your module's functions to Orca)") + print() + print("And the following clang flags are recommended:") + print("> -g -O2 (to compile with optimizations and debug info)") + print() + print("Complete clang example:") + print() + print(f"clang --target=wasm32 --no-standard-libraries -mbulk-memory -g -O2 -D__ORCA__ -Wl,--no-entry -Wl,--export-dynamic -isystem {sysinclude} -I {include} -I {extinclude} {orcac} {libcsource} your-main.c") + print() + if not path_contains(os.getcwd(), args.srcdir): + print("If these paths look crazy to you, consider vendoring the source code into your") + print("project using `orca source vendor`.") + print() + + +# ----------------------------------------------------------------------------- +# Directory-hashing implementation pulled from the checksumdir package on pypi. +# Licensed under the MIT license. +# ----------------------------------------------------------------------------- + +def dirhash( + dirname, + hash_func=hashlib.sha1, + excluded_files=None, + ignore_hidden=False, + followlinks=False, + excluded_extensions=None, + include_paths=False +): + if not excluded_files: + excluded_files = [] + + if not excluded_extensions: + excluded_extensions = [] + + if not os.path.isdir(dirname): + raise TypeError("{} is not a directory.".format(dirname)) + + hashvalues = [] + for root, dirs, files in os.walk(dirname, topdown=True, followlinks=followlinks): + if ignore_hidden and re.search(r"/\.", root): + continue + + dirs.sort() + files.sort() + + for fname in files: + if ignore_hidden and fname.startswith("."): + continue + + if fname.split(".")[-1:][0] in excluded_extensions: + continue + + if fname in excluded_files: + continue + + hashvalues.append(_filehash(os.path.join(root, fname), hash_func)) + + if include_paths: + hasher = hash_func() + # get the resulting relative path into array of elements + path_list = os.path.relpath(os.path.join(root, fname)).split(os.sep) + # compute the hash on joined list, removes all os specific separators + hasher.update(''.join(path_list).encode('utf-8')) + hashvalues.append(hasher.hexdigest()) + + return _reduce_hash(hashvalues, hash_func) + + +def _filehash(filepath, hashfunc): + hasher = hashfunc() + blocksize = 64 * 1024 + + if not os.path.exists(filepath): + return hasher.hexdigest() + + with open(filepath, "rb") as fp: + while True: + data = fp.read(blocksize) + if not data: + break + hasher.update(data) + return hasher.hexdigest() + + +def _reduce_hash(hashlist, hashfunc): + hasher = hashfunc() + for hashvalue in sorted(hashlist): + hasher.update(hashvalue.encode("utf-8")) + return hasher.hexdigest() diff --git a/scripts/touch.bat b/scripts/touch.bat new file mode 100644 index 0000000..ca7d42a --- /dev/null +++ b/scripts/touch.bat @@ -0,0 +1,3 @@ +@echo off +type nul > %1 +exit /b %errorlevel% diff --git a/scripts/utils.py b/scripts/utils.py index 72483dc..23f64e0 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -1,7 +1,6 @@ import glob import os -import subprocess -import traceback +import shutil from contextlib import contextmanager @@ -18,3 +17,13 @@ def pushd(new_dir): def removeall(dir): [os.remove(f) for f in glob.iglob("{}/*".format(dir), recursive=True)] os.removedirs(dir) + + +def yeetdir(path): + os.makedirs(path, exist_ok=True) + shutil.rmtree(path) + + +def yeetfile(path): + if os.path.exists(path): + os.remove(path) diff --git a/scripts/version.py b/scripts/version.py new file mode 100644 index 0000000..e811730 --- /dev/null +++ b/scripts/version.py @@ -0,0 +1,95 @@ +import os +import subprocess +import sys + +from .log import * +from .utils import pushd + + +# Checks if the Orca tool should use a source checkout of Orca instead of a system install. +# This is copy-pasted to the command-line tool so it can work before loading anything. +# +# Returns: (use source, source directory, is actually the source's tool) +def check_if_source(): + def path_is_in_orca_source(path): + dir = path + while True: + try: + os.stat(os.path.join(dir, ".orcaroot")) + return (True, dir) + except FileNotFoundError: + pass + + newdir = os.path.dirname(dir) + if newdir == dir: + return (False, None) + dir = newdir + + in_source, current_source_dir = path_is_in_orca_source(os.getcwd()) + script_is_source, script_source_dir = path_is_in_orca_source(os.path.dirname(os.path.abspath(__file__))) + + use_source = in_source or script_is_source + source_dir = current_source_dir or script_source_dir + return (use_source, source_dir, script_is_source) + + +def is_orca_source(): + use_source, _, _ = check_if_source() + return use_source + + +def actual_install_dir(): + # The path adjustment in here is technically sort of fragile because it depends + # on the current location of this actual file. But oh well. + if is_orca_source(): + raise Exception("actual_install_dir should not be called when using the source version of the Orca tools") + return os.path.normpath(os.path.join(os.path.abspath(__file__), "../../..")) + + +def src_dir(): + # More fragile path adjustments! Yay! + if is_orca_source(): + return os.path.normpath(os.path.join(os.path.abspath(__file__), "../../src")) + else: + return os.path.normpath(os.path.join(os.path.abspath(__file__), "../../../src")) + + +def orca_version(): + is_source, source_dir, _ = check_if_source() + if is_source: + with pushd(source_dir): + version = "unknown" + if os.path.exists(".git"): + try: + res = subprocess.run(["git", "rev-parse", "--short", "HEAD"], check=True, capture_output=True, text=True) + version = res.stdout.strip() + except subprocess.CalledProcessError: + log_warning("failed to look up current git hash for version number") + return f"dev-{version}" + else: + try: + with open(os.path.join(actual_install_dir(), ".orcaversion"), "r") as f: + version = f.read().strip() + return version + except FileNotFoundError: + return "dev-unknown" + + +def attach_version_command(subparsers): + version_cmd = subparsers.add_parser("version", help="Print the current Orca version.") + version_cmd.set_defaults(func=print_orca_version) + + +def print_orca_version(args): + use_source, source_dir, _ = check_if_source() + + # This function prints the bare version number to stdout and everything else + # to stderr. This makes it easy to use the version number in shell pipelines + # without requiring extra flags or parsing a weird output format. + sys.stdout.write(orca_version() + "\n") + if use_source: + sys.stderr.write(f"Orca is running from a source checkout.\n") + sys.stderr.write(f"Source dir: {source_dir}\n") + else: + sys.stderr.write(f"Orca is running from a system installation.\n") + sys.stderr.write(f"Install dir: {actual_install_dir()}\n") diff --git a/ext/.clang-format b/src/ext/.clang-format similarity index 100% rename from ext/.clang-format rename to src/ext/.clang-format diff --git a/ext/GL/glcorearb.h b/src/ext/GL/glcorearb.h similarity index 100% rename from ext/GL/glcorearb.h rename to src/ext/GL/glcorearb.h diff --git a/ext/GL/glext.h b/src/ext/GL/glext.h similarity index 100% rename from ext/GL/glext.h rename to src/ext/GL/glext.h diff --git a/ext/GL/wglext.h b/src/ext/GL/wglext.h similarity index 100% rename from ext/GL/wglext.h rename to src/ext/GL/wglext.h diff --git a/ext/KHR/khrplatform.h b/src/ext/KHR/khrplatform.h similarity index 100% rename from ext/KHR/khrplatform.h rename to src/ext/KHR/khrplatform.h diff --git a/ext/gl.xml b/src/ext/gl.xml similarity index 100% rename from ext/gl.xml rename to src/ext/gl.xml diff --git a/ext/stb/stb_image.h b/src/ext/stb/stb_image.h similarity index 100% rename from ext/stb/stb_image.h rename to src/ext/stb/stb_image.h diff --git a/ext/stb/stb_sprintf.h b/src/ext/stb/stb_sprintf.h similarity index 100% rename from ext/stb/stb_sprintf.h rename to src/ext/stb/stb_sprintf.h diff --git a/ext/stb/stb_truetype.h b/src/ext/stb/stb_truetype.h similarity index 100% rename from ext/stb/stb_truetype.h rename to src/ext/stb/stb_truetype.h diff --git a/ext/wasm3/.codespellrc b/src/ext/wasm3/.codespellrc similarity index 100% rename from ext/wasm3/.codespellrc rename to src/ext/wasm3/.codespellrc diff --git a/ext/wasm3/.github/workflows/publish.yml b/src/ext/wasm3/.github/workflows/publish.yml similarity index 100% rename from ext/wasm3/.github/workflows/publish.yml rename to src/ext/wasm3/.github/workflows/publish.yml diff --git a/ext/wasm3/.github/workflows/tests.yml b/src/ext/wasm3/.github/workflows/tests.yml similarity index 100% rename from ext/wasm3/.github/workflows/tests.yml rename to src/ext/wasm3/.github/workflows/tests.yml diff --git a/ext/wasm3/.gitignore b/src/ext/wasm3/.gitignore similarity index 100% rename from ext/wasm3/.gitignore rename to src/ext/wasm3/.gitignore diff --git a/ext/wasm3/CMakeLists.txt b/src/ext/wasm3/CMakeLists.txt similarity index 100% rename from ext/wasm3/CMakeLists.txt rename to src/ext/wasm3/CMakeLists.txt diff --git a/ext/wasm3/LICENSE b/src/ext/wasm3/LICENSE similarity index 100% rename from ext/wasm3/LICENSE rename to src/ext/wasm3/LICENSE diff --git a/ext/wasm3/README.md b/src/ext/wasm3/README.md similarity index 100% rename from ext/wasm3/README.md rename to src/ext/wasm3/README.md diff --git a/ext/wasm3/docs/Cookbook.md b/src/ext/wasm3/docs/Cookbook.md similarity index 100% rename from ext/wasm3/docs/Cookbook.md rename to src/ext/wasm3/docs/Cookbook.md diff --git a/ext/wasm3/docs/Demos.md b/src/ext/wasm3/docs/Demos.md similarity index 100% rename from ext/wasm3/docs/Demos.md rename to src/ext/wasm3/docs/Demos.md diff --git a/ext/wasm3/docs/Development.md b/src/ext/wasm3/docs/Development.md similarity index 100% rename from ext/wasm3/docs/Development.md rename to src/ext/wasm3/docs/Development.md diff --git a/ext/wasm3/docs/Diagnostics.md b/src/ext/wasm3/docs/Diagnostics.md similarity index 100% rename from ext/wasm3/docs/Diagnostics.md rename to src/ext/wasm3/docs/Diagnostics.md diff --git a/ext/wasm3/docs/Hardware.md b/src/ext/wasm3/docs/Hardware.md similarity index 100% rename from ext/wasm3/docs/Hardware.md rename to src/ext/wasm3/docs/Hardware.md diff --git a/ext/wasm3/docs/Installation.md b/src/ext/wasm3/docs/Installation.md similarity index 100% rename from ext/wasm3/docs/Installation.md rename to src/ext/wasm3/docs/Installation.md diff --git a/ext/wasm3/docs/Interpreter.md b/src/ext/wasm3/docs/Interpreter.md similarity index 100% rename from ext/wasm3/docs/Interpreter.md rename to src/ext/wasm3/docs/Interpreter.md diff --git a/ext/wasm3/docs/Performance.md b/src/ext/wasm3/docs/Performance.md similarity index 100% rename from ext/wasm3/docs/Performance.md rename to src/ext/wasm3/docs/Performance.md diff --git a/ext/wasm3/docs/Testing.md b/src/ext/wasm3/docs/Testing.md similarity index 100% rename from ext/wasm3/docs/Testing.md rename to src/ext/wasm3/docs/Testing.md diff --git a/ext/wasm3/docs/Troubleshooting.md b/src/ext/wasm3/docs/Troubleshooting.md similarity index 100% rename from ext/wasm3/docs/Troubleshooting.md rename to src/ext/wasm3/docs/Troubleshooting.md diff --git a/ext/wasm3/extra/blynk.png b/src/ext/wasm3/extra/blynk.png similarity index 100% rename from ext/wasm3/extra/blynk.png rename to src/ext/wasm3/extra/blynk.png diff --git a/ext/wasm3/extra/button.png b/src/ext/wasm3/extra/button.png similarity index 100% rename from ext/wasm3/extra/button.png rename to src/ext/wasm3/extra/button.png diff --git a/ext/wasm3/extra/disasm-func.sh b/src/ext/wasm3/extra/disasm-func.sh similarity index 100% rename from ext/wasm3/extra/disasm-func.sh rename to src/ext/wasm3/extra/disasm-func.sh diff --git a/ext/wasm3/extra/iden3.svg b/src/ext/wasm3/extra/iden3.svg similarity index 100% rename from ext/wasm3/extra/iden3.svg rename to src/ext/wasm3/extra/iden3.svg diff --git a/ext/wasm3/extra/logo.png b/src/ext/wasm3/extra/logo.png similarity index 100% rename from ext/wasm3/extra/logo.png rename to src/ext/wasm3/extra/logo.png diff --git a/ext/wasm3/extra/scailable.png b/src/ext/wasm3/extra/scailable.png similarity index 100% rename from ext/wasm3/extra/scailable.png rename to src/ext/wasm3/extra/scailable.png diff --git a/ext/wasm3/extra/screenshot-android.png b/src/ext/wasm3/extra/screenshot-android.png similarity index 100% rename from ext/wasm3/extra/screenshot-android.png rename to src/ext/wasm3/extra/screenshot-android.png diff --git a/ext/wasm3/extra/screenshot-ios.png b/src/ext/wasm3/extra/screenshot-ios.png similarity index 100% rename from ext/wasm3/extra/screenshot-ios.png rename to src/ext/wasm3/extra/screenshot-ios.png diff --git a/ext/wasm3/extra/shareup_app.svg b/src/ext/wasm3/extra/shareup_app.svg similarity index 100% rename from ext/wasm3/extra/shareup_app.svg rename to src/ext/wasm3/extra/shareup_app.svg diff --git a/ext/wasm3/extra/testutils.py b/src/ext/wasm3/extra/testutils.py similarity index 100% rename from ext/wasm3/extra/testutils.py rename to src/ext/wasm3/extra/testutils.py diff --git a/ext/wasm3/extra/utils.mk b/src/ext/wasm3/extra/utils.mk similarity index 100% rename from ext/wasm3/extra/utils.mk rename to src/ext/wasm3/extra/utils.mk diff --git a/ext/wasm3/extra/wapm-package/README.md b/src/ext/wasm3/extra/wapm-package/README.md similarity index 100% rename from ext/wasm3/extra/wapm-package/README.md rename to src/ext/wasm3/extra/wapm-package/README.md diff --git a/ext/wasm3/extra/wapm-package/wapm.toml b/src/ext/wasm3/extra/wapm-package/wapm.toml similarity index 100% rename from ext/wasm3/extra/wapm-package/wapm.toml rename to src/ext/wasm3/extra/wapm-package/wapm.toml diff --git a/ext/wasm3/extra/wasm-symbol.svg b/src/ext/wasm3/extra/wasm-symbol.svg similarity index 100% rename from ext/wasm3/extra/wasm-symbol.svg rename to src/ext/wasm3/extra/wasm-symbol.svg diff --git a/ext/wasm3/extra/wowcube.png b/src/ext/wasm3/extra/wowcube.png similarity index 100% rename from ext/wasm3/extra/wowcube.png rename to src/ext/wasm3/extra/wowcube.png diff --git a/ext/wasm3/platforms/android/.gitignore b/src/ext/wasm3/platforms/android/.gitignore similarity index 100% rename from ext/wasm3/platforms/android/.gitignore rename to src/ext/wasm3/platforms/android/.gitignore diff --git a/ext/wasm3/platforms/android/README.md b/src/ext/wasm3/platforms/android/README.md similarity index 100% rename from ext/wasm3/platforms/android/README.md rename to src/ext/wasm3/platforms/android/README.md diff --git a/ext/wasm3/platforms/android/app/build.gradle b/src/ext/wasm3/platforms/android/app/build.gradle similarity index 100% rename from ext/wasm3/platforms/android/app/build.gradle rename to src/ext/wasm3/platforms/android/app/build.gradle diff --git a/ext/wasm3/platforms/android/app/proguard-rules.pro b/src/ext/wasm3/platforms/android/app/proguard-rules.pro similarity index 100% rename from ext/wasm3/platforms/android/app/proguard-rules.pro rename to src/ext/wasm3/platforms/android/app/proguard-rules.pro diff --git a/ext/wasm3/platforms/android/app/src/main/AndroidManifest.xml b/src/ext/wasm3/platforms/android/app/src/main/AndroidManifest.xml similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/AndroidManifest.xml rename to src/ext/wasm3/platforms/android/app/src/main/AndroidManifest.xml diff --git a/ext/wasm3/platforms/android/app/src/main/cpp/CMakeLists.txt b/src/ext/wasm3/platforms/android/app/src/main/cpp/CMakeLists.txt similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/cpp/CMakeLists.txt rename to src/ext/wasm3/platforms/android/app/src/main/cpp/CMakeLists.txt diff --git a/ext/wasm3/platforms/android/app/src/main/cpp/jni.c b/src/ext/wasm3/platforms/android/app/src/main/cpp/jni.c similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/cpp/jni.c rename to src/ext/wasm3/platforms/android/app/src/main/cpp/jni.c diff --git a/ext/wasm3/platforms/android/app/src/main/cpp/m3 b/src/ext/wasm3/platforms/android/app/src/main/cpp/m3 similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/cpp/m3 rename to src/ext/wasm3/platforms/android/app/src/main/cpp/m3 diff --git a/ext/wasm3/platforms/android/app/src/main/cpp/main.c b/src/ext/wasm3/platforms/android/app/src/main/cpp/main.c similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/cpp/main.c rename to src/ext/wasm3/platforms/android/app/src/main/cpp/main.c diff --git a/ext/wasm3/platforms/android/app/src/main/java/com/example/wasm3/MainActivity.java b/src/ext/wasm3/platforms/android/app/src/main/java/com/example/wasm3/MainActivity.java similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/java/com/example/wasm3/MainActivity.java rename to src/ext/wasm3/platforms/android/app/src/main/java/com/example/wasm3/MainActivity.java diff --git a/ext/wasm3/platforms/android/app/src/main/res/drawable/ic_launcher.png b/src/ext/wasm3/platforms/android/app/src/main/res/drawable/ic_launcher.png similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/drawable/ic_launcher.png rename to src/ext/wasm3/platforms/android/app/src/main/res/drawable/ic_launcher.png diff --git a/ext/wasm3/platforms/android/app/src/main/res/layout/activity_main.xml b/src/ext/wasm3/platforms/android/app/src/main/res/layout/activity_main.xml similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/layout/activity_main.xml rename to src/ext/wasm3/platforms/android/app/src/main/res/layout/activity_main.xml diff --git a/ext/wasm3/platforms/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/src/ext/wasm3/platforms/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to src/ext/wasm3/platforms/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/ext/wasm3/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/src/ext/wasm3/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to src/ext/wasm3/platforms/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/ext/wasm3/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/src/ext/wasm3/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to src/ext/wasm3/platforms/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/ext/wasm3/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/src/ext/wasm3/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to src/ext/wasm3/platforms/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/ext/wasm3/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/src/ext/wasm3/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to src/ext/wasm3/platforms/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/ext/wasm3/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/src/ext/wasm3/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to src/ext/wasm3/platforms/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/ext/wasm3/platforms/android/app/src/main/res/values-w820dp/dimens.xml b/src/ext/wasm3/platforms/android/app/src/main/res/values-w820dp/dimens.xml similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/values-w820dp/dimens.xml rename to src/ext/wasm3/platforms/android/app/src/main/res/values-w820dp/dimens.xml diff --git a/ext/wasm3/platforms/android/app/src/main/res/values/colors.xml b/src/ext/wasm3/platforms/android/app/src/main/res/values/colors.xml similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/values/colors.xml rename to src/ext/wasm3/platforms/android/app/src/main/res/values/colors.xml diff --git a/ext/wasm3/platforms/android/app/src/main/res/values/dimens.xml b/src/ext/wasm3/platforms/android/app/src/main/res/values/dimens.xml similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/values/dimens.xml rename to src/ext/wasm3/platforms/android/app/src/main/res/values/dimens.xml diff --git a/ext/wasm3/platforms/android/app/src/main/res/values/strings.xml b/src/ext/wasm3/platforms/android/app/src/main/res/values/strings.xml similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/values/strings.xml rename to src/ext/wasm3/platforms/android/app/src/main/res/values/strings.xml diff --git a/ext/wasm3/platforms/android/app/src/main/res/values/styles.xml b/src/ext/wasm3/platforms/android/app/src/main/res/values/styles.xml similarity index 100% rename from ext/wasm3/platforms/android/app/src/main/res/values/styles.xml rename to src/ext/wasm3/platforms/android/app/src/main/res/values/styles.xml diff --git a/ext/wasm3/platforms/android/build.gradle b/src/ext/wasm3/platforms/android/build.gradle similarity index 100% rename from ext/wasm3/platforms/android/build.gradle rename to src/ext/wasm3/platforms/android/build.gradle diff --git a/ext/wasm3/platforms/android/gradle.properties b/src/ext/wasm3/platforms/android/gradle.properties similarity index 100% rename from ext/wasm3/platforms/android/gradle.properties rename to src/ext/wasm3/platforms/android/gradle.properties diff --git a/ext/wasm3/platforms/android/gradle/wrapper/gradle-wrapper.jar b/src/ext/wasm3/platforms/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from ext/wasm3/platforms/android/gradle/wrapper/gradle-wrapper.jar rename to src/ext/wasm3/platforms/android/gradle/wrapper/gradle-wrapper.jar diff --git a/ext/wasm3/platforms/android/gradle/wrapper/gradle-wrapper.properties b/src/ext/wasm3/platforms/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from ext/wasm3/platforms/android/gradle/wrapper/gradle-wrapper.properties rename to src/ext/wasm3/platforms/android/gradle/wrapper/gradle-wrapper.properties diff --git a/ext/wasm3/platforms/android/gradlew b/src/ext/wasm3/platforms/android/gradlew similarity index 100% rename from ext/wasm3/platforms/android/gradlew rename to src/ext/wasm3/platforms/android/gradlew diff --git a/ext/wasm3/platforms/android/gradlew.bat b/src/ext/wasm3/platforms/android/gradlew.bat similarity index 100% rename from ext/wasm3/platforms/android/gradlew.bat rename to src/ext/wasm3/platforms/android/gradlew.bat diff --git a/ext/wasm3/platforms/android/override.txt b/src/ext/wasm3/platforms/android/override.txt similarity index 100% rename from ext/wasm3/platforms/android/override.txt rename to src/ext/wasm3/platforms/android/override.txt diff --git a/ext/wasm3/platforms/android/settings.gradle b/src/ext/wasm3/platforms/android/settings.gradle similarity index 100% rename from ext/wasm3/platforms/android/settings.gradle rename to src/ext/wasm3/platforms/android/settings.gradle diff --git a/ext/wasm3/platforms/app/README.md b/src/ext/wasm3/platforms/app/README.md similarity index 100% rename from ext/wasm3/platforms/app/README.md rename to src/ext/wasm3/platforms/app/README.md diff --git a/ext/wasm3/platforms/app/main.c b/src/ext/wasm3/platforms/app/main.c similarity index 100% rename from ext/wasm3/platforms/app/main.c rename to src/ext/wasm3/platforms/app/main.c diff --git a/ext/wasm3/platforms/app_fuzz/fuzzer.c b/src/ext/wasm3/platforms/app_fuzz/fuzzer.c similarity index 100% rename from ext/wasm3/platforms/app_fuzz/fuzzer.c rename to src/ext/wasm3/platforms/app_fuzz/fuzzer.c diff --git a/ext/wasm3/platforms/cosmopolitan/.gitignore b/src/ext/wasm3/platforms/cosmopolitan/.gitignore similarity index 100% rename from ext/wasm3/platforms/cosmopolitan/.gitignore rename to src/ext/wasm3/platforms/cosmopolitan/.gitignore diff --git a/ext/wasm3/platforms/cosmopolitan/build.sh b/src/ext/wasm3/platforms/cosmopolitan/build.sh similarity index 100% rename from ext/wasm3/platforms/cosmopolitan/build.sh rename to src/ext/wasm3/platforms/cosmopolitan/build.sh diff --git a/ext/wasm3/platforms/cpp/.gitignore b/src/ext/wasm3/platforms/cpp/.gitignore similarity index 100% rename from ext/wasm3/platforms/cpp/.gitignore rename to src/ext/wasm3/platforms/cpp/.gitignore diff --git a/ext/wasm3/platforms/cpp/CMakeLists.txt b/src/ext/wasm3/platforms/cpp/CMakeLists.txt similarity index 100% rename from ext/wasm3/platforms/cpp/CMakeLists.txt rename to src/ext/wasm3/platforms/cpp/CMakeLists.txt diff --git a/ext/wasm3/platforms/cpp/README.md b/src/ext/wasm3/platforms/cpp/README.md similarity index 100% rename from ext/wasm3/platforms/cpp/README.md rename to src/ext/wasm3/platforms/cpp/README.md diff --git a/ext/wasm3/platforms/cpp/main.cpp b/src/ext/wasm3/platforms/cpp/main.cpp similarity index 100% rename from ext/wasm3/platforms/cpp/main.cpp rename to src/ext/wasm3/platforms/cpp/main.cpp diff --git a/ext/wasm3/platforms/cpp/wasm/Makefile b/src/ext/wasm3/platforms/cpp/wasm/Makefile similarity index 100% rename from ext/wasm3/platforms/cpp/wasm/Makefile rename to src/ext/wasm3/platforms/cpp/wasm/Makefile diff --git a/ext/wasm3/platforms/cpp/wasm/test_prog.c b/src/ext/wasm3/platforms/cpp/wasm/test_prog.c similarity index 100% rename from ext/wasm3/platforms/cpp/wasm/test_prog.c rename to src/ext/wasm3/platforms/cpp/wasm/test_prog.c diff --git a/ext/wasm3/platforms/cpp/wasm/test_prog.wasm.h b/src/ext/wasm3/platforms/cpp/wasm/test_prog.wasm.h similarity index 100% rename from ext/wasm3/platforms/cpp/wasm/test_prog.wasm.h rename to src/ext/wasm3/platforms/cpp/wasm/test_prog.wasm.h diff --git a/ext/wasm3/platforms/cpp/wasm3_cpp/CMakeLists.txt b/src/ext/wasm3/platforms/cpp/wasm3_cpp/CMakeLists.txt similarity index 100% rename from ext/wasm3/platforms/cpp/wasm3_cpp/CMakeLists.txt rename to src/ext/wasm3/platforms/cpp/wasm3_cpp/CMakeLists.txt diff --git a/ext/wasm3/platforms/cpp/wasm3_cpp/include/wasm3_cpp.h b/src/ext/wasm3/platforms/cpp/wasm3_cpp/include/wasm3_cpp.h similarity index 100% rename from ext/wasm3/platforms/cpp/wasm3_cpp/include/wasm3_cpp.h rename to src/ext/wasm3/platforms/cpp/wasm3_cpp/include/wasm3_cpp.h diff --git a/ext/wasm3/platforms/embedded/arduino/.gitignore b/src/ext/wasm3/platforms/embedded/arduino/.gitignore similarity index 100% rename from ext/wasm3/platforms/embedded/arduino/.gitignore rename to src/ext/wasm3/platforms/embedded/arduino/.gitignore diff --git a/ext/wasm3/platforms/embedded/arduino/lib/wasm3 b/src/ext/wasm3/platforms/embedded/arduino/lib/wasm3 similarity index 100% rename from ext/wasm3/platforms/embedded/arduino/lib/wasm3 rename to src/ext/wasm3/platforms/embedded/arduino/lib/wasm3 diff --git a/ext/wasm3/platforms/embedded/arduino/platformio.ini b/src/ext/wasm3/platforms/embedded/arduino/platformio.ini similarity index 100% rename from ext/wasm3/platforms/embedded/arduino/platformio.ini rename to src/ext/wasm3/platforms/embedded/arduino/platformio.ini diff --git a/ext/wasm3/platforms/embedded/arduino/src/main.cpp b/src/ext/wasm3/platforms/embedded/arduino/src/main.cpp similarity index 100% rename from ext/wasm3/platforms/embedded/arduino/src/main.cpp rename to src/ext/wasm3/platforms/embedded/arduino/src/main.cpp diff --git a/ext/wasm3/platforms/embedded/bluepill/.gitignore b/src/ext/wasm3/platforms/embedded/bluepill/.gitignore similarity index 100% rename from ext/wasm3/platforms/embedded/bluepill/.gitignore rename to src/ext/wasm3/platforms/embedded/bluepill/.gitignore diff --git a/ext/wasm3/platforms/embedded/bluepill/lib/wasm3/library.json b/src/ext/wasm3/platforms/embedded/bluepill/lib/wasm3/library.json similarity index 100% rename from ext/wasm3/platforms/embedded/bluepill/lib/wasm3/library.json rename to src/ext/wasm3/platforms/embedded/bluepill/lib/wasm3/library.json diff --git a/ext/wasm3/platforms/embedded/bluepill/lib/wasm3/src b/src/ext/wasm3/platforms/embedded/bluepill/lib/wasm3/src similarity index 100% rename from ext/wasm3/platforms/embedded/bluepill/lib/wasm3/src rename to src/ext/wasm3/platforms/embedded/bluepill/lib/wasm3/src diff --git a/ext/wasm3/platforms/embedded/bluepill/platformio.ini b/src/ext/wasm3/platforms/embedded/bluepill/platformio.ini similarity index 100% rename from ext/wasm3/platforms/embedded/bluepill/platformio.ini rename to src/ext/wasm3/platforms/embedded/bluepill/platformio.ini diff --git a/ext/wasm3/platforms/embedded/bluepill/src/main.cpp b/src/ext/wasm3/platforms/embedded/bluepill/src/main.cpp similarity index 100% rename from ext/wasm3/platforms/embedded/bluepill/src/main.cpp rename to src/ext/wasm3/platforms/embedded/bluepill/src/main.cpp diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/.gitignore b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/.gitignore similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/.gitignore rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/.gitignore diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/.old/Makefile b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/.old/Makefile similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/.old/Makefile rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/.old/Makefile diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/.old/component.mk b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/.old/component.mk similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/.old/component.mk rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/.old/component.mk diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/CMakeLists.txt b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/CMakeLists.txt similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/CMakeLists.txt rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/CMakeLists.txt diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/README.md b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/README.md similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/README.md rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/README.md diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/CMakeLists.txt b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/CMakeLists.txt similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/main/CMakeLists.txt rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/CMakeLists.txt diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/m3_api_esp_wasi.c b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/m3_api_esp_wasi.c similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/main/m3_api_esp_wasi.c rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/m3_api_esp_wasi.c diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/m3_api_esp_wasi.h b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/m3_api_esp_wasi.h similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/main/m3_api_esp_wasi.h rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/m3_api_esp_wasi.h diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/main.cpp b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/main.cpp similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/main/main.cpp rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/main.cpp diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/wasi_test.wasm.h b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/wasi_test.wasm.h similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/main/wasi_test.wasm.h rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/wasi_test.wasm.h diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/wasm3 b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/wasm3 similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/main/wasm3 rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/main/wasm3 diff --git a/ext/wasm3/platforms/embedded/esp32-idf-wasi/sdkconfig.defaults b/src/ext/wasm3/platforms/embedded/esp32-idf-wasi/sdkconfig.defaults similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf-wasi/sdkconfig.defaults rename to src/ext/wasm3/platforms/embedded/esp32-idf-wasi/sdkconfig.defaults diff --git a/ext/wasm3/platforms/embedded/esp32-idf/.gitignore b/src/ext/wasm3/platforms/embedded/esp32-idf/.gitignore similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf/.gitignore rename to src/ext/wasm3/platforms/embedded/esp32-idf/.gitignore diff --git a/ext/wasm3/platforms/embedded/esp32-idf/.old/Makefile b/src/ext/wasm3/platforms/embedded/esp32-idf/.old/Makefile similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf/.old/Makefile rename to src/ext/wasm3/platforms/embedded/esp32-idf/.old/Makefile diff --git a/ext/wasm3/platforms/embedded/esp32-idf/.old/component.mk b/src/ext/wasm3/platforms/embedded/esp32-idf/.old/component.mk similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf/.old/component.mk rename to src/ext/wasm3/platforms/embedded/esp32-idf/.old/component.mk diff --git a/ext/wasm3/platforms/embedded/esp32-idf/CMakeLists.txt b/src/ext/wasm3/platforms/embedded/esp32-idf/CMakeLists.txt similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf/CMakeLists.txt rename to src/ext/wasm3/platforms/embedded/esp32-idf/CMakeLists.txt diff --git a/ext/wasm3/platforms/embedded/esp32-idf/README.md b/src/ext/wasm3/platforms/embedded/esp32-idf/README.md similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf/README.md rename to src/ext/wasm3/platforms/embedded/esp32-idf/README.md diff --git a/ext/wasm3/platforms/embedded/esp32-idf/main/CMakeLists.txt b/src/ext/wasm3/platforms/embedded/esp32-idf/main/CMakeLists.txt similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf/main/CMakeLists.txt rename to src/ext/wasm3/platforms/embedded/esp32-idf/main/CMakeLists.txt diff --git a/ext/wasm3/platforms/embedded/esp32-idf/main/linker.lf b/src/ext/wasm3/platforms/embedded/esp32-idf/main/linker.lf similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf/main/linker.lf rename to src/ext/wasm3/platforms/embedded/esp32-idf/main/linker.lf diff --git a/ext/wasm3/platforms/embedded/esp32-idf/main/main.cpp b/src/ext/wasm3/platforms/embedded/esp32-idf/main/main.cpp similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf/main/main.cpp rename to src/ext/wasm3/platforms/embedded/esp32-idf/main/main.cpp diff --git a/ext/wasm3/platforms/embedded/esp32-idf/sdkconfig.defaults b/src/ext/wasm3/platforms/embedded/esp32-idf/sdkconfig.defaults similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-idf/sdkconfig.defaults rename to src/ext/wasm3/platforms/embedded/esp32-idf/sdkconfig.defaults diff --git a/ext/wasm3/platforms/embedded/esp32-pio/.gitignore b/src/ext/wasm3/platforms/embedded/esp32-pio/.gitignore similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-pio/.gitignore rename to src/ext/wasm3/platforms/embedded/esp32-pio/.gitignore diff --git a/ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/README.md b/src/ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/README.md similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/README.md rename to src/ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/README.md diff --git a/ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/library.json b/src/ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/library.json similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/library.json rename to src/ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/library.json diff --git a/ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/src b/src/ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/src similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/src rename to src/ext/wasm3/platforms/embedded/esp32-pio/lib/wasm3/src diff --git a/ext/wasm3/platforms/embedded/esp32-pio/platformio.ini b/src/ext/wasm3/platforms/embedded/esp32-pio/platformio.ini similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-pio/platformio.ini rename to src/ext/wasm3/platforms/embedded/esp32-pio/platformio.ini diff --git a/ext/wasm3/platforms/embedded/esp32-pio/src/main.cpp b/src/ext/wasm3/platforms/embedded/esp32-pio/src/main.cpp similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-pio/src/main.cpp rename to src/ext/wasm3/platforms/embedded/esp32-pio/src/main.cpp diff --git a/ext/wasm3/platforms/embedded/esp32-pio/src/sdkconfig b/src/ext/wasm3/platforms/embedded/esp32-pio/src/sdkconfig similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-pio/src/sdkconfig rename to src/ext/wasm3/platforms/embedded/esp32-pio/src/sdkconfig diff --git a/ext/wasm3/platforms/embedded/esp32-pio/src/sdkconfig.h b/src/ext/wasm3/platforms/embedded/esp32-pio/src/sdkconfig.h similarity index 100% rename from ext/wasm3/platforms/embedded/esp32-pio/src/sdkconfig.h rename to src/ext/wasm3/platforms/embedded/esp32-pio/src/sdkconfig.h diff --git a/ext/wasm3/platforms/embedded/esp8266/.gitignore b/src/ext/wasm3/platforms/embedded/esp8266/.gitignore similarity index 100% rename from ext/wasm3/platforms/embedded/esp8266/.gitignore rename to src/ext/wasm3/platforms/embedded/esp8266/.gitignore diff --git a/ext/wasm3/platforms/embedded/esp8266/lib/wasm3 b/src/ext/wasm3/platforms/embedded/esp8266/lib/wasm3 similarity index 100% rename from ext/wasm3/platforms/embedded/esp8266/lib/wasm3 rename to src/ext/wasm3/platforms/embedded/esp8266/lib/wasm3 diff --git a/ext/wasm3/platforms/embedded/esp8266/platformio.ini b/src/ext/wasm3/platforms/embedded/esp8266/platformio.ini similarity index 100% rename from ext/wasm3/platforms/embedded/esp8266/platformio.ini rename to src/ext/wasm3/platforms/embedded/esp8266/platformio.ini diff --git a/ext/wasm3/platforms/embedded/esp8266/src/main.cpp b/src/ext/wasm3/platforms/embedded/esp8266/src/main.cpp similarity index 100% rename from ext/wasm3/platforms/embedded/esp8266/src/main.cpp rename to src/ext/wasm3/platforms/embedded/esp8266/src/main.cpp diff --git a/ext/wasm3/platforms/embedded/fomu/.env b/src/ext/wasm3/platforms/embedded/fomu/.env similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/.env rename to src/ext/wasm3/platforms/embedded/fomu/.env diff --git a/ext/wasm3/platforms/embedded/fomu/.gitignore b/src/ext/wasm3/platforms/embedded/fomu/.gitignore similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/.gitignore rename to src/ext/wasm3/platforms/embedded/fomu/.gitignore diff --git a/ext/wasm3/platforms/embedded/fomu/Makefile b/src/ext/wasm3/platforms/embedded/fomu/Makefile similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/Makefile rename to src/ext/wasm3/platforms/embedded/fomu/Makefile diff --git a/ext/wasm3/platforms/embedded/fomu/README.md b/src/ext/wasm3/platforms/embedded/fomu/README.md similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/README.md rename to src/ext/wasm3/platforms/embedded/fomu/README.md diff --git a/ext/wasm3/platforms/embedded/fomu/gdb_init b/src/ext/wasm3/platforms/embedded/fomu/gdb_init similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/gdb_init rename to src/ext/wasm3/platforms/embedded/fomu/gdb_init diff --git a/ext/wasm3/platforms/embedded/fomu/include/console.h b/src/ext/wasm3/platforms/embedded/fomu/include/console.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/console.h rename to src/ext/wasm3/platforms/embedded/fomu/include/console.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/crc.h b/src/ext/wasm3/platforms/embedded/fomu/include/crc.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/crc.h rename to src/ext/wasm3/platforms/embedded/fomu/include/crc.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/csr-defs.h b/src/ext/wasm3/platforms/embedded/fomu/include/csr-defs.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/csr-defs.h rename to src/ext/wasm3/platforms/embedded/fomu/include/csr-defs.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/generated/csr.h b/src/ext/wasm3/platforms/embedded/fomu/include/generated/csr.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/generated/csr.h rename to src/ext/wasm3/platforms/embedded/fomu/include/generated/csr.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/generated/mem.h b/src/ext/wasm3/platforms/embedded/fomu/include/generated/mem.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/generated/mem.h rename to src/ext/wasm3/platforms/embedded/fomu/include/generated/mem.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/hw/common.h b/src/ext/wasm3/platforms/embedded/fomu/include/hw/common.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/hw/common.h rename to src/ext/wasm3/platforms/embedded/fomu/include/hw/common.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/hw/flags.h b/src/ext/wasm3/platforms/embedded/fomu/include/hw/flags.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/hw/flags.h rename to src/ext/wasm3/platforms/embedded/fomu/include/hw/flags.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/irq.h b/src/ext/wasm3/platforms/embedded/fomu/include/irq.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/irq.h rename to src/ext/wasm3/platforms/embedded/fomu/include/irq.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/printf.h b/src/ext/wasm3/platforms/embedded/fomu/include/printf.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/printf.h rename to src/ext/wasm3/platforms/embedded/fomu/include/printf.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/rgb.h b/src/ext/wasm3/platforms/embedded/fomu/include/rgb.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/rgb.h rename to src/ext/wasm3/platforms/embedded/fomu/include/rgb.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/spi.h b/src/ext/wasm3/platforms/embedded/fomu/include/spi.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/spi.h rename to src/ext/wasm3/platforms/embedded/fomu/include/spi.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/spiflash.h b/src/ext/wasm3/platforms/embedded/fomu/include/spiflash.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/spiflash.h rename to src/ext/wasm3/platforms/embedded/fomu/include/spiflash.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/system.h b/src/ext/wasm3/platforms/embedded/fomu/include/system.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/system.h rename to src/ext/wasm3/platforms/embedded/fomu/include/system.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/time.h b/src/ext/wasm3/platforms/embedded/fomu/include/time.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/time.h rename to src/ext/wasm3/platforms/embedded/fomu/include/time.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/toboot-api.h b/src/ext/wasm3/platforms/embedded/fomu/include/toboot-api.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/toboot-api.h rename to src/ext/wasm3/platforms/embedded/fomu/include/toboot-api.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/toboot-internal.h b/src/ext/wasm3/platforms/embedded/fomu/include/toboot-internal.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/toboot-internal.h rename to src/ext/wasm3/platforms/embedded/fomu/include/toboot-internal.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/usb-desc.h b/src/ext/wasm3/platforms/embedded/fomu/include/usb-desc.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/usb-desc.h rename to src/ext/wasm3/platforms/embedded/fomu/include/usb-desc.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/usb.h b/src/ext/wasm3/platforms/embedded/fomu/include/usb.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/usb.h rename to src/ext/wasm3/platforms/embedded/fomu/include/usb.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/usbcdc.h b/src/ext/wasm3/platforms/embedded/fomu/include/usbcdc.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/usbcdc.h rename to src/ext/wasm3/platforms/embedded/fomu/include/usbcdc.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/usbstd.h b/src/ext/wasm3/platforms/embedded/fomu/include/usbstd.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/usbstd.h rename to src/ext/wasm3/platforms/embedded/fomu/include/usbstd.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/webusb-defs.h b/src/ext/wasm3/platforms/embedded/fomu/include/webusb-defs.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/webusb-defs.h rename to src/ext/wasm3/platforms/embedded/fomu/include/webusb-defs.h diff --git a/ext/wasm3/platforms/embedded/fomu/include/xxhash.c b/src/ext/wasm3/platforms/embedded/fomu/include/xxhash.c similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/xxhash.c rename to src/ext/wasm3/platforms/embedded/fomu/include/xxhash.c diff --git a/ext/wasm3/platforms/embedded/fomu/include/xxhash.h b/src/ext/wasm3/platforms/embedded/fomu/include/xxhash.h similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/include/xxhash.h rename to src/ext/wasm3/platforms/embedded/fomu/include/xxhash.h diff --git a/ext/wasm3/platforms/embedded/fomu/ld/linker.ld b/src/ext/wasm3/platforms/embedded/fomu/ld/linker.ld similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/ld/linker.ld rename to src/ext/wasm3/platforms/embedded/fomu/ld/linker.ld diff --git a/ext/wasm3/platforms/embedded/fomu/ld/output_format.ld b/src/ext/wasm3/platforms/embedded/fomu/ld/output_format.ld similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/ld/output_format.ld rename to src/ext/wasm3/platforms/embedded/fomu/ld/output_format.ld diff --git a/ext/wasm3/platforms/embedded/fomu/ld/regions.ld b/src/ext/wasm3/platforms/embedded/fomu/ld/regions.ld similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/ld/regions.ld rename to src/ext/wasm3/platforms/embedded/fomu/ld/regions.ld diff --git a/ext/wasm3/platforms/embedded/fomu/src/crt0-vexriscv.S b/src/ext/wasm3/platforms/embedded/fomu/src/crt0-vexriscv.S similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/src/crt0-vexriscv.S rename to src/ext/wasm3/platforms/embedded/fomu/src/crt0-vexriscv.S diff --git a/ext/wasm3/platforms/embedded/fomu/src/ltoa.c b/src/ext/wasm3/platforms/embedded/fomu/src/ltoa.c similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/src/ltoa.c rename to src/ext/wasm3/platforms/embedded/fomu/src/ltoa.c diff --git a/ext/wasm3/platforms/embedded/fomu/src/main.c b/src/ext/wasm3/platforms/embedded/fomu/src/main.c similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/src/main.c rename to src/ext/wasm3/platforms/embedded/fomu/src/main.c diff --git a/ext/wasm3/platforms/embedded/fomu/src/rgb.c b/src/ext/wasm3/platforms/embedded/fomu/src/rgb.c similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/src/rgb.c rename to src/ext/wasm3/platforms/embedded/fomu/src/rgb.c diff --git a/ext/wasm3/platforms/embedded/fomu/src/time.c b/src/ext/wasm3/platforms/embedded/fomu/src/time.c similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/src/time.c rename to src/ext/wasm3/platforms/embedded/fomu/src/time.c diff --git a/ext/wasm3/platforms/embedded/fomu/src/usb-desc.c b/src/ext/wasm3/platforms/embedded/fomu/src/usb-desc.c similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/src/usb-desc.c rename to src/ext/wasm3/platforms/embedded/fomu/src/usb-desc.c diff --git a/ext/wasm3/platforms/embedded/fomu/src/usb-dev.c b/src/ext/wasm3/platforms/embedded/fomu/src/usb-dev.c similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/src/usb-dev.c rename to src/ext/wasm3/platforms/embedded/fomu/src/usb-dev.c diff --git a/ext/wasm3/platforms/embedded/fomu/src/usb-epfifo.c b/src/ext/wasm3/platforms/embedded/fomu/src/usb-epfifo.c similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/src/usb-epfifo.c rename to src/ext/wasm3/platforms/embedded/fomu/src/usb-epfifo.c diff --git a/ext/wasm3/platforms/embedded/fomu/src/wasm3 b/src/ext/wasm3/platforms/embedded/fomu/src/wasm3 similarity index 100% rename from ext/wasm3/platforms/embedded/fomu/src/wasm3 rename to src/ext/wasm3/platforms/embedded/fomu/src/wasm3 diff --git a/ext/wasm3/platforms/embedded/hifive1/.gitignore b/src/ext/wasm3/platforms/embedded/hifive1/.gitignore similarity index 100% rename from ext/wasm3/platforms/embedded/hifive1/.gitignore rename to src/ext/wasm3/platforms/embedded/hifive1/.gitignore diff --git a/ext/wasm3/platforms/embedded/hifive1/README.md b/src/ext/wasm3/platforms/embedded/hifive1/README.md similarity index 100% rename from ext/wasm3/platforms/embedded/hifive1/README.md rename to src/ext/wasm3/platforms/embedded/hifive1/README.md diff --git a/ext/wasm3/platforms/embedded/hifive1/lib/wasm3 b/src/ext/wasm3/platforms/embedded/hifive1/lib/wasm3 similarity index 100% rename from ext/wasm3/platforms/embedded/hifive1/lib/wasm3 rename to src/ext/wasm3/platforms/embedded/hifive1/lib/wasm3 diff --git a/ext/wasm3/platforms/embedded/hifive1/platformio.ini b/src/ext/wasm3/platforms/embedded/hifive1/platformio.ini similarity index 100% rename from ext/wasm3/platforms/embedded/hifive1/platformio.ini rename to src/ext/wasm3/platforms/embedded/hifive1/platformio.ini diff --git a/ext/wasm3/platforms/embedded/hifive1/src/main.c b/src/ext/wasm3/platforms/embedded/hifive1/src/main.c similarity index 100% rename from ext/wasm3/platforms/embedded/hifive1/src/main.c rename to src/ext/wasm3/platforms/embedded/hifive1/src/main.c diff --git a/ext/wasm3/platforms/embedded/particle/.gitignore b/src/ext/wasm3/platforms/embedded/particle/.gitignore similarity index 100% rename from ext/wasm3/platforms/embedded/particle/.gitignore rename to src/ext/wasm3/platforms/embedded/particle/.gitignore diff --git a/ext/wasm3/platforms/embedded/particle/README.md b/src/ext/wasm3/platforms/embedded/particle/README.md similarity index 100% rename from ext/wasm3/platforms/embedded/particle/README.md rename to src/ext/wasm3/platforms/embedded/particle/README.md diff --git a/ext/wasm3/platforms/embedded/particle/lib/wasm3/library.properties b/src/ext/wasm3/platforms/embedded/particle/lib/wasm3/library.properties similarity index 100% rename from ext/wasm3/platforms/embedded/particle/lib/wasm3/library.properties rename to src/ext/wasm3/platforms/embedded/particle/lib/wasm3/library.properties diff --git a/ext/wasm3/platforms/embedded/particle/lib/wasm3/src b/src/ext/wasm3/platforms/embedded/particle/lib/wasm3/src similarity index 100% rename from ext/wasm3/platforms/embedded/particle/lib/wasm3/src rename to src/ext/wasm3/platforms/embedded/particle/lib/wasm3/src diff --git a/ext/wasm3/platforms/embedded/particle/project.properties b/src/ext/wasm3/platforms/embedded/particle/project.properties similarity index 100% rename from ext/wasm3/platforms/embedded/particle/project.properties rename to src/ext/wasm3/platforms/embedded/particle/project.properties diff --git a/ext/wasm3/platforms/embedded/particle/src/main.ino b/src/ext/wasm3/platforms/embedded/particle/src/main.ino similarity index 100% rename from ext/wasm3/platforms/embedded/particle/src/main.ino rename to src/ext/wasm3/platforms/embedded/particle/src/main.ino diff --git a/ext/wasm3/platforms/embedded/wm_w600/.gitignore b/src/ext/wasm3/platforms/embedded/wm_w600/.gitignore similarity index 100% rename from ext/wasm3/platforms/embedded/wm_w600/.gitignore rename to src/ext/wasm3/platforms/embedded/wm_w600/.gitignore diff --git a/ext/wasm3/platforms/embedded/wm_w600/Makefile b/src/ext/wasm3/platforms/embedded/wm_w600/Makefile similarity index 100% rename from ext/wasm3/platforms/embedded/wm_w600/Makefile rename to src/ext/wasm3/platforms/embedded/wm_w600/Makefile diff --git a/ext/wasm3/platforms/embedded/wm_w600/README.md b/src/ext/wasm3/platforms/embedded/wm_w600/README.md similarity index 100% rename from ext/wasm3/platforms/embedded/wm_w600/README.md rename to src/ext/wasm3/platforms/embedded/wm_w600/README.md diff --git a/ext/wasm3/platforms/embedded/wm_w600/build.sh b/src/ext/wasm3/platforms/embedded/wm_w600/build.sh similarity index 100% rename from ext/wasm3/platforms/embedded/wm_w600/build.sh rename to src/ext/wasm3/platforms/embedded/wm_w600/build.sh diff --git a/ext/wasm3/platforms/embedded/wm_w600/main.c b/src/ext/wasm3/platforms/embedded/wm_w600/main.c similarity index 100% rename from ext/wasm3/platforms/embedded/wm_w600/main.c rename to src/ext/wasm3/platforms/embedded/wm_w600/main.c diff --git a/ext/wasm3/platforms/embedded/wm_w600/wasm3 b/src/ext/wasm3/platforms/embedded/wm_w600/wasm3 similarity index 100% rename from ext/wasm3/platforms/embedded/wm_w600/wasm3 rename to src/ext/wasm3/platforms/embedded/wm_w600/wasm3 diff --git a/ext/wasm3/platforms/emscripten/README.md b/src/ext/wasm3/platforms/emscripten/README.md similarity index 100% rename from ext/wasm3/platforms/emscripten/README.md rename to src/ext/wasm3/platforms/emscripten/README.md diff --git a/ext/wasm3/platforms/emscripten/main.c b/src/ext/wasm3/platforms/emscripten/main.c similarity index 100% rename from ext/wasm3/platforms/emscripten/main.c rename to src/ext/wasm3/platforms/emscripten/main.c diff --git a/ext/wasm3/platforms/emscripten_lib/main.c b/src/ext/wasm3/platforms/emscripten_lib/main.c similarity index 100% rename from ext/wasm3/platforms/emscripten_lib/main.c rename to src/ext/wasm3/platforms/emscripten_lib/main.c diff --git a/ext/wasm3/platforms/emscripten_lib/run_native.js b/src/ext/wasm3/platforms/emscripten_lib/run_native.js similarity index 100% rename from ext/wasm3/platforms/emscripten_lib/run_native.js rename to src/ext/wasm3/platforms/emscripten_lib/run_native.js diff --git a/ext/wasm3/platforms/emscripten_lib/run_wasm3.js b/src/ext/wasm3/platforms/emscripten_lib/run_wasm3.js similarity index 100% rename from ext/wasm3/platforms/emscripten_lib/run_wasm3.js rename to src/ext/wasm3/platforms/emscripten_lib/run_wasm3.js diff --git a/ext/wasm3/platforms/ios/.gitignore b/src/ext/wasm3/platforms/ios/.gitignore similarity index 100% rename from ext/wasm3/platforms/ios/.gitignore rename to src/ext/wasm3/platforms/ios/.gitignore diff --git a/ext/wasm3/platforms/ios/README.md b/src/ext/wasm3/platforms/ios/README.md similarity index 100% rename from ext/wasm3/platforms/ios/README.md rename to src/ext/wasm3/platforms/ios/README.md diff --git a/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.pbxproj b/src/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.pbxproj similarity index 100% rename from ext/wasm3/platforms/ios/wasm3.xcodeproj/project.pbxproj rename to src/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.pbxproj diff --git a/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/src/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to src/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/src/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to src/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/src/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to src/ext/wasm3/platforms/ios/wasm3.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/ext/wasm3/platforms/ios/wasm3.xcodeproj/xcshareddata/xcschemes/wasm3 Release.xcscheme b/src/ext/wasm3/platforms/ios/wasm3.xcodeproj/xcshareddata/xcschemes/wasm3 Release.xcscheme similarity index 100% rename from ext/wasm3/platforms/ios/wasm3.xcodeproj/xcshareddata/xcschemes/wasm3 Release.xcscheme rename to src/ext/wasm3/platforms/ios/wasm3.xcodeproj/xcshareddata/xcschemes/wasm3 Release.xcscheme diff --git a/ext/wasm3/platforms/ios/wasm3.xcodeproj/xcshareddata/xcschemes/wasm3.xcscheme b/src/ext/wasm3/platforms/ios/wasm3.xcodeproj/xcshareddata/xcschemes/wasm3.xcscheme similarity index 100% rename from ext/wasm3/platforms/ios/wasm3.xcodeproj/xcshareddata/xcschemes/wasm3.xcscheme rename to src/ext/wasm3/platforms/ios/wasm3.xcodeproj/xcshareddata/xcschemes/wasm3.xcscheme diff --git a/ext/wasm3/platforms/ios/wasm3/AppDelegate.swift b/src/ext/wasm3/platforms/ios/wasm3/AppDelegate.swift similarity index 100% rename from ext/wasm3/platforms/ios/wasm3/AppDelegate.swift rename to src/ext/wasm3/platforms/ios/wasm3/AppDelegate.swift diff --git a/ext/wasm3/platforms/ios/wasm3/Assets.xcassets/AppIcon.appiconset/Contents.json b/src/ext/wasm3/platforms/ios/wasm3/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from ext/wasm3/platforms/ios/wasm3/Assets.xcassets/AppIcon.appiconset/Contents.json rename to src/ext/wasm3/platforms/ios/wasm3/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/ext/wasm3/platforms/ios/wasm3/Base.lproj/LaunchScreen.storyboard b/src/ext/wasm3/platforms/ios/wasm3/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from ext/wasm3/platforms/ios/wasm3/Base.lproj/LaunchScreen.storyboard rename to src/ext/wasm3/platforms/ios/wasm3/Base.lproj/LaunchScreen.storyboard diff --git a/ext/wasm3/platforms/ios/wasm3/Base.lproj/Main.storyboard b/src/ext/wasm3/platforms/ios/wasm3/Base.lproj/Main.storyboard similarity index 100% rename from ext/wasm3/platforms/ios/wasm3/Base.lproj/Main.storyboard rename to src/ext/wasm3/platforms/ios/wasm3/Base.lproj/Main.storyboard diff --git a/ext/wasm3/platforms/ios/wasm3/Bridging-Header.h b/src/ext/wasm3/platforms/ios/wasm3/Bridging-Header.h similarity index 100% rename from ext/wasm3/platforms/ios/wasm3/Bridging-Header.h rename to src/ext/wasm3/platforms/ios/wasm3/Bridging-Header.h diff --git a/ext/wasm3/platforms/ios/wasm3/Info.plist b/src/ext/wasm3/platforms/ios/wasm3/Info.plist similarity index 100% rename from ext/wasm3/platforms/ios/wasm3/Info.plist rename to src/ext/wasm3/platforms/ios/wasm3/Info.plist diff --git a/ext/wasm3/platforms/ios/wasm3/ViewController.swift b/src/ext/wasm3/platforms/ios/wasm3/ViewController.swift similarity index 100% rename from ext/wasm3/platforms/ios/wasm3/ViewController.swift rename to src/ext/wasm3/platforms/ios/wasm3/ViewController.swift diff --git a/ext/wasm3/platforms/ios/wasm3/icon.png b/src/ext/wasm3/platforms/ios/wasm3/icon.png similarity index 100% rename from ext/wasm3/platforms/ios/wasm3/icon.png rename to src/ext/wasm3/platforms/ios/wasm3/icon.png diff --git a/ext/wasm3/platforms/ios/wasm3/main.c b/src/ext/wasm3/platforms/ios/wasm3/main.c similarity index 100% rename from ext/wasm3/platforms/ios/wasm3/main.c rename to src/ext/wasm3/platforms/ios/wasm3/main.c diff --git a/ext/wasm3/platforms/openwrt/README.md b/src/ext/wasm3/platforms/openwrt/README.md similarity index 100% rename from ext/wasm3/platforms/openwrt/README.md rename to src/ext/wasm3/platforms/openwrt/README.md diff --git a/ext/wasm3/platforms/python/README.md b/src/ext/wasm3/platforms/python/README.md similarity index 100% rename from ext/wasm3/platforms/python/README.md rename to src/ext/wasm3/platforms/python/README.md diff --git a/ext/wasm3/source/CMakeLists.txt b/src/ext/wasm3/source/CMakeLists.txt similarity index 100% rename from ext/wasm3/source/CMakeLists.txt rename to src/ext/wasm3/source/CMakeLists.txt diff --git a/ext/wasm3/source/extensions/m3_extensions.c b/src/ext/wasm3/source/extensions/m3_extensions.c similarity index 100% rename from ext/wasm3/source/extensions/m3_extensions.c rename to src/ext/wasm3/source/extensions/m3_extensions.c diff --git a/ext/wasm3/source/extensions/wasm3_ext.h b/src/ext/wasm3/source/extensions/wasm3_ext.h similarity index 100% rename from ext/wasm3/source/extensions/wasm3_ext.h rename to src/ext/wasm3/source/extensions/wasm3_ext.h diff --git a/ext/wasm3/source/extra/coremark_minimal.wasm.h b/src/ext/wasm3/source/extra/coremark_minimal.wasm.h similarity index 100% rename from ext/wasm3/source/extra/coremark_minimal.wasm.h rename to src/ext/wasm3/source/extra/coremark_minimal.wasm.h diff --git a/ext/wasm3/source/extra/fib32.wasm.h b/src/ext/wasm3/source/extra/fib32.wasm.h similarity index 100% rename from ext/wasm3/source/extra/fib32.wasm.h rename to src/ext/wasm3/source/extra/fib32.wasm.h diff --git a/ext/wasm3/source/extra/fib32_tail.wasm.h b/src/ext/wasm3/source/extra/fib32_tail.wasm.h similarity index 100% rename from ext/wasm3/source/extra/fib32_tail.wasm.h rename to src/ext/wasm3/source/extra/fib32_tail.wasm.h diff --git a/ext/wasm3/source/extra/fib64.wasm.h b/src/ext/wasm3/source/extra/fib64.wasm.h similarity index 100% rename from ext/wasm3/source/extra/fib64.wasm.h rename to src/ext/wasm3/source/extra/fib64.wasm.h diff --git a/ext/wasm3/source/extra/wasi_core.h b/src/ext/wasm3/source/extra/wasi_core.h similarity index 100% rename from ext/wasm3/source/extra/wasi_core.h rename to src/ext/wasm3/source/extra/wasi_core.h diff --git a/ext/wasm3/source/m3_api_libc.c b/src/ext/wasm3/source/m3_api_libc.c similarity index 100% rename from ext/wasm3/source/m3_api_libc.c rename to src/ext/wasm3/source/m3_api_libc.c diff --git a/ext/wasm3/source/m3_api_libc.h b/src/ext/wasm3/source/m3_api_libc.h similarity index 100% rename from ext/wasm3/source/m3_api_libc.h rename to src/ext/wasm3/source/m3_api_libc.h diff --git a/ext/wasm3/source/m3_api_meta_wasi.c b/src/ext/wasm3/source/m3_api_meta_wasi.c similarity index 100% rename from ext/wasm3/source/m3_api_meta_wasi.c rename to src/ext/wasm3/source/m3_api_meta_wasi.c diff --git a/ext/wasm3/source/m3_api_tracer.c b/src/ext/wasm3/source/m3_api_tracer.c similarity index 100% rename from ext/wasm3/source/m3_api_tracer.c rename to src/ext/wasm3/source/m3_api_tracer.c diff --git a/ext/wasm3/source/m3_api_tracer.h b/src/ext/wasm3/source/m3_api_tracer.h similarity index 100% rename from ext/wasm3/source/m3_api_tracer.h rename to src/ext/wasm3/source/m3_api_tracer.h diff --git a/ext/wasm3/source/m3_api_uvwasi.c b/src/ext/wasm3/source/m3_api_uvwasi.c similarity index 100% rename from ext/wasm3/source/m3_api_uvwasi.c rename to src/ext/wasm3/source/m3_api_uvwasi.c diff --git a/ext/wasm3/source/m3_api_wasi.c b/src/ext/wasm3/source/m3_api_wasi.c similarity index 100% rename from ext/wasm3/source/m3_api_wasi.c rename to src/ext/wasm3/source/m3_api_wasi.c diff --git a/ext/wasm3/source/m3_api_wasi.h b/src/ext/wasm3/source/m3_api_wasi.h similarity index 100% rename from ext/wasm3/source/m3_api_wasi.h rename to src/ext/wasm3/source/m3_api_wasi.h diff --git a/ext/wasm3/source/m3_bind.c b/src/ext/wasm3/source/m3_bind.c similarity index 100% rename from ext/wasm3/source/m3_bind.c rename to src/ext/wasm3/source/m3_bind.c diff --git a/ext/wasm3/source/m3_bind.h b/src/ext/wasm3/source/m3_bind.h similarity index 100% rename from ext/wasm3/source/m3_bind.h rename to src/ext/wasm3/source/m3_bind.h diff --git a/ext/wasm3/source/m3_code.c b/src/ext/wasm3/source/m3_code.c similarity index 100% rename from ext/wasm3/source/m3_code.c rename to src/ext/wasm3/source/m3_code.c diff --git a/ext/wasm3/source/m3_code.h b/src/ext/wasm3/source/m3_code.h similarity index 100% rename from ext/wasm3/source/m3_code.h rename to src/ext/wasm3/source/m3_code.h diff --git a/ext/wasm3/source/m3_compile.c b/src/ext/wasm3/source/m3_compile.c similarity index 100% rename from ext/wasm3/source/m3_compile.c rename to src/ext/wasm3/source/m3_compile.c diff --git a/ext/wasm3/source/m3_compile.h b/src/ext/wasm3/source/m3_compile.h similarity index 100% rename from ext/wasm3/source/m3_compile.h rename to src/ext/wasm3/source/m3_compile.h diff --git a/ext/wasm3/source/m3_config.h b/src/ext/wasm3/source/m3_config.h similarity index 100% rename from ext/wasm3/source/m3_config.h rename to src/ext/wasm3/source/m3_config.h diff --git a/ext/wasm3/source/m3_config_platforms.h b/src/ext/wasm3/source/m3_config_platforms.h similarity index 100% rename from ext/wasm3/source/m3_config_platforms.h rename to src/ext/wasm3/source/m3_config_platforms.h diff --git a/ext/wasm3/source/m3_core.c b/src/ext/wasm3/source/m3_core.c similarity index 100% rename from ext/wasm3/source/m3_core.c rename to src/ext/wasm3/source/m3_core.c diff --git a/ext/wasm3/source/m3_core.h b/src/ext/wasm3/source/m3_core.h similarity index 100% rename from ext/wasm3/source/m3_core.h rename to src/ext/wasm3/source/m3_core.h diff --git a/ext/wasm3/source/m3_env.c b/src/ext/wasm3/source/m3_env.c similarity index 100% rename from ext/wasm3/source/m3_env.c rename to src/ext/wasm3/source/m3_env.c diff --git a/ext/wasm3/source/m3_env.h b/src/ext/wasm3/source/m3_env.h similarity index 100% rename from ext/wasm3/source/m3_env.h rename to src/ext/wasm3/source/m3_env.h diff --git a/ext/wasm3/source/m3_exception.h b/src/ext/wasm3/source/m3_exception.h similarity index 100% rename from ext/wasm3/source/m3_exception.h rename to src/ext/wasm3/source/m3_exception.h diff --git a/ext/wasm3/source/m3_exec.c b/src/ext/wasm3/source/m3_exec.c similarity index 100% rename from ext/wasm3/source/m3_exec.c rename to src/ext/wasm3/source/m3_exec.c diff --git a/ext/wasm3/source/m3_exec.h b/src/ext/wasm3/source/m3_exec.h similarity index 100% rename from ext/wasm3/source/m3_exec.h rename to src/ext/wasm3/source/m3_exec.h diff --git a/ext/wasm3/source/m3_exec_defs.h b/src/ext/wasm3/source/m3_exec_defs.h similarity index 100% rename from ext/wasm3/source/m3_exec_defs.h rename to src/ext/wasm3/source/m3_exec_defs.h diff --git a/ext/wasm3/source/m3_function.c b/src/ext/wasm3/source/m3_function.c similarity index 100% rename from ext/wasm3/source/m3_function.c rename to src/ext/wasm3/source/m3_function.c diff --git a/ext/wasm3/source/m3_function.h b/src/ext/wasm3/source/m3_function.h similarity index 100% rename from ext/wasm3/source/m3_function.h rename to src/ext/wasm3/source/m3_function.h diff --git a/ext/wasm3/source/m3_info.c b/src/ext/wasm3/source/m3_info.c similarity index 100% rename from ext/wasm3/source/m3_info.c rename to src/ext/wasm3/source/m3_info.c diff --git a/ext/wasm3/source/m3_info.h b/src/ext/wasm3/source/m3_info.h similarity index 100% rename from ext/wasm3/source/m3_info.h rename to src/ext/wasm3/source/m3_info.h diff --git a/ext/wasm3/source/m3_math_utils.h b/src/ext/wasm3/source/m3_math_utils.h similarity index 100% rename from ext/wasm3/source/m3_math_utils.h rename to src/ext/wasm3/source/m3_math_utils.h diff --git a/ext/wasm3/source/m3_module.c b/src/ext/wasm3/source/m3_module.c similarity index 100% rename from ext/wasm3/source/m3_module.c rename to src/ext/wasm3/source/m3_module.c diff --git a/ext/wasm3/source/m3_parse.c b/src/ext/wasm3/source/m3_parse.c similarity index 100% rename from ext/wasm3/source/m3_parse.c rename to src/ext/wasm3/source/m3_parse.c diff --git a/ext/wasm3/source/wasm3.h b/src/ext/wasm3/source/wasm3.h similarity index 100% rename from ext/wasm3/source/wasm3.h rename to src/ext/wasm3/source/wasm3.h diff --git a/ext/wasm3/source/wasm3_defs.h b/src/ext/wasm3/source/wasm3_defs.h similarity index 100% rename from ext/wasm3/source/wasm3_defs.h rename to src/ext/wasm3/source/wasm3_defs.h diff --git a/ext/wasm3/test/internal/m3_test.c b/src/ext/wasm3/test/internal/m3_test.c similarity index 100% rename from ext/wasm3/test/internal/m3_test.c rename to src/ext/wasm3/test/internal/m3_test.c diff --git a/ext/wasm3/test/internal/tailcall/build.sh b/src/ext/wasm3/test/internal/tailcall/build.sh similarity index 100% rename from ext/wasm3/test/internal/tailcall/build.sh rename to src/ext/wasm3/test/internal/tailcall/build.sh diff --git a/ext/wasm3/test/internal/tailcall/ops.c b/src/ext/wasm3/test/internal/tailcall/ops.c similarity index 100% rename from ext/wasm3/test/internal/tailcall/ops.c rename to src/ext/wasm3/test/internal/tailcall/ops.c diff --git a/ext/wasm3/test/lang/README.md b/src/ext/wasm3/test/lang/README.md similarity index 100% rename from ext/wasm3/test/lang/README.md rename to src/ext/wasm3/test/lang/README.md diff --git a/ext/wasm3/test/lang/fib.c b/src/ext/wasm3/test/lang/fib.c similarity index 100% rename from ext/wasm3/test/lang/fib.c rename to src/ext/wasm3/test/lang/fib.c diff --git a/ext/wasm3/test/lang/fib.js b/src/ext/wasm3/test/lang/fib.js similarity index 100% rename from ext/wasm3/test/lang/fib.js rename to src/ext/wasm3/test/lang/fib.js diff --git a/ext/wasm3/test/lang/fib.lua b/src/ext/wasm3/test/lang/fib.lua similarity index 100% rename from ext/wasm3/test/lang/fib.lua rename to src/ext/wasm3/test/lang/fib.lua diff --git a/ext/wasm3/test/lang/fib.min.js b/src/ext/wasm3/test/lang/fib.min.js similarity index 100% rename from ext/wasm3/test/lang/fib.min.js rename to src/ext/wasm3/test/lang/fib.min.js diff --git a/ext/wasm3/test/lang/fib.py b/src/ext/wasm3/test/lang/fib.py similarity index 100% rename from ext/wasm3/test/lang/fib.py rename to src/ext/wasm3/test/lang/fib.py diff --git a/ext/wasm3/test/lang/fib.walt b/src/ext/wasm3/test/lang/fib.walt similarity index 100% rename from ext/wasm3/test/lang/fib.walt rename to src/ext/wasm3/test/lang/fib.walt diff --git a/ext/wasm3/test/lang/fib32.wat b/src/ext/wasm3/test/lang/fib32.wat similarity index 100% rename from ext/wasm3/test/lang/fib32.wat rename to src/ext/wasm3/test/lang/fib32.wat diff --git a/ext/wasm3/test/lang/fib32_tail.wat b/src/ext/wasm3/test/lang/fib32_tail.wat similarity index 100% rename from ext/wasm3/test/lang/fib32_tail.wat rename to src/ext/wasm3/test/lang/fib32_tail.wat diff --git a/ext/wasm3/test/lang/fib64.wat b/src/ext/wasm3/test/lang/fib64.wat similarity index 100% rename from ext/wasm3/test/lang/fib64.wat rename to src/ext/wasm3/test/lang/fib64.wat diff --git a/ext/wasm3/test/run-spec-test.py b/src/ext/wasm3/test/run-spec-test.py similarity index 100% rename from ext/wasm3/test/run-spec-test.py rename to src/ext/wasm3/test/run-spec-test.py diff --git a/ext/wasm3/test/run-wasi-test.py b/src/ext/wasm3/test/run-wasi-test.py similarity index 100% rename from ext/wasm3/test/run-wasi-test.py rename to src/ext/wasm3/test/run-wasi-test.py diff --git a/ext/wasm3/test/wasi/brotli/README.md b/src/ext/wasm3/test/wasi/brotli/README.md similarity index 100% rename from ext/wasm3/test/wasi/brotli/README.md rename to src/ext/wasm3/test/wasi/brotli/README.md diff --git a/ext/wasm3/test/wasi/brotli/alice29.txt b/src/ext/wasm3/test/wasi/brotli/alice29.txt similarity index 100% rename from ext/wasm3/test/wasi/brotli/alice29.txt rename to src/ext/wasm3/test/wasi/brotli/alice29.txt diff --git a/ext/wasm3/test/wasi/brotli/alice29.txt.compressed b/src/ext/wasm3/test/wasi/brotli/alice29.txt.compressed similarity index 100% rename from ext/wasm3/test/wasi/brotli/alice29.txt.compressed rename to src/ext/wasm3/test/wasi/brotli/alice29.txt.compressed diff --git a/ext/wasm3/test/wasi/brotli/alice29_small.txt b/src/ext/wasm3/test/wasi/brotli/alice29_small.txt similarity index 100% rename from ext/wasm3/test/wasi/brotli/alice29_small.txt rename to src/ext/wasm3/test/wasi/brotli/alice29_small.txt diff --git a/ext/wasm3/test/wasi/c-ray/README.md b/src/ext/wasm3/test/wasi/c-ray/README.md similarity index 100% rename from ext/wasm3/test/wasi/c-ray/README.md rename to src/ext/wasm3/test/wasi/c-ray/README.md diff --git a/ext/wasm3/test/wasi/c-ray/c-ray-f.c b/src/ext/wasm3/test/wasi/c-ray/c-ray-f.c similarity index 100% rename from ext/wasm3/test/wasi/c-ray/c-ray-f.c rename to src/ext/wasm3/test/wasi/c-ray/c-ray-f.c diff --git a/ext/wasm3/test/wasi/c-ray/scene b/src/ext/wasm3/test/wasi/c-ray/scene similarity index 100% rename from ext/wasm3/test/wasi/c-ray/scene rename to src/ext/wasm3/test/wasi/c-ray/scene diff --git a/ext/wasm3/test/wasi/c-ray/scene.jpg b/src/ext/wasm3/test/wasi/c-ray/scene.jpg similarity index 100% rename from ext/wasm3/test/wasi/c-ray/scene.jpg rename to src/ext/wasm3/test/wasi/c-ray/scene.jpg diff --git a/ext/wasm3/test/wasi/c-ray/sphfract b/src/ext/wasm3/test/wasi/c-ray/sphfract similarity index 100% rename from ext/wasm3/test/wasi/c-ray/sphfract rename to src/ext/wasm3/test/wasi/c-ray/sphfract diff --git a/ext/wasm3/test/wasi/c-ray/sphfract.jpg b/src/ext/wasm3/test/wasi/c-ray/sphfract.jpg similarity index 100% rename from ext/wasm3/test/wasi/c-ray/sphfract.jpg rename to src/ext/wasm3/test/wasi/c-ray/sphfract.jpg diff --git a/ext/wasm3/test/wasi/coremark/README.md b/src/ext/wasm3/test/wasi/coremark/README.md similarity index 100% rename from ext/wasm3/test/wasi/coremark/README.md rename to src/ext/wasm3/test/wasi/coremark/README.md diff --git a/ext/wasm3/test/wasi/mal/.gitattributes b/src/ext/wasm3/test/wasi/mal/.gitattributes similarity index 100% rename from ext/wasm3/test/wasi/mal/.gitattributes rename to src/ext/wasm3/test/wasi/mal/.gitattributes diff --git a/ext/wasm3/test/wasi/mal/README.md b/src/ext/wasm3/test/wasi/mal/README.md similarity index 100% rename from ext/wasm3/test/wasi/mal/README.md rename to src/ext/wasm3/test/wasi/mal/README.md diff --git a/ext/wasm3/test/wasi/mal/core.mal b/src/ext/wasm3/test/wasi/mal/core.mal similarity index 100% rename from ext/wasm3/test/wasi/mal/core.mal rename to src/ext/wasm3/test/wasi/mal/core.mal diff --git a/ext/wasm3/test/wasi/mal/env.mal b/src/ext/wasm3/test/wasi/mal/env.mal similarity index 100% rename from ext/wasm3/test/wasi/mal/env.mal rename to src/ext/wasm3/test/wasi/mal/env.mal diff --git a/ext/wasm3/test/wasi/mal/mal.mal b/src/ext/wasm3/test/wasi/mal/mal.mal similarity index 100% rename from ext/wasm3/test/wasi/mal/mal.mal rename to src/ext/wasm3/test/wasi/mal/mal.mal diff --git a/ext/wasm3/test/wasi/mal/test-fib.mal b/src/ext/wasm3/test/wasi/mal/test-fib.mal similarity index 100% rename from ext/wasm3/test/wasi/mal/test-fib.mal rename to src/ext/wasm3/test/wasi/mal/test-fib.mal diff --git a/ext/wasm3/test/wasi/mandelbrot/README.md b/src/ext/wasm3/test/wasi/mandelbrot/README.md similarity index 100% rename from ext/wasm3/test/wasi/mandelbrot/README.md rename to src/ext/wasm3/test/wasi/mandelbrot/README.md diff --git a/ext/wasm3/test/wasi/mandelbrot/colors.h b/src/ext/wasm3/test/wasi/mandelbrot/colors.h similarity index 100% rename from ext/wasm3/test/wasi/mandelbrot/colors.h rename to src/ext/wasm3/test/wasi/mandelbrot/colors.h diff --git a/ext/wasm3/test/wasi/mandelbrot/doubledouble.h b/src/ext/wasm3/test/wasi/mandelbrot/doubledouble.h similarity index 100% rename from ext/wasm3/test/wasi/mandelbrot/doubledouble.h rename to src/ext/wasm3/test/wasi/mandelbrot/doubledouble.h diff --git a/ext/wasm3/test/wasi/mandelbrot/image.png b/src/ext/wasm3/test/wasi/mandelbrot/image.png similarity index 100% rename from ext/wasm3/test/wasi/mandelbrot/image.png rename to src/ext/wasm3/test/wasi/mandelbrot/image.png diff --git a/ext/wasm3/test/wasi/mandelbrot/mandel.c b/src/ext/wasm3/test/wasi/mandelbrot/mandel.c similarity index 100% rename from ext/wasm3/test/wasi/mandelbrot/mandel.c rename to src/ext/wasm3/test/wasi/mandelbrot/mandel.c diff --git a/ext/wasm3/test/wasi/mandelbrot/mandel_dd.c b/src/ext/wasm3/test/wasi/mandelbrot/mandel_dd.c similarity index 100% rename from ext/wasm3/test/wasi/mandelbrot/mandel_dd.c rename to src/ext/wasm3/test/wasi/mandelbrot/mandel_dd.c diff --git a/ext/wasm3/test/wasi/raymarcher/raymarcher.cpp b/src/ext/wasm3/test/wasi/raymarcher/raymarcher.cpp similarity index 100% rename from ext/wasm3/test/wasi/raymarcher/raymarcher.cpp rename to src/ext/wasm3/test/wasi/raymarcher/raymarcher.cpp diff --git a/ext/wasm3/test/wasi/simple/0.txt b/src/ext/wasm3/test/wasi/simple/0.txt similarity index 100% rename from ext/wasm3/test/wasi/simple/0.txt rename to src/ext/wasm3/test/wasi/simple/0.txt diff --git a/ext/wasm3/test/wasi/simple/README.md b/src/ext/wasm3/test/wasi/simple/README.md similarity index 100% rename from ext/wasm3/test/wasi/simple/README.md rename to src/ext/wasm3/test/wasi/simple/README.md diff --git a/ext/wasm3/test/wasi/simple/test.c b/src/ext/wasm3/test/wasi/simple/test.c similarity index 100% rename from ext/wasm3/test/wasi/simple/test.c rename to src/ext/wasm3/test/wasi/simple/test.c diff --git a/ext/wasm3/test/wasi/simple/wasm_api.h b/src/ext/wasm3/test/wasi/simple/wasm_api.h similarity index 100% rename from ext/wasm3/test/wasi/simple/wasm_api.h rename to src/ext/wasm3/test/wasi/simple/wasm_api.h diff --git a/ext/wasm3/test/wasi/simple/wasm_api.syms b/src/ext/wasm3/test/wasi/simple/wasm_api.syms similarity index 100% rename from ext/wasm3/test/wasi/simple/wasm_api.syms rename to src/ext/wasm3/test/wasi/simple/wasm_api.syms diff --git a/ext/wasm3/test/wasi/smallpt/README.md b/src/ext/wasm3/test/wasi/smallpt/README.md similarity index 100% rename from ext/wasm3/test/wasi/smallpt/README.md rename to src/ext/wasm3/test/wasi/smallpt/README.md diff --git a/ext/wasm3/test/wasi/smallpt/image.jpg b/src/ext/wasm3/test/wasi/smallpt/image.jpg similarity index 100% rename from ext/wasm3/test/wasi/smallpt/image.jpg rename to src/ext/wasm3/test/wasi/smallpt/image.jpg diff --git a/ext/wasm3/test/wasi/smallpt/smallpt-ex.cpp b/src/ext/wasm3/test/wasi/smallpt/smallpt-ex.cpp similarity index 100% rename from ext/wasm3/test/wasi/smallpt/smallpt-ex.cpp rename to src/ext/wasm3/test/wasi/smallpt/smallpt-ex.cpp diff --git a/ext/wasm3/test/wasi/smallpt/smallpt.cpp b/src/ext/wasm3/test/wasi/smallpt/smallpt.cpp similarity index 100% rename from ext/wasm3/test/wasi/smallpt/smallpt.cpp rename to src/ext/wasm3/test/wasi/smallpt/smallpt.cpp diff --git a/ext/wasm3/test/wasi/stream/stream.c b/src/ext/wasm3/test/wasi/stream/stream.c similarity index 100% rename from ext/wasm3/test/wasi/stream/stream.c rename to src/ext/wasm3/test/wasi/stream/stream.c diff --git a/ext/wasm3/test/wasi/wasmboy/.gitignore b/src/ext/wasm3/test/wasi/wasmboy/.gitignore similarity index 100% rename from ext/wasm3/test/wasi/wasmboy/.gitignore rename to src/ext/wasm3/test/wasi/wasmboy/.gitignore diff --git a/ext/wasm3/test/wasi/wasmboy/README.md b/src/ext/wasm3/test/wasi/wasmboy/README.md similarity index 100% rename from ext/wasm3/test/wasi/wasmboy/README.md rename to src/ext/wasm3/test/wasi/wasmboy/README.md diff --git a/ext/wasm3/test/wasi/wasmboy/image.png b/src/ext/wasm3/test/wasi/wasmboy/image.png similarity index 100% rename from ext/wasm3/test/wasi/wasmboy/image.png rename to src/ext/wasm3/test/wasi/wasmboy/image.png diff --git a/ext/wasm3/test/wasi/wasmsynth/README.md b/src/ext/wasm3/test/wasi/wasmsynth/README.md similarity index 100% rename from ext/wasm3/test/wasi/wasmsynth/README.md rename to src/ext/wasm3/test/wasi/wasmsynth/README.md diff --git a/ext/wasm3/test/wasi/wasmsynth/image.png b/src/ext/wasm3/test/wasi/wasmsynth/image.png similarity index 100% rename from ext/wasm3/test/wasi/wasmsynth/image.png rename to src/ext/wasm3/test/wasi/wasmsynth/image.png