Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/serprex/luwa
WIP jit lua to wasm
https://github.com/serprex/luwa
jit lua wasm
Last synced: 3 months ago
JSON representation
WIP jit lua to wasm
- Host: GitHub
- URL: https://github.com/serprex/luwa
- Owner: serprex
- Created: 2017-03-21T01:20:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-06T13:25:21.000Z (almost 6 years ago)
- Last Synced: 2024-10-15T20:01:57.607Z (3 months ago)
- Topics: jit, lua, wasm
- Language: Lua
- Homepage:
- Size: 668 KB
- Stars: 94
- Watchers: 11
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
[![Build](https://travis-ci.org/serprex/luwa.svg?branch=master)](https://travis-ci.org/serprex/luwa)
Luwa's end goal is to JIT to [WASM](https://webassembly.org). Right now it's a bit of a learning environment for me as I've never [written a language implementation](https://esolangs.org/wiki/User:Serprex) that required real parsing
I'll try avoid my usual stream of consciousness here, instead that's at [my devlog](https://patreon.com/serprex)
[`main.js`](main.js) is nodejs entrypoint
WASM runtime is in `rt/`. [`rt/make.lua`](rt/make.lua) is luwa-agnostic macro-assembler logic. [`mkrt.lua`](rt/mkrt.lua) produces an `rt.wasm` which [`rt.js`](rt.js) interfaces
GC is a LISP2 compacting GC. GC performance is a low priority given WASM GC RFC. See [`rt/gc.lua`](rt/gc.lua)
VM needs to be reentrant. Currently running coroutine is oluastack. Builtins which call functions work by returning after setting up a necessary callstack. See [`rt/vm.lua`](rt/vm.lua)
[`rt/prelude.lua`](rt/prelude.lua) implements builtins which do not require hand written wasm