Massa / wasm execution interface #1984
Replies: 3 comments 4 replies
-
The main concept that I would like to introduce is to merge the current Then both Also, have you considered making I have a few more comments which I'll make on the PR directly. |
Beta Was this translation helpful? Give feedback.
-
Ok, I will open a PR on @adrien-zinger's one to make my proposal clearer. |
Beta Was this translation helpful? Give feedback.
-
We want to be flexible about the choice of the engine and furthermore split the R&D about wasm execution / memory sharing between engines.
So we can develop in modules / crate or repository several solutions that respect an interface.
For the moment I plugged this interface that I defined in cautious_bassoon, note that this interface is not the ABI but it should be called by. For example, the
get_module
is called by the call abi (go to impl). We can discuss about the naming of these function keeping in mind that it's too easy to be confuse while we're speaking of ABI..Interface..Syscall.(go to implementation example in massa)
I think it's to much but we could have a
get_module_for_call
function and aget_module_for_something_else
to track in massa what's happening.The function in the interface should be implemented in massa and called by the external module.
To run the smart contract, I choose to provide a simple entry point called
run
for each operation. As well as the VM object in massa track the context and let the execution running and calling the interface if needed.(go to usage example in massa)
The
run_result
is a Result object that contain the remaining points after the operation. We can also talk about the entry point if needed.Beta Was this translation helpful? Give feedback.
All reactions