- Overview
- Features
- Installation
- Usage
- Configuration
- Contributing
- License
- Authors
- Acknowledgements
- Contact
- Links
candid-gen
is a CLI tool that automates the generation of Candid interface files from Rust canisters for Internet Computer (IC) projects. It simplifies the process of creating .did
files, ensuring that your Rust canisters are properly documented and ready for deployment on the IC.
- Automatically generates Candid interface files from Rust canisters.
- Supports specifying individual canisters or generating files for all canisters in a project.
- Ensures that all necessary tools and targets are installed and available.
- Rust and Cargo
rustup
withwasm32-unknown-unknown
target installedcandid-extractor
To install candid-gen
, you can use cargo install
to install the latest release published at crates.io
:
cargo install candid-gen
Or you can clone the repository and build the project from the master branch:
git clone https://github.com/cwnt-io/candid-gen.git
cd candid-gen
cargo install --path .
candid-gen [CANISTERS_NAMES]...
[CANISTERS_NAMES]...
: Specify one or more canister names to generate Candid files. Each canister name should be provided as a separate argument. If no canister name is passed, this will generate the Candid files for every rust canister of the project.
-h
,--help
: Print help information-V
,--version
: Print version information
Generate Candid files for all Rust canisters in the project:
candid-gen
Generate Candid files for specific canisters:
candid-gen canister1
candid-gen canister1 canister2
Ensure that the following tools are installed and available in your PATH:
rustup
cargo
candid-extractor
Also, make sure the wasm32-unknown-unknown
target is installed:
rustup target add wasm32-unknown-unknown
Contributions are welcome! Please open an issue or submit a pull request if you would like to contribute to candid-gen
.
To set up a development environment:
-
Clone the repository:
git clone https://github.com/cwnt-io/candid-gen.git cd candid-gen
-
Install dependencies:
cargo build
-
Run tests:
cargo test
This project is licensed under the terms of the Apache License 2.0. See the LICENSE file for details.
- Gustavo Basso - gubasso@cwnt.io
- Ismael Pamplona - isma@cwnt.io
- Inspired by the needs of the Internet Computer community.
- Built with Rust, Clap, and other open-source tools.
For any inquiries, please reach out to the authors via email or open an issue on GitHub.