You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to execute Javascript via WASM, we need a proper interface for executing cells. My proposal for this:
The WASM module exposes a function to create a Otto VM for a codebook. This function returns an ID that is then saved in the Angular app.
This ID is then used to execute "commands" on this VM, for example executing code, clearing the VM, restarting or deleting it.
It might also be a good idea to return a js object that represents the VM, but I don't know how suitable that is in terms of implementation. However, this would allow for a clean, object-orientated way to use the VM. I'm thinking of something like vm.execute(<code>), vm.clear(). A functional approach will be easier to start with.
The commands should be JSON-based and could look like this:
{
"CodebookId": string,"CellId": string,"CommandType": Enum, // Execute, clear, delete etc."Payload": object?, // The code, additional information etc.
}
The text was updated successfully, but these errors were encountered:
Will switch to Pyoride, because it's just great! You can load python packages like numpy and matplotlib, which make Codebook really great.
On the other hand, integrating this properly will be hard: I don't just want to import it as a script in the FE, because I still want a single WASM interface for code execution. I guess I will make an ugly js => codebook WASM => js.pyoride => WASM call until I figure out how to directly call pyoride from wasm.
Code for this issue can be found in the https://github.com/roulzhq/Codebook-runtime-wasm repository. It is documented here just to keep track of the process.
In order to execute Javascript via WASM, we need a proper interface for executing cells. My proposal for this:
vm.execute(<code>)
,vm.clear()
. A functional approach will be easier to start with.The text was updated successfully, but these errors were encountered: