#canister #did #candid #internet-computer

bin+lib generate-did

A tool to generate Candid (.did) files for Internet Computer Rust canisters

4 releases

new 0.1.0 May 29, 2025

#1187 in Command line utilities

Download history 499/week @ 2025-05-27

499 downloads per month

MIT license

11KB
142 lines

generate-did

Crates.io Docs.rs

A command-line tool to generate Candid (.did) files for Internet Computer Rust canisters.

Features

  • Build your Rust canister and extract its Candid interface automatically.
  • Simple, robust CLI.

Installation

Install from crates.io:

cargo install generate-did

Usage

From your project root or from inside the canister directory, run:

generate-did <canister_name>
  • Replace <canister_name> with the directory name of your canister (must contain a Cargo.toml).
  • The .did file will always be placed in the canister directory.

Requirements

  • candid-extractor must be installed and in your PATH:
    cargo install candid-extractor
    
  • The canister must be a Rust project with a valid Cargo.toml and buildable to WASM.

License

This project is licensed under the MIT License.

Dependencies

~1.2–1.8MB
~33K SLoC