I need to define Strings / Byte Arrays.
How can I allocate these on heap and get a reference to it?
Cranelift doesen't have those types natively.
However you allocate the memory in rust and pass a pointer as a i64
and do a load
on it
We do have a heap mechanism, but that is mostly to try to sandbox heap accesses, if you don't need that, I think (I may be wrong here) you can ignore it.
If you need to allocate memory from clif, you can link malloc
or some other memory allocating function and call that.
Last updated: Nov 22 2024 at 17:03 UTC