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
I'm working on Freenet, a large-scale platform for distributed computation.
Freenet relies on lightweight webassembly modules called contracts which we currently compile from Rust, these need to be small so we use ![no_std] and minimize dependencies.
The problem is that Rust has a significant learning curve, and so I was wondering whether we could use Rune to allow the easy creation of Freenet contracts - which (in Rust) implement the ContractInterface trait.
I found #662 so it appears that Rune can work with WebAssembly, but it wasn't clear to me what the code example was doing - so I thought I'd ask directly:
Can the Rune VM be used in a lightweight wasm module (with no_std) to provide a Rune implementation of the ContractInterface trait?
The text was updated successfully, but these errors were encountered:
I would say no, from what I can intuit of your definition of "lightweight". But it really depends.
Since Rune will always be a virtual machine running on top of webassembly in contrast to Rust, which targets webassembly (code written in Rust directly becomes webassembly instructions) it will never have that low of an overhead. I.e. Rune won't take your scripts and convert them into native webassembly modules.
Rune also requires the use of an allocator. The memory for the virtual machine is allocated explicitly through the system allocator.
I found #662 so it appears that Rune can work with WebAssembly, but it wasn't clear to me what the code example was doing - so I thought I'd ask directly:
The code example linked in 662 is a webassembly module which defines a function that takes a string. This string is then compiled as a unit for the rune virtual machine which is compiled for webassembly to execute.
I understand that the Rune VM running on the wasm VM will not be as lightweight as Rust code compiled to wasm directly - my question is more whether the Rune compiler and VM can run on webassembly. I think it can based on the example I found.
I'm working on Freenet, a large-scale platform for distributed computation.
Freenet relies on lightweight webassembly modules called contracts which we currently compile from Rust, these need to be small so we use
![no_std]
and minimize dependencies.The problem is that Rust has a significant learning curve, and so I was wondering whether we could use Rune to allow the easy creation of Freenet contracts - which (in Rust) implement the ContractInterface trait.
I found #662 so it appears that Rune can work with WebAssembly, but it wasn't clear to me what the code example was doing - so I thought I'd ask directly:
Can the Rune VM be used in a lightweight wasm module (with
no_std
) to provide a Rune implementation of the ContractInterface trait?The text was updated successfully, but these errors were encountered: