Is there an API in Rust to check the memory usage of a canister? This would be very useful for automatic scaling, to allow a canister to know when it needs to spin up another canister.
I’m interested in this too.
Since you’re using rust, I believe, you can also estimate it by hand std::mem::size_of - Rust
You can use this core::arch::wasm32::memory_size - Rust