12 hot language projects riding WebAssembly
By: Bamyx Technologies
Tags: Technology News, Language, Coding, Programming, Language Learning

Image Credit: Bamyx Technologies

Today’s web applications aren’t even close to being as quick and responsive as native desktop apps, but what if they could be? WebAssembly makes this commitment.

WebAssembly is a low-level assembly-like language with a small binary structure that operates in web browsers at near-native speeds. At the same time, WebAssembly provides a portable compilation target for programming languages like as C/C++, C#, Rust, Go, Kotlin, Swift, and others.

WebAssembly is supported by Google, Mozilla, Apple, and Microsoft in their browser engines, and is hailed as a means to increase online application speed while also allowing languages other than JavaScript to be utilized in the development of browser programs.

WebAssembly has spawned a slew of new technologies, including even new programming languages, that make use of its capabilities. The following are 12 language initiatives that have staked a significant amount of money on WebAssembly.

Binaryen

Binaryen is a WebAssembly compiler toolchain infrastructure library. Binaryen is a C++ library that makes compiling to WebAssembly simple, effective, and quick. WebAssembly is supported by Google, Mozilla, Apple, and Microsoft in their browser engines, and is hailed as a means to increase online application speed while also allowing languages other than JavaScript to be utilized in the development of browser programs.

WebAssembly has spawned a slew of new technologies, including even new programming languages, that make use of its capabilities. The following are 12 language initiatives that have staked a significant amount of money on WebAssembly.

Binaryen is a WebAssembly compiler toolchain infrastructure library. Binaryen is a C++ library that makes compiling to WebAssembly simple, effective, and quick.

Blazor WebAssembly

Blazor WebAssembly is a framework for creating interactive, client-side, single-page web apps in.NET and hosting them in modern browsers (including mobile browsers) using the WebAssembly runtime. There are no plug-ins or code recompilation into other languages necessary. The runtime allows.NET code to use WebAssembly’s JavaScript APIs to access browser functionality.

When a Blazor WebAssembly program is executed in the browser, C# code and Razor files are compiled into.NET assemblies, which are downloaded along with the.NET runtime to the browser. The.NET code is further protected against malicious operations on the client system since it is run in WebAssembly in the browser’s JavaScript sandbox. Blazor WebAssembly apps can be run on their own or with server-side assistance.

Cheerp

Cheerp is a web-based enterprise-grade C/C++ compiler from Leaning Technologies that compiles C and C++ up to C++ 17 into WebAssembly, JavaScript, or a combination of the two. Cheerp is built on top of the LLVM/Clang framework, with specific optimizations aimed at improving efficiency and reducing the size of the compiled output. Cheerp is mostly used to convert existing C/C++ libraries and applications to HTML5, but it may also be used to create web apps and WebAssembly components. Cheerp is available in both open source and commercial versions.

Cheerp is available for download at leaningtech.com.

CherpJ

This LLVM-based compiler, dubbed “the Java compiler for the web,” turns any Java client program into WebAssembly, JavaScript, and HTML, allowing them to operate in modern browsers. To access the DOM from Java, CheerpJ uses three components: an AOT (ahead-of-time) compiler, a runtime in WebAssembly and JavaScript, and JavaScript DOM interoperability APIs. The AOT compiler can be used to compile JAR archives with CheerpJ. CheerpJ does not necessitate any server-side assistance.

CheerpJ, like Cheerp, is a product of Leaning Technologies. It’s available for download at leaningtech.com.

Emscripten

This open source compiler toolchain converts C and C++, as well as any other language that uses LLVM compiler technology, to WebAssembly for web deployment, Node.js, or a Wasm runtime like Wasmer. (The Emscripten compiler, emcc, also produces JavaScript, which gives the built programs API support.)

Emscripten was used to convert a number of real-world codebases to WebAssembly, including commercial codebases like the Unreal Engine 4 game engine and the Unity 3D platform. C and C++ standard libraries, C++ exceptions, and OpenGL/WebGL graphics commands are all supported by Emscripten. The Emscripten SDK may be used on Linux, MacOS, and Windows to install the Emscripten toolchain (emcc, LLVM, and so on).

Forest

Forest is a WebAssembly-compiling functional programming language. Forest’s purpose, according to developer Nick Johnstone, is to provide a language that makes it easier to create big, interactive, and functioning online programs without the conventional overhead of that approach.

Forest has static typing, pattern matching, immutable data structures, numerous syntaxes, and automatic code formatting, and is currently defined as “pre-alpha, experimental, conceptual research software.” Elm and Haskell inspired the first syntax in development.

The Forest language’s design principles include ease of cooperation, as painless testing as possible, and agreement on structure and semantics while agreeing to differ on syntax. Forest is designed to be quick enough for constructing sophisticated games while also being “blazing fast” for conventional web apps, according to Johnstone.

Forest is available for download on GitHub.

Grain

The Grain language combines aspects from academic and functional languages to create a language for the twenty-first century, the project website states. Grain can run in the browser, on the server, and potentially anywhere because it is compiled to WebAssembly using the Binaryen toolchain and compiler infrastructure. There are no runtime type errors, and no type annotations are required. The Grain toolchain is a single binary that includes a CLI, compiler, runtime, and standard library. To build Grain from source, developers will need Node.js and Yarn, and binaries are available for Linux, MacOS, and Windows.

You can find instructions for getting started with Grain at grain-lang.org.

JWebAssembly

JWebAssembly is a Java bytecode to WebAssembly compiler by I-Net Software that accepts Java class files as input and outputs WebAssembly binary format (.wasm file) or text format (.wat file).

The goal is to use WebAssembly to run natively in the browser. JWebAssembly can theoretically compile any language that compiles to Java bytecode, including Clojure, Groovy, JRuby, Kotlin, and Scala.

JWebAssembly is not yet ready for production use. Although all of the requirements for the JWebAssembly 1.0 release have been met, testing still has to be completed. A Java bytecode parser, a test framework, and a Gradle plug-in are all in the plan for version 1.0. JWebAssembly 1.0 is expected to be released this year by I-Net Software.

JWebAssembly is available for download on GitHub.

Pyodide

Pyodide compiles Python and the Python scientific stack to WebAssembly, bringing the Python 3.8 runtime, NumPy, SciPy, Matplotlib, Scikit-learn, and dozens of other packages to the browser, which was just spun out from Mozilla. Pyodide allows Python to access web APIs and provides transparent object conversion between JavaScript and Python. Pyodide was launched in 2018 as part of the Iodide data science in a browser effort. Pyodide can be tested using a browser-based REPL.

Instructions for obtaining and using Pyodide can be found at pyodide.org.

TeaVM

TeaVM is a Java bytecode compiler that generates WebAssembly and JavaScript to operate on the web to run in the browser. It should be noted, however, that WebAssembly functionality is currently in beta. TeaVM, like its cousin GWT (Google Web Toolkit), allows programmers to design Java applications and deploy them as JavaScript. TeaVM, unlike GWT, operates with compiled class files rather than source code. TeaVM also uses existing compilers like javac, kotlinc, and scalac to build Kotlin and Scala code in addition to Java. TeaVM is primarily a web development tool; it is not intended for converting big Java or Kotlin codebases to JavaScript. Flavour, a TeaVM subproject, is a framework for creating single-page web apps.

On GitHub, you’ll find instructions for downloading and using TeaVM.

Uno Platform

Uno Platform is a UI platform for.NET teams to build single-codebase applications for WebAssembly, the web, Windows, MacOS, Linux, iOS, and Android using C# and XAML, as an alternative to the Xamarin mobile app platform. Uno uses the.NET 5 Mono-WASM runtime to run C# code in all major web browsers, and it also acts as a bridge for WinUI and UWP (Universal Windows Platform) apps to run natively on WebAssembly. Developers can use Visual Studio or Visual Studio Code to create web apps with Uno.

The Uno Platform website has instructions for getting started.

Wasmcloud

Wasmcloud is a Cosmonic application runtime that uses WebAssembly to create composable, portable apps that can be used in multi-cloud, edge, and browser environments. Security is handled by a WebAssembly sandbox, and an actor model separates business logic from specific underlying capabilities, according to the company. Developers can create microservices once in their preferred language and then deploy them anywhere. Rust, TinyGo, and AssemblyScript are among the languages currently supported. Wasmcloud has been accepted as a Sandbox project by the Cloud Native Computing Foundation (CNCF).

wasmCloud installation instructions can be found at wasmcloud.dev.

Don’t forget to give us your LIKES today