canic-dsl

Crates.iocanic-dsl
lib.rscanic-dsl
version0.9.10
created_at2026-01-12 17:08:14.73584+00
updated_at2026-01-23 13:33:03.162615+00
descriptionCanic — a canister orchestration and management toolkit for the Internet Computer
homepagehttps://github.com/dragginzgame/canic
repositoryhttps://github.com/dragginzgame/canic
max_upload_size
id2038217
size5,267
(borovan)

documentation

https://docs.rs/canic-dsl

README

canic-dsl

Symbolic tokens for Canic endpoint macros.

This crate defines zero-cost marker constants used inside #[canic_query] and #[canic_update] attributes. The symbols are never evaluated; the proc-macro crate pattern-matches on identifiers and expands them into runtime access calls. Use requires(...) expressions with all(...), any(...), and not(...) to compose predicates.

use canic_dsl::access::{app, caller};
use canic_dsl_macros::canic_update;

#[canic_update(requires(app::allows_updates(), caller::is_controller()))]
async fn admin_only_expr() -> Result<(), canic::Error> {
    Ok(())
}
Commit count: 1337

cargo fmt