Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/rust/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ runs:
# Resolve new versions only for compatibility runs, before computing cache keys.
- name: Update dependencies
if: inputs.update-dependencies == 'true'
run: cargo update
run: |
cargo update
cargo update --manifest-path poi-rs/Cargo.toml
shell: bash

- name: Cache cargo
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ jobs:
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
# poi-rs is its own workspace with its own lockfile. Runs from the repository root so
# .cargo/audit.toml applies.
- name: Audit the Proof of Inclusion lockfile
run: |
cargo install cargo-audit --locked
cargo audit --file poi-rs/Cargo.lock
15 changes: 15 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ jobs:
awk '{print $1}' | \
xargs -I {} cargo check --locked -p {}

# poi-rs is its own workspace (own Cargo.lock); build into the shared target dir for caching.
- name: Check Proof of Inclusion workspace
if: matrix.os == 'ubuntu-24.04'
run: |
cargo check --locked --manifest-path poi-rs/Cargo.toml --target-dir target --no-default-features
cargo check --locked --manifest-path poi-rs/Cargo.toml --target-dir target
cargo check --locked --manifest-path poi-rs/Cargo.toml --target-dir target --all-features

# Remove debug artifacts from feature checks while preserving cached release artifacts.
- name: Clean debug target
if: matrix.os == 'ubuntu-24.04'
Expand Down Expand Up @@ -196,10 +204,17 @@ jobs:
# Build afterward so tests and examples reuse artifacts from the final Move inputs.
- name: Build with default features
run: cargo build --locked --workspace --tests --examples --release
# Library and CLI on every platform. The test-cluster tests (and the IOTA node stack they
# compile) only build in the Ubuntu test step below.
- name: Build Proof of Inclusion
run: cargo build --locked --manifest-path poi-rs/Cargo.toml --target-dir target --release --all-features

- name: Run tests
if: matrix.os != 'windows-latest'
run: cargo test --locked --workspace --release -- --test-threads=1
- name: Run Proof of Inclusion tests
if: matrix.os == 'ubuntu-24.04'
run: cargo test --locked --manifest-path poi-rs/Cargo.toml --target-dir target --release --all-features -- --test-threads=1

- name: Run Rust examples
# run examples only on ubuntu for now
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
with:
args: --all-targets --all-features -- -D warnings

- name: Proof of Inclusion clippy check
run: cargo clippy --manifest-path ./poi-rs/Cargo.toml --all-targets --all-features -- -D warnings

- name: Wasm clippy check notarization_wasm
uses: actions-rs-plus/clippy-check@b09a9c37c9df7db8b1a5d52e8fe8e0b6e3d574c4
if: ${{ false }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
- name: core fmt check
run: cargo +nightly fmt --all -- --check

- name: Proof of Inclusion fmt check
run: cargo +nightly fmt --manifest-path ./poi-rs/Cargo.toml --all -- --check

- name: wasm fmt check notarization_wasm
run: cargo +nightly fmt --manifest-path ./bindings/wasm/notarization_wasm/Cargo.toml --all -- --check

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rust-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
with:
command: doc
args: --workspace --no-deps
- name: Generate Proof of Inclusion documentation
run: cargo doc --manifest-path poi-rs/Cargo.toml --target-dir target --no-deps
- name: Upload static files as artifact
uses: actions/upload-pages-artifact@v3
if: ${{ !inputs.dry-run }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target
/poi-rs/target
/.history

.vscode
Expand Down
8 changes: 7 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ IOTA Notarization enables creation of immutable, on-chain records for arbitrary
cargo build --workspace --tests --examples
cargo check -p notarization-rs
cargo check -p audit-trail-rs

# Proof of Inclusion is its own workspace (poi-rs/Cargo.toml, own Cargo.lock)
cargo check --manifest-path poi-rs/Cargo.toml --all-features
```

### Test
Expand All @@ -82,6 +85,9 @@ cargo test --workspace --release -- --test-threads=1
# Single test
cargo test --release -p notarization-rs test_name -- --test-threads=1

# Proof of Inclusion tests (in-process test cluster, no sandbox needed)
cargo test --manifest-path poi-rs/Cargo.toml --all-features -- --test-threads=1

# Move contract tests (from notarization-move/ or audit-trail-move/)
iota move test
```
Expand Down Expand Up @@ -216,7 +222,7 @@ Use `examples::get_funded_notarization_client()` to get a `NotarizationClient<In

## Workspace Structure

The root `Cargo.toml` defines a workspace with members: `notarization-rs`, `audit-trail-rs`, `examples`. The WASM crates (`bindings/wasm/*`) are excluded from the workspace and built separately.
The root `Cargo.toml` defines a workspace with members: `notarization-rs`, `audit-trail-rs`, `examples`. `poi-rs` (Proof of Inclusion) and the WASM crates (`bindings/wasm/*`) are excluded from the workspace and built separately. `poi-rs` is its own workspace with its own `Cargo.lock`, so it can follow IOTA node and SDK releases independently of `product-core`.

- **`notarization-rs/`** — Rust client library for notarization
- **`notarization-move/`** — Move smart contracts for notarization
Expand Down
Loading
Loading