The output of wasm-pack on IOHK's cardano wallet
Monday 25 February 2019
It has been a while since my last blog post here. I have been working on a new project for a blockchain company IOHK. My team has been working on the project to broader the customer targets by allowing the development of 3rd party software to work on many different platforms.
How would you do that? First you will need to make the list of what you need and then you see what can fit these requirements.
The list of requirements was simple:
Initially the cardano protocol is written in haskell. It is a cute language with really interesting language property. Some may argue that it is possible to make it fit all the requirements above, but there is still the requirement number 5. : it needs to be easy to integrate in the developer environment.
So we took rust. It is a system programming language, you can control the memory footprint of your software, you can cross compile to so much different platform (including wasm, intel, powerpc, arm...). You can find a lot of reasons here, there or there.
Not everything will be written in Rust. It is a common mistake to believe that there can be one language above them all. While Rust is very powerful and has a rich ecosystem, it is still easier to create an iOS mobile app in native Swift, an android mobile app in Java or a WebApp in JavaScript. Where Rust is great is that it can easily integrate in these languages.
One recent project is the rust-cardano
project. Most of the code is written in Rust. Yet it was easy and cheap to
generate a C library
or JavaScript bindings.
This is the same JS Bindings I talk about in this blog post