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

Make code wasm-compatible #3

Closed
wants to merge 12 commits into from

Conversation

damip
Copy link
Contributor

@damip damip commented Dec 21, 2023

Make the code compile and function for target:

cargo build --release --target wasm32-unknown-unknown --no-default-features

Constraints:

Note: only the main code compiles, not the tests yet
@damip damip marked this pull request as draft December 21, 2023 14:12
Cargo.toml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/felt.rs Outdated Show resolved Hide resolved
@damip
Copy link
Contributor Author

damip commented Dec 22, 2023

  • All tests now pass
  • rs-types Felts are now in use
  • the code compiles with a wasm target with cargo build --release --target wasm32-unknown-unknown --no-default-features

The only remaining issue is that the rocksdb crate does not compile for wasm targets when the rocksdb feature is enabled.

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

@damip damip marked this pull request as ready for review December 22, 2023 10:21
@damip damip requested a review from 0xLucqs December 22, 2023 15:24
Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@tdelabro
Copy link
Contributor

tdelabro commented Dec 22, 2023

The only remaining issue is that the rocksdb crate does not compile for wasm targets when the rocksdb feature is enabled.

wasm doesn't know about the filesystem. Rockdb, has to know about it in order to write to it.
So I don't think it will be solvable.
You can't have both, if you are using the lib in wasm, your db cannot be using the fs like rockdb does. It will have to be an on-memory thing. Like an hashmap

Eitu33 referenced this pull request in massalabs/bonsai-trie Jan 8, 2024
@tdelabro
Copy link
Contributor

I saw some activity here. What is the current state?

@0xLucqs
Copy link
Collaborator

0xLucqs commented Jan 11, 2024

after that is merged we should be good here

@0xLucqs
Copy link
Collaborator

0xLucqs commented Jan 11, 2024

@tdelabro you can review now

.github/workflows/check_lint.yml Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
ensure_no_std/rust-toolchain.toml Show resolved Hide resolved
src/key_value_db.rs Show resolved Hide resolved
src/error.rs Show resolved Hide resolved
src/id.rs Show resolved Hide resolved
src/tests/madara_comparison.rs Show resolved Hide resolved
src/tests/proof.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
@0xLucqs 0xLucqs mentioned this pull request Jan 15, 2024
@tdelabro
Copy link
Contributor

superseded by #7

@tdelabro tdelabro closed this Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants