- Install Rust
1.85or newer. - Clone the repository and fetch submodules if your workflow requires them.
- Build the workspace:
cargo check --workspaceRun these commands before opening a PR:
cargo fmt --all
cargo +1.85.0 check --workspace --all-targets --all-features --locked
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo audit
cargo check --workspace --examples
cargo check -p aelf-client --target wasm32-wasip2 --no-default-features
cargo check -p aelf-contract --target wasm32-wasip2 --no-default-features
cargo check -p aelf-sdk --target wasm32-wasip2 --no-default-features
cargo test --workspaceOptional live-node validation:
cargo test -p aelf-sdk --test local_node -- --ignored
cargo test -p aelf-sdk --test public_readonly_smoke -- --ignored --test-threads=1cargo test --workspace intentionally excludes the ignored live smoke suites so the default test pass remains deterministic and offline-friendly.
crates/aelf-sdk: public facade cratecrates/aelf-client: HTTP client, DTOs, transaction buildercrates/aelf-contract: typed and dynamic contract bindingscrates/aelf-crypto: wallet, signing, address utilitiescrates/aelf-keystore: JS-compatible keystore supportcrates/aelf-proto: generated protobuf bindingscrates/aelf-sdk/examples: canonical example sourcesexamples/: thin forwarding wrappers for local convenience
- Keep changes scoped to one problem or feature.
- Add or update tests for every behavior change.
- Document public API additions with rustdoc.
- Update
README.md,README.zh.md, orCHANGELOG.mdwhen user-facing behavior changes. - Keep the documented MSRV at Rust
1.85and preserve the hardcargo +1.85.0 check --workspace --all-targets --all-features --lockedCI gate. - Preserve the
wasm32-wasip2compile gates foraelf-client,aelf-contract, andaelf-sdkwhen changing transport or feature-flag behavior.
- Push a tag such as
v0.1.0-alpha.1to trigger the automated release flow. - The tag workflow runs release preflight checks first, then publishes the workspace crates in dependency order.
- If a publish run partially succeeds, rerun the
publishworkflow manually withpackages="aelf-contract,aelf-sdk"-style inputs and keepskip_published=true.
Use Conventional Commit / git-cz style messages in English and keep the matching emoji prefix used by the repository workflow.