Packages

  • package root
    Definition Classes
    root
  • package swam
    Definition Classes
    root
  • package binary
    Definition Classes
    swam
  • package custom
  • BinaryException
  • InstCodec
  • ModuleParser
  • ModuleStream
  • TypeCodec
  • WasmCodec
  • eoi
  • package cfg
    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
p

swam

binary

package binary

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

Package Members

  1. package custom

Type Members

  1. class BinaryException extends SwamException
  2. trait InstCodec extends TypeCodec
  3. class ModuleParser[F[_]] extends AnyRef

    A binary section stream parser.

    A binary section stream parser. The parser uses the validator to validate the stream.

  4. trait TypeCodec extends AnyRef
  5. type VarResut[F[_]] = (Long, Option[(ByteVector, Int, Stream[F, Byte])])

Value Members

  1. val noop: Codec[Unit]
  2. val varint32: Codec[Int]
  3. val varint64: Codec[Long]
  4. val varint7: Codec[Int]
  5. val varuint32: Codec[Int]
  6. val varuint7: Codec[Int]
  7. def vectorLookahead[T](cond: Decoder[Boolean], element: Codec[T]): Codec[Vector[T]]
  8. def vectorWithN[T](size: Codec[Int], value: Codec[T]): Codec[Vector[T]]
  9. object ModuleStream

    The module streams expose way to encode and decode WebAssembly modules in binary format.

    The module streams expose way to encode and decode WebAssembly modules in binary format. Section are streamed in the order they arrive, which may not be correct when a module is parsed. It is up to the client code to check section constraints.

  10. object WasmCodec extends InstCodec
  11. object eoi extends Codec[Unit]

Inherited from AnyRef

Inherited from Any

Ungrouped