| Crates.io | my-canister-dashboard |
| lib.rs | my-canister-dashboard |
| version | 0.10.7 |
| created_at | 2025-06-23 15:28:58.136367+00 |
| updated_at | 2025-09-07 13:43:16.432824+00 |
| description | Dashboard assets and management utilities for Internet Computer Canister Dapps |
| homepage | |
| repository | https://github.com/Web3NL/my-canister-dapp/tree/main/my-canister-dapp-rs/my-canister-dashboard |
| max_upload_size | |
| id | 1723055 |
| size | 583,270 |
Dashboard assets and management utilities for Internet Computer Canister Dapps.
Integrates with AssetRouter for asset certification.
use ic_asset_certification::AssetRouter;
use my_canister_dashboard::setup;
use std::cell::RefCell;
use ic_cdk::{api::certified_data_set, init};
thread_local! {
static ASSET_ROUTER: RefCell<AssetRouter<'static>> = RefCell::new(
AssetRouter::new()
);
}
#[init]
fn init() {
ASSET_ROUTER.with(|router| {
let mut router = router.borrow_mut();
setup::setup_dashboard_assets(
&mut router,
Some(vec!["https://mycanister.app".to_string()]),
);
certified_data_set(router.root_hash());
});
}
The My Canister Dashboard determines its development environment at runtime by fetching /canister-dashboard-dev-config.json. To run the dashboard in dev mode locally, we can use vite-plugin-canister-dapp.
MIT