After almost six months of the launch of the first version, the launch of the new version of the Wasmer project was announced, which is in its second main version and in which important changes have been made to such a degree that the internal APIs in this second version are incompatible, although new features have also been added that add stability, security and performance improvements.
For those unaware of Wasmer, you should know that it develops a runtime to execute WebAssembly modules that can be used to create universal applications that can run on multiple operating systems and to run untrusted code in isolation.
Portability is provided by compiling the application code into low-level WebAssembly middleware It can run on any operating system or be integrated into programs in other programming languages. Programs are lightweight containers that run the WebAssembly pseudocode.
These containers are not tied to the operating system and can include code originally written in any language programming. The Emscripten Toolkit can be used to compile to WebAssembly. To translate WebAssembly to current platform machine code, connecting different build backends (Singlepass, Cranelift, LLVM) and engines (using JIT or generating machine code) is supported.
Access control and interaction with the system are provided through the WASI (WebAssembly System Interface) API, which provides programming interfaces for working with files, sockets, and other functions provided by the operating system.
Applications are isolated from the main system and they have access only to the declared functionality (security mechanism based on management capabilities for actions with each of the resources (files, directories, sockets, system calls, etc.).
Main novelties of Wasmer 2.0
In this new version presented, it is mentioned that the significant change in the version number by Wasmer is associated with the introduction of incompatibility changes to the internal API, which, according to the developers, will not affect 99% of users from the platform in any way.
There is also a change in the format of serialized Wasm modules between major compatibility changes (modules serialized in Wasmer 1.0 will not be usable in Wasmer 2.0).
In addition, support for SIMD instructions is highlighted (Single Instruction, Multiple Data) which allow parallelization of data operations. Areas where the use of SIMD can significantly increase productivity include machine learning, video encoding and decoding, image processing, physical process simulation, and graphics manipulation.
Also support for reference types is highlighted, allowing Wasm modules to access information in other modules or in the base environment and significant performance optimizations have been made. The LLVM runtime speed with floating point numbers has been increased by approximately 50%.
Function calls have been sped up significantly by reducing situations that require kernel calls. The performance of the Cranelift code generator has been increased by 40%. Reduced data deserialization time. To more accurately reflect the gist, the engine names have been changed: JIT → Universal, Native → Dylib (Dynamic Library), Object File → StaticLib (Static Library).
Finally If you are interested in learning more about Wasmer, you should know that the project code is written in Rust, it has the MIT license and you can check its details on its official website at following link
Install the Wasmer runtime
On the other hand, for those who are interested in being able to run the WebAssembly container, you only need to install the Wasmer runtime on your system, which comes without external dependencies.
It is important to mention that Wasmer can be run on any platform macOS, Linux and Windows, the only requirement is that its runtime be installed on your system.
To do this, just run the following command in a terminal:
curl https://get.wasmer.io -sSfL | sh
And after that, they must execute the required file:
If you need to know more about how Wasmer works or want to know its source code, you can consult all that In the following link.