Rust canister canister interface

I use rust to write a canist and deploy it to the IC main network. Why the Canister Interface cannot be viewed in the rocks browser? My cansiter: Principal qy2to-tqaaa-aaaai-qiyjq-cai |
Maybe the did file not upload successfully? How to upload a did file?

OGY canister ,Canister Interface can be viewed.

For rust canisters you can add a __get_candid_interface_tmp_hack() method to your actor that serves the .did file, like this:
Motoko canisters automatically provide this method for you.

Then you’ll be able to see it on (and here: )

1 Like
#[query(name = "__get_candid_interface_tmp_hack")]
fn export_candid() -> String {

#[cfg(any(target_arch = "wasm32", test))]
fn main() {}

#[cfg(not(any(target_arch = "wasm32", test)))]
fn main() {
    std::print!("{}", __export_service());