Skip to content

Commit

Permalink
Wasm compatibility (#7)
Browse files Browse the repository at this point in the history
* make code wasm-compatible

Note: only the main code compiles, not the tests yet

* fix tests, use standard Felts

* update readme

* fix dependencies

* chore(trie): make it fully wasm compatible

* chore(logs): add logs back

* chore(proof): add wasm compat

* fix: resoluve review

* fix suggestions

* impl suggestions

---------

Co-authored-by: Damir Vodenicarevic <[email protected]>
  • Loading branch information
0xLucqs and damip committed Jan 25, 2024
1 parent 5c3f208 commit 5b8b67a
Show file tree
Hide file tree
Showing 29 changed files with 1,126 additions and 5,436 deletions.
77 changes: 41 additions & 36 deletions .github/workflows/check_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,56 @@ on:
- oss


name: Check and Lint
name: Check and Lint and no-std

jobs:
check:
name: Check
build-no-std:
name: Build no-std
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check

- uses: actions/checkout@v3
- name: Install rust
working-directory: ./ensure_no_std
run: rustup show
- name: Build no-std
run: cargo build

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions/checkout@v3
- name: Install rust
run: rustup show
- name: Check format
run: cargo fmt --check --all

clippy-all-features:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install rust
run: rustup show
- name: Clippy all features
run: cargo clippy --all-features

clippy-default-features:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install rust
run: rustup show
- name: Clippy default features
run: cargo clippy

clippy:
clippy-no-std:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
name: Clippy Output
- uses: actions/checkout@v3
- name: Install rust
run: rustup show
- name: Clippy no-std
run: cargo clippy --no-default-features
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
tree;
zip -0 ccov.zip `find . \( -name "$PROJECT_NAME_UNDERSCORE*.gc*" \) -print`;
grcov ccov.zip -s . -t lcov --llvm --ignore-not-existing --ignore "/*" --ignore "tests/*" -o lcov.info;
cargo test $CARGO_OPTIONS --no-default-features
- name: Upload test results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
target/
rocksdb/
.vscode/
documentation/node_modules/
documentation/node_modules/
Cargo.lock
Loading

0 comments on commit 5b8b67a

Please sign in to comment.