RelShared in CanCan

Sure.

But to be clear, this wouldn’t be a roadmap-level feature, in the sense that it has nothing to do with the IC system itself, and just concerns what Wasm the Motoko compiler is producing to run there.

So, the salient layers are the Motoko compiler’s policy for representing and compiling stable vars in the main actor, and how it compiles that actor’s upgrade hooks with respect to those representation choices.

As I mentioned, the current policy is simple and not efficient, and not incremental. For each upgrade, the compiler emits Wasm code that walks over all memory of each stable var. That is not incremental, but it could be in the future.

When the compiler does something more incremental, it would “merely” be a new use of the same (or similar) IC system API for the canister to read and write its stable memory region.

Separately, that region may increase in size, but if that happens, it’s a distinct feature, at a distinct layer. FWIW, that increase is on the roadmap, and also on this forum. Apologies for the ambiguity.

4 Likes