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 generator
  5. 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())
  6. package syntax

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

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

Type Members

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

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

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

Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped