Closed vlkv closed 1 year ago
Any response?... Please)))
Currently, it doesn't generates code to Javacript/Typescript, https://github.com/users/inkeliz/projects/3/views/1?pane=issue&itemId=9119809. I'm looking to implement new languages and update this project, in general, in the future. 😞
Thank you for your response!
Hello,
Sorry, this could be a noob question. I have this use case: an application written in TinyGo which I compile into target=wasm. This application uses Karmem for its API declared in *.km file. It means that this app has a function like
ExecuteCmd(cmdPtr int32, cmdLen int32)
wherecmd
- is a Karmem message, some Go generated struct type.Now, I want to run my wasm app in browser. To call ExecuteCmd I have to somehow pass a
cmd
data to it. It means that I need to construct an instance of cmd (in Javascipt/Typescript I guess...), serialize it into an array of bytes, copy those bytes into wasm's memory, get address of the begining + length of that message and finally call theExecuteCmd
.The missing part here is that Karmem does not support code generation of *.km into JavaScript/TypeScript. And that is why - I cannot use Karmem in browser. Is this correct? Or maybe there is another way of doing it?
Kind regards.