Skip to content

Instantly share code, notes, and snippets.

View rossberg's full-sized avatar

Andreas Rossberg rossberg

View GitHub Profile
@rossberg
rossberg / Wasm Custom Annotations
Created March 6, 2018 14:33
Annotation syntax for the asm text format
# Annotation Syntax for the Wasm Text Format
## Motivation
Problem
* The Wasm binary format supports custom sections to enable associating arbitrary meta data with a Wasm module.
* No equivalent exists for the text format. In particular, there is no way to
- represent custom sections themselves in the text format, cf. WebAssembly/design#1153 and https://gist.github.com/binji/d1cfff7faaebb2aa4f8b1c995234e5a0
@rossberg
rossberg / Wasm Reference Types
Last active February 19, 2018 23:05
Basic reference types for Wasm
# Reference Types for WebAssembly
## Introduction
Use cases:
* Easier and more efficient interop with host
* Manipulation of tables inside Wasm
* Tyoed function pointers
* Setting the stage for other proposals like exception handling
@rossberg
rossberg / Wasm JS type reflection.md
Last active February 19, 2018 15:35
JS Type Reflection for Wasm

Overview

Motivation

Wasm is typed, and its types carry information that can be useful and important to clients interacting with Wasm modules and objects through the JS API. For example, types describe the form of imports and exports, including the size limits of memories and tables or the mutability of globals.

The desire to query information like this from JS has come up several times. For example, it is needed to write a JS-hosted linker or an adaptor mechanism for modules. This proposal adds respective functionality to the JS API.