second-state / wasmedge-quickjs

A high-performance, secure, extensible, and OCI-complaint JavaScript runtime for WasmEdge.
Apache License 2.0
477 stars 59 forks source link

A new release on crates.io #108

Closed OptimusePrime closed 1 year ago

OptimusePrime commented 1 year ago

Could the authors publish the latest version on crates.io so we can embed it in other software?

EDIT: I forked the project and released it on crates.io under the name encedeus_js_runtime. The only difference is that I embedded the modules folder directly inside the binary, which adds the Node.js compatibility layer to the engine without having to create a symbolic link for the modules directory. The API is exactly the same.

alabulei1 commented 1 year ago

@L-jasmine Please take a look! Thanks.

L-jasmine commented 1 year ago

@OptimusePrime Your fork looks great. Regarding publishing to crates, I've made some significant API changes in the new version, mainly to enable Rust's Future to be converted into a JavaScript promise. There are a few bugs related to this, and we will release it after fixing these issues.

OptimusePrime commented 1 year ago

@L-jasmine Is there any reason the modules directory isn't embedded in the binary in the official version, or is it just for flexibility?

L-jasmine commented 1 year ago

@OptimusePrime Yes. Because after embedding, the wasm file becomes very large.

OptimusePrime commented 1 year ago

@OptimusePrime Yes. Because after embedding, the wasm file becomes very large.

I see. That's not a big problem for my use case, but it could be a big problem for some apps.

EDIT: I thought it may have been due to some potential security exploit due to embedding.