swam
package swam
- Source
- package.scala
- Alphabetic
- By Inheritance
- swam
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
- package binary
- package cfg
- package decompilation
- package generator
- package runtime
This package contains all the classes and types related to running WebAssembly modules.
This package contains all the classes and types related to running WebAssembly modules.
The entry point for almost all users will be Engine. A typical use of the engine is:
import swam._ import text._ import runtime._ import exports._ import cats.implicits._ import cats.effect._ import java.nio.file.Paths val tcompiler = Compiler[IO] val engine = Engine[IO] for { tcompiler <- tcompiler engine <- engine mod <- engine.compile(/* source of the module */) inst <- mod.newInstance() f <- inst.exports.function1[Int, Int]("f") res <- f(43) } yield res println(res.unsafeRunSync())
- package syntax
Instructions in this package are grouped by category as described in the specification.
- package text
- package traversal
- package util
- package validation
Type Members
- sealed trait BlockType extends AnyRef
- sealed trait ElemType extends Type
- type FuncIdx = Int
- case class FuncType(params: Vector[ValType], t: Vector[ValType]) extends Type with Product with Serializable
- type GlobalIdx = Int
- case class GlobalType(tpe: ValType, mut: Mut) extends Type with Product with Serializable
- type LabelIdx = Int
- case class Limits(min: Int, max: Option[Int]) extends Product with Serializable
- type LocalIdx = Int
- type MemIdx = Int
- case class MemType(limits: Limits) extends Type with Product with Serializable
- class ModuleLoader[F[_]] extends AnyRef
Base class for anything that requires reading a module from stream or file.
- sealed abstract class Mut extends Ordered[Mut]
- type Name = String
- type OpCode = Int
- case class ResultType(t: Vector[ValType]) extends Type with Product with Serializable
- class SwamException extends Exception
- type TableIdx = Int
- case class TableType(elemtype: ElemType, limits: Limits) extends Type with Product with Serializable
- sealed trait Type extends AnyRef
- type TypeIdx = Int
- sealed abstract class ValType extends Type