Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] add cairo-wasm support for Shinigami frontend #240

Open
okhaimie-dev opened this issue Oct 1, 2024 · 7 comments · May be fixed by #290
Open

[feat] add cairo-wasm support for Shinigami frontend #240

okhaimie-dev opened this issue Oct 1, 2024 · 7 comments · May be fixed by #290
Labels

Comments

@okhaimie-dev
Copy link
Contributor

Cairo wasm allows users to run Cairo program directly on the client. Starklings app leverages this to run starklings in browser which improves the application performance. Currently working on creating a similar solution for Shinigami

References

wasm-cairo
starklings-app

@ShantelPeters
Copy link
Contributor

Hi @okhaimie-dev please can I work on this issue

@cryptonerdcn
Copy link

OK I am here now.
Cause Shinigami using cairo 2.8.2 now, I need to update WASM-Cairo to this version first.

@supreme2580
Copy link
Contributor

supreme2580 commented Oct 16, 2024

A few things contributors need to know before attempting this issue

  • cairo-wasm only compiles single file cairo code
  • cairo-wasm library is being updated to match shinigami's current version
  • writing a script to merge all shinigami cairo code into one file and manually fixing is possible... but is challenging when you factor in that shinigami uses external packages such as ripemd160, sha1 and cairo_test.
  • compiling opcodes on the frontend using a library such as bitcoinjs-lib is not adviced as opcodes such as OP_DATA_X (X being the number of the opcode) is not supported
  • running shinigami on the backend is super slow and requires lots of server resources per request

@b-j-roberts
Copy link
Contributor

Thank you for posting your findings! I'll mark this as blocked for now since cairo-wasm only compiles for single file cairo code.

@cryptonerdcn
Copy link

cryptonerdcn commented Oct 21, 2024

Thank you for posting your findings! I'll mark this as blocked for now since cairo-wasm only compiles for single file cairo code.

For contributors:
WASM-Cairo needs this feature of WASM to support multi files. https://github.com/WebAssembly/wasi-filesystem?tab=readme-ov-file

I am also finding another way for some large Cairo project like Shinigami for this.
@b-j-roberts Do we need change Shinigami's Cairo code frequently on the frontend?

@cryptonerdcn
Copy link

@b-j-roberts @okhaimie-dev @supreme2580
Hey guys! WASM-Cairo now support Cairo v2.8.2.

https://github.com/cryptonerdcn/wasm-cairo/releases/tag/v0.10.2

@supreme2580
Copy link
Contributor

Great🚀🚀🚀 looking forward to using it

@supreme2580 supreme2580 linked a pull request Dec 27, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants