@K0IN Glad to hear!
Posts made by admin
String manipulation — WebAssembly
Read the article: https://blog.usejournal.com/string-manipulation-webassembly-5011e64c6b76
Enigma is a crypto library designed to work efficiently on browsers by leveraging on cool technologies such as WebCrypto and WebAssembly. Our aim is to provide the major crypto standard algorithms as well as a suite of utilities to simplify the use to the “standard” developer.
In my previous articles I talked about how WebAssembly allows you to bring the library ecosystem of C/C++ to the web. One app that makes extensive use of C/C++ libraries is squoosh, our web app that allows you compress images with a variety of codecs that have been compiled from C++ to WebAssembly.
In my experience, most performance problems on the web are caused by forced layout and excessive paint but every now and then an app needs to do a computationally expensive task that takes a lot of time. WebAssembly can help here.
Emscripting a C library to Wasm
Sometimes you want to use a library that is only available as C or C++ code. Traditionally, this is where you give up. Well, not anymore, because now we have Emscripten and WebAssembly (or Wasm)!
Emscripten and npm
WebAssembly (wasm) is often framed as either a performance primitive or a way to run your existing C++ codebase on the web. With squoosh.app we wanted to show that there is at least a third perspective for wasm: making use of the huge ecosystems of other programming languages. With Emscripten you can use C/C++ code, Rust has wasm support built in and the Go team is working on it, too. I'm sure many other languages will follow.
WebAssembly for front-end web development. Emscripten vs Rust vs Blazor.
I was lucky to be involved in an evaluation of WebAssembly for an in-house web frontend project. The project basically involves an Admin Dashboard where a user logs in to monitor what is going on, looks at some sales charts and orders activities. In the evaluation, our goal is to determine whether it is feasible to use WebAssembly for front end web development, and if possible, build a prototype to prove the feasibility.
A better way to write Web Assembly
Signing WebAssembly Modules with Rust
In my book, I wrote an Appendix that included some code samples illustrating how to cryptographically sign WebAssembly modules, but these were more to illustrate some interesting Rust syntax rather than prescribe real-world, production patterns. For example, the signing in that appendix prepended a 64 byte blob to the Wasm binary, making it unusable by any of WebAssembly’s standard tooling (or parseable by regular hosts).