Rust Smart Contract
categories: hacking
tags: blockchain rust smartcontract
Description/Summary
Learning resources and references.Content
Why Write Smart Contracts in Rust?
The future of smart contracts, in my eyes and the eyes of many others, lies with WebAssembly. This is a virtual machine specification which essentially acts as a portable and simple RISC ISA - since it matches the runtime model of a CPU many existing languages can be compiled to it unchanged. Apart from special-case DSLs like Solidity most languages expose the runtime model of the CPU somehow. Not only that, but its similarity to the CPU allows it to be compiled to incredibly efficient machine code without complex optimisations that can affect correctness and increase code complexity.
Future Work
It would be nice to be able to write smart contracts that are easily compiled for different chains with no runtime overhead while allowing to use specific details of the underlying chain. While developing the Fleetwood technology stack we are trying to uphold this future goal by considering interoperability of new features in accordance to it.