Packages

p

swam

package swam

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. swam
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package binary
  2. package cfg
  3. package decompilation
  4. 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())
  5. package syntax

    Instructions in this package are grouped by category as described in the specification.

  6. package text
  7. package traversal
  8. package util
  9. package validation

Type Members

  1. sealed trait ElemType extends Type
  2. type FuncIdx = Int
  3. case class FuncType(params: Vector[ValType], t: Vector[ValType]) extends Type with Product with Serializable
  4. type GlobalIdx = Int
  5. case class GlobalType(tpe: ValType, mut: Mut) extends Type with Product with Serializable
  6. type LabelIdx = Int
  7. case class Limits(min: Int, max: Option[Int]) extends Product with Serializable
  8. type LocalIdx = Int
  9. type MemIdx = Int
  10. case class MemType(limits: Limits) extends Type with Product with Serializable
  11. class ModuleLoader[F[_]] extends AnyRef

    Base class for anything that requires reading a module from stream or file.

  12. sealed abstract class Mut extends Ordered[Mut]
  13. type Name = String
  14. type OpCode = Int
  15. case class ResultType(t: Option[ValType]) extends Type with Product with Serializable
  16. class SwamException extends Exception
  17. type TableIdx = Int
  18. case class TableType(elemtype: ElemType, limits: Limits) extends Type with Product with Serializable
  19. sealed trait Type extends AnyRef
  20. type TypeIdx = Int
  21. sealed abstract class ValType extends Type

Value Members

  1. object ElemType
  2. object Limits extends (Int, Int) => Limits with Serializable
  3. object Mut
  4. object OpCode
  5. object ValType

Inherited from AnyRef

Inherited from Any

Ungrouped