javy icon indicating copy to clipboard operation
javy copied to clipboard

Is It Possible to Link External Libraries with Javy?

Open HyperDwarf opened this issue 1 year ago • 3 comments

What is your question?

As long as Javy provides zero support for CommonJS / NodeJS API, I would have to implement some stuffs like json parsing, compression and RSA signing by myself in order to use Javy. If Javy eventually compiles js into wasm, are there any chances of using C libraries that also target WebAssembly in Javy?

HyperDwarf avatar Sep 10 '24 09:09 HyperDwarf

If Javy eventually compiles js into wasm, are there any chances of using C libraries that also target WebAssembly in Javy?

Currently this is not possible, however, it's in our roadmap to allow extensibility in Javy generated modules.

stuffs like json parsing

A clarification: Javy does support JSON parsing/stringifying, in fact as of the latest changes in main, you can use a faster more performant JSON implementation based on SIMD .

saulecabrera avatar Sep 10 '24 09:09 saulecabrera

Currently this is not possible, however, it's in our roadmap to allow extensibility in Javy generated modules.

Many thanks for the reply.

A clarification: Javy does support JSON parsing/stringifying, in fact as of the latest changes in main, you can use a faster more performant JSON implementation based on SIMD .

I didn't noticed that there's a support for JSON serialization. Could you shed some light on the list of built-in APIs in Javy? I haven't been able to find it anywhere. It seems that most Node.JS modules like crypto are not supported by Javy, but I am not pretty sure what is supported at this point.

HyperDwarf avatar Sep 10 '24 11:09 HyperDwarf

Once https://github.com/bytecodealliance/javy/pull/752 lands, we'll have an official document on the API support: https://github.com/bytecodealliance/javy/blob/dae9fde26850d266944fe8eac28c83ba70447de7/docs/docs-using-js-api-support.md

saulecabrera avatar Sep 13 '24 15:09 saulecabrera