cryptonerdcn / wasm-cairo

A suite of development tools and a WASM-Runtime environment for Cairo. All based on WebAssembly. By Caironautes, for Caironautes.
https://wasm-cairo-landing.vercel.app/
Apache License 2.0
53 stars 11 forks source link

JS -> Cairo -> JS function call #25

Open henry-hz opened 3 months ago

henry-hz commented 3 months ago

I found 2 projects as example for cairo with wasm, the astro editor and the starklings [https://app.onlydust.com/p/wasm-cairo] . Is the actual state of the cairo wasm is limited to compiling the code on the browser ? The documentation is scarce and both examples are limited. Could you help us to find [or create] an example of a simple cairo function that "talks" with the JS, like 'fn x = x + 1' ? so we can send the number 3 from JS to the cairo wasm module, and get 4 back on the JS UI.

thanks hh

cryptonerdcn commented 1 month ago

It is still impossible because Cairo doesn't have a good hint for that. I am also finding the solution for this.