package wasm

  1. Overview
  2. Docs
Library to read and write WebAssembly (Wasm) files and manipulate their AST

Install

Dune Dependency

Authors

Maintainers

Sources

opam-2.0.2.zip
md5=5129a11a3426689d0e9e027b2d9b8d5e
sha256=6dae267d47b92ac1d6cb47b34ab4108c4cf7471f35969bf75676a1620a9284cb

doc/wasm/Wasm/Types/index.html

Module Wasm.Types

type num_type =
  1. | I32Type
  2. | I64Type
  3. | F32Type
  4. | F64Type
type vec_type =
  1. | V128Type
type ref_type =
  1. | FuncRefType
  2. | ExternRefType
type value_type =
  1. | NumType of num_type
  2. | VecType of vec_type
  3. | RefType of ref_type
type result_type = value_type list
type func_type =
  1. | FuncType of result_type * result_type
type 'a limits = {
  1. min : 'a;
  2. max : 'a option;
}
type mutability =
  1. | Immutable
  2. | Mutable
type table_type =
  1. | TableType of Int32.t limits * ref_type
type memory_type =
  1. | MemoryType of Int32.t limits
type global_type =
  1. | GlobalType of value_type * mutability
type extern_type =
  1. | ExternFuncType of func_type
  2. | ExternTableType of table_type
  3. | ExternMemoryType of memory_type
  4. | ExternGlobalType of global_type
type pack_size =
  1. | Pack8
  2. | Pack16
  3. | Pack32
  4. | Pack64
type extension =
  1. | SX
  2. | ZX
type pack_shape =
  1. | Pack8x8
  2. | Pack16x4
  3. | Pack32x2
type vec_extension =
  1. | ExtLane of pack_shape * extension
  2. | ExtSplat
  3. | ExtZero
val num_size : num_type -> int
val vec_size : vec_type -> int
val packed_size : pack_size -> int
val packed_shape_size : pack_shape -> int
val is_num_type : value_type -> bool
val is_vec_type : value_type -> bool
val is_ref_type : value_type -> bool
val funcs : extern_type list -> func_type list
val tables : extern_type list -> table_type list
val memories : extern_type list -> memory_type list
val globals : extern_type list -> global_type list
val match_limits : I32.t limits -> I32.t limits -> bool
val match_func_type : 'a -> 'a -> bool
val match_table_type : table_type -> table_type -> bool
val match_memory_type : memory_type -> memory_type -> bool
val match_global_type : 'a -> 'a -> bool
val match_extern_type : extern_type -> extern_type -> bool
val string_of_num_type : num_type -> string
val string_of_vec_type : vec_type -> string
val string_of_ref_type : ref_type -> string
val string_of_refed_type : ref_type -> string
val string_of_value_type : value_type -> string
val string_of_value_types : value_type list -> string
val string_of_limits : I32.t limits -> string
val string_of_memory_type : memory_type -> string
val string_of_table_type : table_type -> string
val string_of_global_type : global_type -> string
val string_of_result_type : value_type list -> string
val string_of_func_type : func_type -> string
val string_of_extern_type : extern_type -> string
OCaml

Innovation. Community. Security.