Comments (2)
There are no examples yet sadly. It should be enough however to run the wasm2luajit
tool on the WebAssembly file of your choice to translate it.
From there, it'll produce a module returning a sort of init function. Call that function with any host functions that your C code expects your Lua to implement (if any), and it will return a table with the module parts. Then, you should be able to call the C functions from the func_list
directly.
from wasynth.
While we currently lack a specific C example (I will get to it eventually), the new Rust one explains some universal concepts.
https://github.com/Rerumu/Wasynth/wiki/From-Rust,-to-Lua
It sounds here like you want to specifically use a C library, in which case you'd just interface with the exports from the Lua end like I mentioned previously.
from wasynth.
Related Issues (18)
- LuaJIT pointer operations may have odd behavior
- How to install? HOT 2
- Too much noise from `write_constant`
- Lacking `BrTable` optimization
- Non-emitted function usage from rust
- (Luau) `br_table.wast.lua` test fails due to recursion depth limit HOT 2
- (Luau-only) Many 32 bit tests fail due to 32 bit numbers using 64 bit APIs HOT 2
- Tests with `assert_trap` not generated for `start` HOT 4
- `loop.wast` infinite loop (`luau_translate` only) HOT 1
- LuaJIT `clz`, `ctz`, and `popcnt` are bad
- Make the output formatted HOT 1
- Add `BrTable` optimization heuristic
- Type LuaJIT code as much as possible
- WASM memory.copy instruction unimplemented HOT 2
- Luau register allocation runs out of registers HOT 4
- Undefined behavior regarding bit32 truncation causes differences amongst x86 and other platforms
- tiny bug: wasm2luau says it is wasm2luajit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasynth.