-
Notifications
You must be signed in to change notification settings - Fork 157
Memory ownership #5
Comments
First of all, TinyGo implements the mark and sweep grabage collector [link]. The allocated pointers are assigned to variables we create when we get data from the host environment. For example, you pass the pointer of |
thank you ,This is a good project. |
Well, I am not sure about that, but the point is Go's official binary cannot be used for proxy-wasm since;
|
I want my project is in go to support proxy-wasm,How can I implement proxy-wasm-go-host,such as https://github.com/proxy-wasm/proxy-wasm-cpp-host ? |
host environments in Go can be implemented once we have WASM virtual machine and interpreter written in Go (e.g. https://github.com/mathetake/gasm, though mine is a kind of hobbiest one). That is a completely separated issue and nothing to do with Go's limitation for producing proxy-wasm ABI compatible wasm binary as we discussed above. |
Just for my curiosity, is your project https://github.com/mosn/mosn ? 👀 |
yes. |
gasm is just a toy VM for my learning purpose and it's far from completion. you'd better give it a shot to https://github.com/wasmerio/go-ext-wasm Anyway, if there's anything I can do to mosn, let me know:) |
I'm sorry,I have some confusion. |
TinyGo does not use the proposed WASM's gc but implements it at the language level (and this is how TinyGo supports GC on multiple platforms, not only on wasm) |
oh, it call runtime.GC when runtime.alloc, the performance will be not high, is it ture? |
yeah, compared to c++ and Rust
AFAIK, there's no project for proxy-wasm host in go |
I have try go-ext-wasm, and it only supports integer when import func.
I can‘t implement proxy-wasm func by go-ext-wasm. |
https://github.com/proxy-wasm/spec/tree/master/abi-versions#memory-ownership
I see only malloc mem, how to free mem on Golang? thx
The text was updated successfully, but these errors were encountered: