generate-did
A tool to generate Candid (.did) files for Internet Computer Rust canisters.
Features
- Build your Rust canister and extract its Candid interface automatically.
- Usable as a library in other Rust projects.
- Simple, type-safe API.
Usage
As a Library
Add to your Cargo.toml:
[]
= "0.1.0-beta.1"
Example:
use DidGenerator;
- Replace
"your_canister_name"with the name of your canister directory (must contain aCargo.toml).
Requirements
- candid-extractor must be installed and in your PATH:
- The canister must be a Rust project with a valid
Cargo.tomland buildable to WASM.
Development
Clone the repo and run tests:
License
MIT