wasm-forge / stable-fs

File system implementation for the Internet Computer
MIT License
6 stars 2 forks source link

Please use a larger memory id #1

Closed lastmjs closed 11 months ago

lastmjs commented 1 year ago

Hey! I've been incorporating the ic-wasm-polyfill into Kybra (Python CDK), and I just ran into a problem here: https://github.com/wasm-forge/stable-fs/blob/main/src/storage/stable.rs#L18

We have a Python StableBTreeMap exposed and by default our examples start their memory ids from 0. I think this is very simple and nice, to allow people to be able to access these early memory ids, as it is very intuitive. But because this library takes those memory ids, no other stable structures in user code can use them.

In Kybra as we've used stable structures, we've started at 254 and started to work down. It would be nice if this library could do something similar.

wasm-forge commented 11 months ago

I've changed the default memory ID to bigger default numbers (230, 231, 232) as a temporary solution to avoid collisions.