WebAssembly

web

将来性

もしもWebAssemblyとWASIが2008年に存在していたら、Dockerを開発する必要はなかった

WebAssembly製のx86仮想マシン「WebVM」が登場、Webブラウザ上でLinuxや各種コマンド、アプリがそのまま実行可能 - Publickey

仕様

Change History — WebAssembly 2.0 (Draft 2022-06-13)

線形メモリ

GC

今は無いが検討されている

DenoとWebAssembly

Deno でも実行できる

RustでWebAssemblyを書いてDenoで実行する🦕🦀 | ramble - ランブル -

wasmインスタンス

Rust to wasm

2021-12-10
LLVM入門 - javascript使いがLLVM(Rust:inkwell)でjavascriptをJITコンパイルするまで

Parser combinator nom 入門 - happy developing

Rustでlox言語のinterpreterを作っている話 - sasurau4のブログ

LLVM Tutorial: Table of Contents - LLVM 13 documentation

kaleidoscope-rust

https://github.com/termoshtt/kaleidoscope

WAPM

企業

warg

warg | warg.io

warg is an in-development open source registry protocol for Wasm packages. warg provides an index allowing everyone to refer to federated namespaces of Wasm packages without being opinionated about how package content is stored and hosted.

reference impl: GitHub - bytecodealliance/registry: WebAssembly component registry prototype

  • wasm のためのレジストリ作ってたけどプロトコルと参考実装があるな

コンパイラを書いてセルフホストした

(WASMが変に高級なため、例えばx64ターゲットのコンパイラ実装なんかに比べると結構サボれる場所があってその辺りはかなり感覚が違うと思われる。)

  • LSP までちゃんと実装されていて参考にしたい wish

参考文献