WebAssembly Posts
Extern Ref, Wasm and C / C++
I should subtitle this post as “That’s not a pointer… This is a Pointer!” . In the previous two posts I showed how to import and export functions between Wasm and the host environment. This seems pretty safe, but can open up an attack vector which
extern_ref
shuts down. Let’s check that out…Importing Host Functions for Wasm
In the last post I explained how compiled WebAssembly code could export functions which can then be invoked from the host, essentially using WebAssembly as a safe version of a shared object. But that’s only part of the story, at some point our WebAssembly code is going to want to call the host. Either to obtain a resource like a
fopen
function call, or as some sort of notification.Embedding WebAssembly in Software
In most of the WebAssembly examples I’ve posted so far I’ve written simple, but complete applications, complete with a
main
function. But WebAssembly really comes into its own when you use it to embed third party code inside your application.ARM32 and WebAssembly on a Raspberry PI 1
Ok folks. It’s late in the evening and I set myself the challenge of getting WAMR working on a Raspberry PI1. Rather than just share the tips and tricks, I thought I’d share a bit of my log book, and late night random thoughts as I get things going. Maybe this will be amusing to read? Anyway, it might help me remember in the morning.
WebAssembly and Signal Handling
You can think of signal’s like user space interrupts. Essentially the running application is interrupted, and a signal handler function is invoked. This function is passed some data to describe why it is being interrupted. Once the function is invoked it can process a response to this “signal”. You’ve probably seen this on Linux. Geeks for Geeks has a great description of Signals. They are effectively used to communicate some information to the running process, a common use case is sending a signal to notify a process that is about to be terminated, thus allowing it to clean up resources, closing file handles, etc.
Mongoose and an Embedded WebServer in WAMR
It’s not unusual for your printer, or your fridge to have a small web server running. The embedded web server provides important control interfaces of these devices. It’s not just the fridge and the printer, but increasingly a large number of additional devices too, from milling machines on a shop floor, to smart pumps and electrical meters.
Getting Started with Embedded WASM - Development Environment (WAMR)
We all know that WebAssembly is great for the Web, but it’s also incredibly powerful in the embedded space too. You can compile Go, Rust, C++ and other languages for device families that don’t have compiler of build tools which support these languages. That’s in addition to the sandboxed and portable nature of WebAssembly of course.