Crates.io | candid-gen |
lib.rs | candid-gen |
version | 0.1.0 |
source | src |
created_at | 2024-06-14 02:46:50.530681 |
updated_at | 2024-06-14 02:46:50.530681 |
description | CLI tool that automates the generation of Candid interface files from Rust canisters for Internet Computer (IC) projects. |
homepage | |
repository | https://github.com/cwnt-io/candid-gen |
max_upload_size | |
id | 1271656 |
size | 90,675 |
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.
rustup
with wasm32-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 informationGenerate 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.
For any inquiries, please reach out to the authors via email or open an issue on GitHub.