FAAS in Go with WASM, WASI and Rust
https://eli.thegreenplace.net/2023/faas-in-go-with-wasm-wasi-and-rust/ [eli.thegreenplace.net]
2023-05-11 21:07
tags:
go
programming
rust
wasm
web
This post is best described as a technology demonstration; it melds together web servers, plugins, WebAssembly, Go, Rust and ABIs. Here’s what it shows:
How to load WASM code with WASI in a Go environment and hook it up to a web server.
How to implement web server plugins in any language that can be compiled to WASM.
How to translate Go programs into WASM that uses WASI.
How to translate Rust programs into WASM that uses WASI.
How to write WAT (WebAssembly Text) code that uses WASI to interact with a non-JS environment.
source: L
A world to win - WebAssembly for the rest of us
https://www.wingolog.org/archives/2023/03/20/a-world-to-win-webassembly-for-the-rest-of-us [www.wingolog.org]
2023-03-20 22:09
tags:
functional
garbage-collection
lisp
programming
transcript
wasm
As it turns out, there is a reason that there is no good Scheme implementation on WebAssembly: the initial version of WebAssembly is a terrible target if your language relies on the presence of a garbage collector. There have been some advances but this observation still applies to the current standardized and deployed versions of WebAssembly. To better understand this issue, let’s dig into the guts of the system to see what the limitations are.
source: HN
firefox's low-latency webassembly compiler
http://wingolog.org/archives/2020/03/25/firefoxs-low-latency-webassembly-compiler [wingolog.org]
2020-03-26 20:45
tags:
browser
compiler
programming
wasm
The goals of high throughput and low latency conflict with each other. To get best throughput, a compiler needs to spend time on code motion, register allocation, and instruction selection; to get low latency, that’s exactly what a compiler should not do. Web browsers therefore take a two-pronged approach: they have a compiler optimized for throughput, and a compiler optimized for latency. As a WebAssembly file is being downloaded, it is first compiled by the quick-and-dirty low-latency compiler, with the goal of producing machine code as soon as possible. After that “baseline” compiler has run, the “optimizing” compiler works in the background to produce high-throughput code. The optimizing compiler can take more time because it runs on a separate thread. When the optimizing compiler is done, it replaces the baseline code. (The actual heuristics about whether to do baseline + optimizing (“tiering“) or just to go straight to the optimizing compiler are a bit hairy, but this is a summary.)
This article is about the WebAssembly baseline compiler in Firefox. It’s a surprising bit of code and I learned a few things from it.
source: HN
The Bytecode Alliance: Building a secure, composable future for WebAssembly
https://hacks.mozilla.org/2019/11/announcing-the-bytecode-alliance/ [hacks.mozilla.org]
2019-11-13 00:29
tags:
defense
development
library
security
systems
vapor
virtualization
wasm
We have a vision of a WebAssembly ecosystem that is secure by default, fixing cracks in today’s software foundations. And based on advances rapidly emerging in the WebAssembly community, we believe we can make this vision real.
WebAssembly can provide the kind of isolation that makes it safe to run untrusted code. We can have an architecture that’s like Unix’s many small processes, or like containers and microservices. But this isolation is much lighter weight, and the communication between them isn’t much slower than a regular function call. This means you can use them to wrap a single WebAssembly module instance, or a small collection of module instances that want to share things like memory among themselves.
source: HN
Standardizing WASI: A system interface to run WebAssembly outside the web
https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/ [hacks.mozilla.org]
2019-03-28 07:50
tags:
jit
standard
systems
update
wasm
WebAssembly is an assembly language for a conceptual machine, not a physical one. This is why it can be run across a variety of different machine architectures.
Just as WebAssembly is an assembly language for a conceptual machine, WebAssembly needs a system interface for a conceptual operating system, not any single operating system. This way, it can be run across all different OSs.
This is what WASI is — a system interface for the WebAssembly platform.
source: L
WebAssembly Is Not a Stack Machine
http://troubles.md/posts/wasm-is-not-a-stack-machine/ [troubles.md]
2019-01-31 23:51
tags:
browser
compiler
jit
perf
wasm
web
This poses a problem for optimisation.
source: L
Maybe you don't need Rust and WASM to speed up your JS
https://mrale.ph/blog/2018/02/03/maybe-you-dont-need-rust-to-speed-up-your-js.html [mrale.ph]
2019-01-13 04:06
tags:
investigation
javascript
jit
perf
programming
wasm
Chrome OS exploit: WebAsm, Site Isolation, crosh, crash reporter, cryptohomed
https://bugs.chromium.org/p/chromium/issues/detail?id=766253 [bugs.chromium.org]
2017-11-16 01:06
tags:
browser
exploit
linux
security
wasm
Tons of fun stuff going on here.
Imports can be getters, which run while the instance is being built and is not in a consistent state. If the getter builds another instance for the same module, then the instances will share a WasmCompiledModule, but will have different ArrayBuffers for memory. Compiled module will reference one memory buffer. If the second memory grows, then the compiled module gets confused and relocates to OOB memory.
war-extension to crosh with process limit
network_diag has an awk command injection bug.
lamecalc should open again
source: L
Goodbye PNaCl, Hello WebAssembly!
https://blog.chromium.org/2017/05/goodbye-pnacl-hello-webassembly.html [blog.chromium.org]
2017-05-30 21:40
tags:
browser
development
javascript
update
wasm
web
We will remove support for PNaCl in the first quarter of 2018 everywhere except inside Chrome Apps and Extensions. We believe that the ecosystem around WebAssembly makes it a better fit for new and existing high-performance web apps, and that usage of PNaCl is sufficiently low to warrant deprecation.
source: HN
A cartoon intro to WebAssembly
https://hacks.mozilla.org/2017/02/a-cartoon-intro-to-webassembly/ [hacks.mozilla.org]
2017-03-01 00:02
tags:
browser
development
javascript
jit
perf
series
wasm
web
WebAssembly is fast. You’ve probably heard this. But what is it that makes WebAssembly fast? In this series, I want to explain to you why WebAssembly is fast.
source: L