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
The most annoying thing about current implementation it's that I can't easily interop with other languages. That's probably the biggest weakness of the Nevalang now. Probably would be simpler if only we could compile down to wasm/jvm/beam. I have now idea have last 2 works, wasm is something that at least feels close to web but it lacks green-threads. I also don't have much time. Also I like the idea of having runtime introspection, tracing, high level of control over execution. That's probably not an option with e.g. wasm (i.e. very hard to achieve).
How this could be implemented with current runtime? C FFI, CGO. Dynamic using of cgo means generating go code. Option that we already tried (and it worked! but feels heavy). Don't wanna depend on Go compiler, also wanna have fast compilation.
Looks like our only option is dynamic linking via dlopen (to load the library) and dlsym (to get the address of the function in the loaded library).
It implements green threads via Rust's tokio and exposes some low level API via host functions to wasm. Grain, Rust and AssemblyScript have bindings to this thing but it looks too complicated giving that small amount of time I currently have
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The most annoying thing about current implementation it's that I can't easily interop with other languages. That's probably the biggest weakness of the Nevalang now. Probably would be simpler if only we could compile down to wasm/jvm/beam. I have now idea have last 2 works, wasm is something that at least feels close to web but it lacks green-threads. I also don't have much time. Also I like the idea of having runtime introspection, tracing, high level of control over execution. That's probably not an option with e.g. wasm (i.e. very hard to achieve).
How this could be implemented with current runtime? C FFI, CGO. Dynamic using of cgo means generating go code. Option that we already tried (and it worked! but feels heavy). Don't wanna depend on Go compiler, also wanna have fast compilation.
Looks like our only option is dynamic linking via
dlopen
(to load the library) anddlsym
(to get the address of the function in the loaded library).Just in case there will be a hope for wasm - https://lunatic.solutions/
It implements green threads via Rust's tokio and exposes some low level API via host functions to wasm. Grain, Rust and AssemblyScript have bindings to this thing but it looks too complicated giving that small amount of time I currently have
Beta Was this translation helpful? Give feedback.
All reactions