Packages

class Engine[F[_]] extends ModuleLoader[F]

This is the engine used to compile, instantiate and run modules. It exposes all the needed interface to interact with modules.

You typically want to reuse the same instance for all your executions over the same effectful type F.

Source
Engine.scala
Linear Supertypes
ModuleLoader[F], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Engine
  2. ModuleLoader
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def compile(sections: Stream[F, Section]): F[Module[F]]

    Reads the given stream of binary module sections, validates, and compiles it.

    Reads the given stream of binary module sections, validates, and compiles it. The returned compiled Module can then be instantiated to be run.

    If validation or compilation fails, returns an error with the message wrapped in it.

  7. def compile(path: Path, blocker: Blocker, chunkSize: Int = 1024)(implicit cs: ContextShift[F]): F[Module[F]]

    Reads the .wasm file at the given path, validates, and compiles it.

    Reads the .wasm file at the given path, validates, and compiles it. The returned compiled Module can then be instantiated to be run.

    If validation or compilation fails, returns an error with the message wrapped in it.

  8. def compileBytes(bytes: Stream[F, Byte]): F[Module[F]]

    Reads the given binary encoded module, validates, and compiles it.

    Reads the given binary encoded module, validates, and compiles it. The returned compiled Module can then be instantiated to be run.

    If validation or compilation fails, returns an error with the message wrapped in it.

  9. val conf: EngineConfiguration
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def instantiate(module: Module[F], imports: Imports[F]): F[Instance[F]]

    Instantiates the previously validated and compiled module.

    Instantiates the previously validated and compiled module. The returned Instance can then be used to access exported elements.

    If instantiation fails, returns an error with the message wrapped in it.

  15. def instantiate(sections: Stream[F, Section], imports: Imports[F]): F[Instance[F]]

    Reads the given stream of binary module sections, validates, compiles, and instantiates it.

    Reads the given stream of binary module sections, validates, compiles, and instantiates it. The returned Instance can then be used to access exported elements.

    If validation, compilation, or instantiation fails, returns an error with the message wrapped in it.

  16. def instantiate(path: Path, imports: Imports[F], blocker: Blocker, chunkSize: Int = 1024)(implicit cs: ContextShift[F]): F[Instance[F]]

    Reads the .wasm file at the given path, validates, compiles, and instantiates it.

    Reads the .wasm file at the given path, validates, compiles, and instantiates it. The returned Instance can then be used to access exported elements.

    If validation, compilation, or instantiation fails, returns an error with the message wrapped in it.

  17. def instantiateBytes(bytes: Stream[F, Byte], imports: Imports[F]): F[Instance[F]]

    Reads the given binary encoded module, validates, compiles, and instantiates it.

    Reads the given binary encoded module, validates, compiles, and instantiates it. The returned Instance can then be used to access exported elements.

    If validation, compilation, or instantiation fails, returns an error with the message wrapped in it.

  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def sections(bytes: Stream[F, Byte]): Stream[F, Section]

    Reads a binary module from the given bytes.

    Reads a binary module from the given bytes.

    Definition Classes
    ModuleLoader
  23. def sections(path: Path, blocker: Blocker, chunkSize: Int = 1024)(implicit cs: ContextShift[F]): Stream[F, Section]

    Reads a binary module from the given path.

    Reads a binary module from the given path.

    Definition Classes
    ModuleLoader
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. def validate(sections: Stream[F, Section]): F[Unit]

    Reads the given stream of binary module sections and validates it.

    Reads the given stream of binary module sections and validates it.

    If validation fails, returns an error with the validation message wrapped in it.

  27. def validate(path: Path, blocker: Blocker, chunkSize: Int = 1024)(implicit cs: ContextShift[F]): F[Unit]

    Reads the .wasm file at the given path and validates it.

    Reads the .wasm file at the given path and validates it.

    If validation fails, returns an error with the validation message wrapped in it.

  28. def validateBytes(bytes: Stream[F, Byte]): F[Unit]

    Reads the given binary encoded module and validates it.

    Reads the given binary encoded module and validates it.

    If validation fails, returns an error with the validation message wrapped in it.

  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from ModuleLoader[F]

Inherited from AnyRef

Inherited from Any

Ungrouped