Closed lastmjs closed 10 months ago
This is most likely an instance of https://github.com/wasm-forge/ic-wasi-polyfill/issues/6
@lastmjs: please try using the newly added init_with_memory()
and pass a virtual memory for the polyfill to use for storage.
Hi Jordan,
I've found one issue with the stable storage creation, please check if it works on the newer ic-wasi-polyfill version 0.3.13.
So far working well, thanks!
Perhaps I'm missing something simple. I am using the polyfill and trying to write a simple file and then read it after deploy. I don't have the transient feature turned on. I've tested this in both Azle and Rust and it doesn't work in either CDK.
Rust
Writing and then reading works within the same deploy. After deploying again I get the following error:
Azle
Writing and then reading works within the same deploy. After deploying again I get the following error:
In Azle the
report_wasi_calls
feature is turned on and I everything looks fine:Reading:
Writing:
In Azle I've tried to strip away any other stable structures code, and I have put logs into my fork of ic-wasi-polyfill to ensure that the StableStorage filesystem implementation is being used.
The Rust example is extremely simple and it's basically just that code above with the latest ic-wasi-polyfill commit.
What am I doing wrong? Is this a bug?