saghul / txiki.js

A tiny JavaScript runtime
MIT License
2.55k stars 172 forks source link

How do i compile this to emscripen? #186

Closed ScriptedAlchemy closed 2 years ago

ScriptedAlchemy commented 2 years ago

Your library seems to include fetch and many other things that existing ones do not have out of the box.

How could one use this project with emscripten / generate a JS file alongside a single .wasm file

That would allow me to instantiate this in a client / existing server via require() and pass evalCode into the wasm module

saghul commented 2 years ago

I'm not sure this can be compiled to Emcripten. QuickJS can, but this library depends on libuv and cURL, which I don't think would work.

ScriptedAlchemy commented 2 years ago

We are exploring quick with rust and retrofitted bindings to enable bindings to any host IO. Like cloudflare for example

Thanks for the quick response!