WaParser (WaParserEx v0.1.0)

Copy Markdown View Source

WebAssembly binary format parser.

Thin Elixir wrapper over the Erlang core (:wa_parser). Erlang projects can consume :wa_parser directly; Elixir projects use this module.

Summary

Functions

Parses the first top-level event, returning {:ok, {event, rest, next}} — the continuation form the stream is built on.

Parses a WASM binary into a lazy stream of parse events.

Functions

parse(data)

Parses the first top-level event, returning {:ok, {event, rest, next}} — the continuation form the stream is built on.

stream(data)

Parses a WASM binary into a lazy stream of parse events.

Events: {:magic, <<...>>}, {:version, <<...>>}, {:section_id, id}, {:section_type, type}, {:section_length, len}, {:section_body, body}.