Packages

  • package root
    Definition Classes
    root
  • package swam
    Definition Classes
    root
  • package binary
    Definition Classes
    swam
  • package decompilation
    Definition Classes
    swam
  • 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())
    Definition Classes
    swam
  • package syntax

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

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

    Definition Classes
    swam
  • package text
    Definition Classes
    swam
  • package traversal
    Definition Classes
    swam
  • package util
    Definition Classes
    swam
  • package validation
    Definition Classes
    swam
  • package config
  • Context
  • OperandType
  • Unknown
  • Val
  • ValidationException
  • Validator
p

swam

validation

package validation

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

Type Members

  1. case class Context[F[_]](types: Vector[FuncType], funcs: Vector[FuncType], tables: Vector[TableType], mems: Vector[MemType], globals: Vector[GlobalType], locals: Vector[ValType], labels: Vector[ResultType], ret: Option[ResultType], operands: List[OperandType], unreachable: Boolean, parent: Option[Context[F]])(implicit F: MonadError[F, Throwable]) extends Product with Serializable

    A validation context, used when performing module and instruction validation.

  2. sealed trait OperandType extends AnyRef
  3. case class Val(tpe: ValType) extends OperandType with Product with Serializable
  4. class ValidationException extends SwamException
  5. abstract class Validator[F[_]] extends AnyRef

    A validator makes it possible to validate sections in a stream.

Value Members

  1. def EmptyContext[F[_]](implicit F: MonadError[F, Throwable]): Context[F]
  2. object Unknown extends OperandType with Product with Serializable
  3. object Validator

Inherited from AnyRef

Inherited from Any

Ungrouped