aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2026-10-17Remove Vendored WAMR CodeNicholas Rodrigues Lordello
2026-10-10Fixed Minor Portability IssuesNicholas Rodrigues Lordello
2026-09-28Remove STB Static LibraryNicholas Rodrigues Lordello
We now build STB image library directly in the `cart` module, so we no longer need to build it as a static library.
2026-09-12Instantiate Test WASM ModuleNicholas Rodrigues Lordello
In order to play around and understand how to use WAMR and what host functions are actually needed by the PICO-8 WASM module, add some test code to PICO-w. **This will be removed**.
2026-06-27Collapse png.c Into MainNicholas Rodrigues Lordello
The `png` module was tiny and not worth being on its own. Instead build the STB image code into a `lib/stbi.c`. This was prompted because we wanted to lint with `clang-tidy` and it was pulling in STB code because it is a single header library.
2026-06-21Update WAMR to 2.4.4Nicholas Rodrigues Lordello
Update WAMR to the latest release (2.4.4). Note that we needed to pull in a couple additional unused headers (AoT related stuff, which we do not have enabled).
2025-09-18Update Build SystemNicholas Rodrigues Lordello
We now build WAMR sources directly into our binary (instead of using a static library). Additionally, we now split the build into multiple files to make things more manageable.
2025-06-14Embed Sysroot Into BinaryNicholas Rodrigues Lordello
We now embed the PICO-w sysroot files (the WASM blob, data pod and boot rom) into the final `picow` binary in order to simplify distribution. This commit adds a new `generate-sysroot` tool to achieve it.
2025-04-21Export Memory and TableNicholas Rodrigues Lordello
In our WAMR test, export memory and table to make sure the runtime works with the PICO-8 WASM blob.
2025-04-21Add Support For Global ImportsNicholas Rodrigues Lordello
We now support global imports; this was quite a bit more complicatd than expected: 1. `clang` does not have a built-in mechanism for emitting Wasm with global imports, so we need to do some manual `__asm__` in order to get it to work. 2. There are not runtime functions in WARM for linking global imports in a module. We added a runtime function for manually linking global imports with a specified list of native globals. In theory, it would have been nice to register the globals so that they get linked at module initialization time, but this would have been a lot more work as it would have required editing the loader code.
2025-04-20Cleanup WAMR BuildNicholas Rodrigues Lordello
We now have a dedicated `custom` folder, and build is a bit nicer IMO. No idea how to global imports works though :/
2025-04-20Fibonacci Test PassesNicholas Rodrigues Lordello
We can now run the fibonacci program, including a native function import. This is a great first step, and now we need to start implementing PICO-8 library functions (basically, `emcc` library, but one that is both more stubbed and supports the `setjmp` and `longjmp` which does not appear to be the case for the included implementation in WAMR). But before, a small build system refactoring detour to make building WAMR and PICO-w easier for both SDL platforms and Vita platform. Additionally, the platform stubs that we use in the WAMR test might need to change a bit, in order to allow PICO-w SDL and Vita platforms to implement certain details differently.
2025-04-20Fibonacci Executes!Nicholas Rodrigues Lordello
However, it looks like the native function we install isn't getting called correctly for whatever reason. I wonder if it is related to the fact that we are using the `invokeNative_general` implementation instead of the dedicated `aarch64` one?
2025-04-16Add Fibonacci TestNicholas Rodrigues Lordello
We compile, link, and load a module. We are still erroring out, but we are getting closer little by litte!
2025-04-15Started Implementing Test BinaryNicholas Rodrigues Lordello
There are a bunch of symbols that the linker can't find that we need to start stubbing. I _hope_ the PS Vita has enough support for all of them!
2025-04-15Don't Build Emcc LibraryNicholas Rodrigues Lordello
It requires us to stub a bunch of Unix APIs, and we will arguably need to implement a custom version that matches the behaviour of the PICO-8 exported JavaScript file.
2025-04-15Build WAMRNicholas Rodrigues Lordello
We can now build WAMR with a stubbed platform, but no idea if it actually works and links!
2025-04-14PNG Decoding SupportNicholas Rodrigues Lordello
We can decode PNGs from memory buffers, and soon be able to also load the cart roms from there. Still need to figure out if how the scanlines are organized in memory are correct, or if I got some order backwards (I'm new to C multi-dimentional arrays hehe...)
2025-04-13Started Implenting SDL3 Front-EndNicholas Rodrigues Lordello
We now start an SDL3 front-end for PICO-w. We can load roms :)