Packages

  • package root
    Definition Classes
    root
  • package swam
    Definition Classes
    root
  • 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 config
    Definition Classes
    runtime
  • package formats
    Definition Classes
    runtime
  • package imports
    Definition Classes
    runtime
  • package internals
    Definition Classes
    runtime
  • package memory
    Definition Classes
    runtime
  • Allocator
  • package trace
    Definition Classes
    runtime
  • package wasi
    Definition Classes
    runtime

package memory

Type Members

  1. trait Allocator[F[_]] extends AnyRef

    An allocator to manage complex objects stored in linear memory.

Ungrouped