mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-10-22 03:36:23 +00:00
## Changes
### Clippy Fixes
- Fixed deprecated `cargo_bin` usage in 27 test files (added #![allow(deprecated)])
- Fixed uninlined_format_args in zombienet-sdk-tests
- Fixed subxt API changes in revive/rpc/tests.rs (fetch signature, StorageValue)
- Fixed dead_code warnings in validator-pool and identity-kyc mocks
- Fixed field name `i` -> `_i` in tasks example
### CI Infrastructure
- Added .claude/WORKFLOW_PLAN.md for tracking CI fix progress
- Updated lychee.toml and taplo.toml configs
### Files Modified
- 27 test files with deprecated cargo_bin fix
- bizinikiwi/pezframe/revive/rpc/src/tests.rs (subxt API)
- pezkuwi/pezpallets/validator-pool/src/{mock,tests}.rs
- pezcumulus/teyrchains/pezpallets/identity-kyc/src/mock.rs
- bizinikiwi/pezframe/examples/tasks/src/tests.rs
## Status
- cargo clippy: PASSING
- Next: cargo fmt, zepter, workspace checks
28 lines
1.4 KiB
Rust
28 lines
1.4 KiB
Rust
//! # Custom Host Functions
|
|
//!
|
|
//! Host functions are functions that the wasm instance can use to communicate with the node. Learn
|
|
//! more about this in [`crate::reference_docs::wasm_meta_protocol`].
|
|
//!
|
|
//! ## Finding Host Functions
|
|
//!
|
|
//! To declare a set of functions as host functions, you need to use the `#[runtime_interface]`
|
|
//! ([`pezsp_runtime_interface`]) attribute macro. The most notable set of host functions are those
|
|
//! that allow the runtime to access the chain state, namely [`pezsp_io::storage`]. Some other
|
|
//! notable host functions are also defined in [`pezsp_io`].
|
|
//!
|
|
//! ## Adding New Host Functions
|
|
//!
|
|
//! > Adding a new host function is a big commitment and should be done with care. Namely, the nodes
|
|
//! > in the network need to support all host functions forever in order to be able to sync
|
|
//! > historical blocks.
|
|
//!
|
|
//! Adding host functions is only possible when you are using a node-template, so that you have
|
|
//! access to the boilerplate of building your node.
|
|
//!
|
|
//! A group of host functions can always be grouped to gether as a tuple:
|
|
#![doc = docify::embed!("../../bizinikiwi/primitives/io/src/lib.rs", BizinikiwiHostFunctions)]
|
|
//!
|
|
//! The host functions are attached to the node side's [`pezsc_executor::WasmExecutor`]. For example
|
|
//! in the minimal template, the setup looks as follows:
|
|
#![doc = docify::embed!("../../templates/minimal/node/src/service.rs", FullClient)]
|