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 annotations
  • AsInstance
  • AsInterface
  • Elem
  • Imports
  • TCMap
  • package internals
    Definition Classes
    runtime
  • package memory
    Definition Classes
    runtime
  • package trace
    Definition Classes
    runtime
  • package wasi
    Definition Classes
    runtime

package imports

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

Package Members

  1. package annotations

Type Members

  1. trait AsInstance[T, F[_]] extends AnyRef

    A typeclass that describes what it means for an imported object to be viewed as an instance from the engine.

  2. trait AsInterface[T, F[_]] extends AnyRef

    A typeclass that describes what it means for a type to be viewed as an interface element from the engine.

  3. trait Elem[TC[_]] extends AnyRef
  4. trait Imports[F[_]] extends AnyRef

    Represents the imported elements of an instance.

    Represents the imported elements of an instance. These can either be other module Instances or Scala functions and variables made available to interact between both worlds.

  5. class TCMap[K, TC[_]] extends AnyRef

    A map whose elements may be of any type as long as a given typeclass for them is provided.

Value Members

  1. def NoImports[F[_]](implicit arg0: MonadError[F, Throwable]): Imports[F]
  2. def module[T, F[_]](name: String, mod: T)(implicit I: AsInstance[T, F]): (String, Elem[[α$2$]AsInstance[α$2$, F]])
  3. object AsInstance
  4. object AsInterface
  5. object Elem
  6. object Imports
  7. object TCMap

Inherited from AnyRef

Inherited from Any

Ungrouped