Wasmer and WASM vs Java

Web Assembly (WASM) is a hot new technology designed to enable more efficient programming languages in browsers with near-native speeds. If you know anything about it, you are probably aware of the fact that you can execute compiled code at almost native speed. This is basically to allow you to run apps written in C or other languages on the Web with near-native performance. It promises not only to run your code in the client, but also to embed it in applications you write yourself.

With Firecracker you can imagine any language you want, but at the time of this article Go is only able to support C, C + +, Java, JavaScript, Python, Ruby, PHP and Ruby on Rails.

If you are looking for a combination of language / compiler / backend, the first obvious one is C + + / LLVM, but if you then wonder if you can use such a thing in Rust easily, then the most mature thing I have found is Cranelift. It can target web assembly, it can be used on the network, and the Rust libraries are compiled to compile them on any processor architecture as long as they are compiled on the architecture of that processor. WebAssembly in Wasm allows you to run code written in C + + or other languages on the web, and it provides many of the same features as any other API designed for PHP, Python, Go, Ruby, etc. The API is similar to other APIs in PHP / Python / Go / Ruby and there is no doubt that any Wasms program you use on the web is compatible with the existing standardized API, which can also use JavaScript. There is no support for wasm - binding yet, but WASM support has been added and you can also use custom JavaScript (which it does not yet support) with support. Starting with the lowest possible language, C / C + + / Rust, Rust is a pretty strong candidate. This means that it is an attractive compilation target, since languages like Rust and C + C # do not require a garbage collector. If you present a reasonable API with the Rust Standard library, the default libraries will handle it for you.

Rust is great because it has a toolchain that makes integration of WASM into your app extremely easy, and has the high learning curve that comes with JS and TS. Rust is guaranteed not to make any memory management errors during compilation, so it is a good candidate for a low-level compiler target, but also an attractive compiler target.

Although WebaAssembly is Rust's default compilation target, Rust is also great for implementing client-side ciphers, so you can take advantage of Rust's powerful and low-level memory management capabilities. You can use the fantastic wasm - pack to create Wasm binaries, call the WASM binding CLI tool, and pack all your JavaScript files (and optionally generated TypeScript types) into a nice, clean package.

This bytecode shows how to add a C + + compilation step to your build, then use it in Java, and create a thick glass of dependencies to keep your application running. Now we will be able to see in our Java code the generated Java classes that correspond to the WASM code.

From here you can write your own web application with WASI or even customize an existing project to your web project. A web developer could compile an application written in Rust, go through C + +, Java and C # and compile it in any language and then integrate it into the workflow of their web applications.

If you want to use a language like C + + or Rust for the web, you do not need to compile in JavaScript. Instead, code written in other languages (e.g. WebAssembly) can be compiled and very few people have written it, but it is still very powerful.

The problem is that you end up depending on which JVM is available as the destination, and mainly program in Java and other JVMs, mainly in languages like Groovy or JRuby (or sometimes Groovies and J Ruby). C - like languages, LLVM has not really been designed for them to the same extent, and even PNaCl has suffered to some extent.

Cargo still gets the right build and package management, and I wish I could use it in Java, but I don't have it. If your program is open source and you can easily compile it from sources if you really want it, then it seems to me that if you can distribute executable libraries as portable byte code compiled locally, you could distribute platforms - specific binaries - as long as it is open source.

As I mentioned earlier, programming language compilers do not generate binaries that can be executed directly on the machine. Instead, they generate a type of byte code that is then converted into native machine code and executed, or executed in - flight (p - code) code on a machine. To make it clear, this creates a native program that executes waasm byte code, not a DLL (called a "DLL") that executes JVM bytecodes. The asmble compiler can convert byte code directly from wasps to waste, but note that for some reason the compiler expects wats, not the usual sanity people.

Search, Site Search, Website Search, Java, WebAssembly