summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-10-31Bring back u32 and u64Mica White
2026-10-31Merge branch 'main' into bota-tortuiseMica White
2026-10-31UpdateMica White
2026-09-22feat: add missing apis for c-apiHEADmainHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-19chore: v0.11.0Henry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-18fix: store gc keys in heap, fix utf 16 string handlingHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-16chore: 0.11.0-beta.0Henry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-16ci: add audit actionHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-16fix: harden instantiation, stream parsing, and host reentrancyHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-15feat: initial wasi p1 implementationHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-14feat: add custom store stateHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-14chore: update changelog, fix clippy issuesHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-14perf: optimize nightly tail dispatchHenry
Similar to #55 but with only safe code. LLVM seems so optimize the discriminant conversion away. Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-14feat: replace parser optimizer with streaming selectionHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-13chore: update deps, remove inline from dispatch handlers (closes #55)Henry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-09-10fix(parser): do not fuse local.get/local.tee across a branch target (#56)Steve Fan
I was trying to compile TCC to WASI and run it using tinywasm thanks to the exception implementation (sigh, which is because of the use of setjmp/longjmp for compiler rewind, that's the whole reason, WASI syscall is really not that hard to say the least), but it went into a mysterious bug that keeps trapping on the same address. And yes, that means I did have a WASIp1 implementaion and I actually implemented it with a VFS (nix the network socket just yet), so I can theoretically have a cross-platform JIT compiler where I can have safe reentrancy, and it is not until recently the TCC mob branches have their TLS implementations, but it is all too late and they still rely on CRT. It is also theoretically possible. So my plan is to compile libtcc as small as possible to WASI using fat LTO, and I keep getting trapped on the same address. Under NodeJS with a shim WASI implementation, the whole libtcc fat LTO WASI actually works. So it has to be a problem in tinywasm Claude said this (it is Fable 5.1 btw): > `visit_local_tee` peeked at the last emitted instruction and, when it was a `local.get`, replaced the pair with `LocalCopy(src, dst); LocalGet(dst)`. It never checked whether the tee's position is a jump target. When the `local.get` is a block's fallthrough result and the `local.tee` is the first instruction after `end`, every branch to that label lands on `LocalGet(dst)` instead of the tee: the branch's value is left dangling on the stack and a stale local is pushed on top. Loop starts and if/else joins have the same shape. > > TinyCC compiled with clang -Os/-Oz hit this in musl's realloc: the `if (!p) { r = malloc(n); br 1 }` path returned n instead of r, so the caller wrote into address 1200 and later trapped with an out-of-bounds load, while V8 and wabt ran the same module correctly. > > The lowering step now always emits a plain `LocalTee`. The fusion moves into the peephole rewriter, which only matches within a basic block and so cannot cross a label. Regression test covers the block-end, if/else-join and loop-start cases. > I will try to use https://www.npmjs.com/package/@yowasp/clang to see if there are more VM shenanigans, though a simple benchmark shows me that the interpreter is 17x slower than native, and I guess the clang in tinywasm wouldn't take less than 3 minutes to get a meaningful outcome -- except if it blows up midway during execution.
2026-09-09MergeMica White
2026-08-29feat: add nightly tail-call interpreter dispatchHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-29chore: improve optimizer and simplify function executionHenry
- add stack-constant and fused local-update rewrites - split host and Wasm function storage and execution paths - add the default full feature - recursively discover WAST test files Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-28chore: simplify ToWasmTypes traits, general cleanupHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-27chore: fix testsHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-27chore: simplify operands, extract more exec_ methodsHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-25chore: share passive data segments across instancesHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-25feat: add support for portable-atomic, add send featureHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-25chore: change exec() to return ControlFlowHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-24docs: add CODE_OF_CONDUCT.md / update CONTRIBUTING.mdHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-24feat: add host typed reference / gc APIs (#54)Henry Gressmann
- add Store-aware handles for references, GC objects, and exceptions - simplify host value conversion, rooting, and exception propagation - update examples, tests, and documentation - Remove deprecated APIs Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-23chore: simplify InternalValue trait, improve address calculationsHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-23chore(parser): avoid cloning call signatures during loweringHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-23chore: ensure 'type mismatch' tests are executedHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-23feat: add ResourceLimiter::gc_growingHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-23chore: remove LinearMemory trait (#53)Henry Gressmann
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-17chore: reduce instruction enum size (#52)Henry Gressmann
this is a fairly big commit since I've been just playing around with this for a while now. the main goal is to reduce instruction size by moving some operands into two separate vecs. memory operations still seem like the biggest issue right now, so as a follow op I'll probably remove the public linear memory trait again but let's see how this goes first. performance wise this is about the same as before, but serialization/deserialization is about 20% faster now. Signed-off-by: Henry <mail@henrygressmann.de> --------- Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-12fix: correct memory64 execution and backend errorsHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-12chore: simplify validator feature set, allow compact importsHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-12chore: improve interpreter performance, add cold path macrosHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-11chore: more superinstructions, cleanupHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-11chore: improve interpreter loop performance, add more super instructionsHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-10chore: cleanup tests / devdeps, fix doom exampleHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-10chore: simplify runtime and clean up testsHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-10docs: update architecture, docsHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-09feat: initial exception supportHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-09feat: add reusable host imports and simplify function callsHenry
- make host definitions reusable across stores with gc-aware import linking - reorganize function calls, resumable execution, and typed value handling - expand typed tuples to arity 20 and update parser and store APIs Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-08chore: general cleanup, fix performance regressionsHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-08chore: store globals in different lanes based on sizeHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-08feat: initial support for the webassembly gc proposal (#50)Henry Gressmann
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-02docs: update readmeHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-02feat: add validate featureHenry
Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-02feat: typed function references (#49)Henry Gressmann
Signed-off-by: Henry <mail@henrygressmann.de> --------- Signed-off-by: Henry <mail@henrygressmann.de>
2026-08-01chore: update testsHenry
Signed-off-by: Henry <mail@henrygressmann.de>