You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like llc compiles mod.ll just fine to a wasm object, and then wasm-ld actually generates the wasm file. This is really great except I want to target wasi and lunatic imports with proper namespaces.
(import"env""lunatic.add" (func(;0;) (type0)))
In clang, you can designate a symbol as imported from an arbitrary modname and name with syntax like attribute((import_module("wasi_snapshot_preview1"), import_name("path_open"))).
Which in LLVM IR appears to translate to something like:
Is there currently a way to do this programatically using the bindings or is that a true feature request? I would genuinely love to make a compiler that compiles directly to wasm.
The text was updated successfully, but these errors were encountered:
I currently am using
llvm-bindings
for a toy compiler that I might turn into something bigger.I can currently generate the following llvm using the node module on ubuntu.
This is genuinely awesome and very accessible for node devs and I want to thank you for this effort.
However when I try to use wasm-ld to make a wasm file like this...
It looks like llc compiles mod.ll just fine to a wasm object, and then wasm-ld actually generates the wasm file. This is really great except I want to target wasi and lunatic imports with proper namespaces.
In clang, you can designate a symbol as imported from an arbitrary modname and name with syntax like attribute((import_module("wasi_snapshot_preview1"), import_name("path_open"))).
Which in LLVM IR appears to translate to something like:
and then stick #2 on the declaration.
Is there currently a way to do this programatically using the bindings or is that a true feature request? I would genuinely love to make a compiler that compiles directly to wasm.
The text was updated successfully, but these errors were encountered: