Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewrk/lua-in-the-browser
using zig to build lua for webassembly
https://github.com/andrewrk/lua-in-the-browser
lua webassembly zig
Last synced: 3 months ago
JSON representation
using zig to build lua for webassembly
- Host: GitHub
- URL: https://github.com/andrewrk/lua-in-the-browser
- Owner: andrewrk
- Created: 2019-05-16T23:54:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-16T23:56:53.000Z (over 5 years ago)
- Last Synced: 2024-10-05T14:45:49.548Z (4 months ago)
- Topics: lua, webassembly, zig
- Language: C
- Size: 205 KB
- Stars: 32
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-zig - andrewrk/lua-in-the-browser
- awesome-zig - lua-in-the-browser🗒️using zig to build lua for webassembly
README
# lua-in-the-browser
This is the result of a
[2.5 hour live coding stream](https://youtu.be/DtZBac-IUBQ) in which I tried
to build [Lua](https://www.lua.org/) using [ZIG](https://ziglang.org/),
targeting [WebAssembly](https://webassembly.org/).# Status
Able to produce `lib/lua.wasm`, however in the browser it says
`LinkError: import object field 'getc' is not a Function`.To make further progress it is required to make modifications to Lua
source code in order to remove the dependency on a file system.This depends on
[pending modifications to Zig](https://github.com/ziglang/zig/pull/2512).# How to build it and run it
```
zig build install --prefix .
python3 -m http.server
```Then visit the link printed with a modern browser such as Firefox.