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 wasi
    Definition Classes
    runtime
  • Advice
  • Clockid
  • Errno
  • FdFlags
  • Filetype
  • Fstflags
  • LongFlagsOps
  • Lookupflags
  • Oflags
  • Riflags
  • Rights
  • Roflags
  • Sdflags
  • ShortFlagsOps
  • Signal
  • Wasi
  • WasiException
  • Whence

abstract class Wasi[F[_]] extends AnyRef

Interface of the WASI API, as of snapshot1

Annotations
@module()
Source
Wasi.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Wasi
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Wasi()

Abstract Value Members

  1. abstract def argsGet(argv: Pointer, argvBuf: Pointer): F[Errno]
    Annotations
    @effectful(name = "args_get")
  2. abstract def argsSizesGet(argc: Pointer, argvBufSize: Pointer): F[Errno]
    Annotations
    @effectful(name = "args_sizes_get")
  3. abstract def environGet(environ: Pointer, buf: Pointer): F[Errno]
    Annotations
    @effectful(name = "environ_get")
  4. abstract def environSizesGet(environc: Pointer, environBufSize: Pointer): F[Errno]
    Annotations
    @effectful(name = "environ_sizes_get")
  5. abstract def fdAdvise(fd: Fd, offset: Filesize, len: Filesize, advice: Advice): F[Errno]
    Annotations
    @effectful(name = "fd_advise")
  6. abstract def fdAllocate(fd: Fd, offset: Filesize, len: Filesize): F[Errno]
    Annotations
    @effectful(name = "fd_allocate")
  7. abstract def fdClose(fd: Fd): F[Errno]
    Annotations
    @effectful(name = "fd_close")
  8. abstract def fdDatasync(fd: Fd): F[Errno]
    Annotations
    @effectful(name = "fd_datasync")
  9. abstract def fdFdstatGet(fd: Fd, ptr: Pointer): F[Errno]
    Annotations
    @effectful(name = "fd_fdstat_get")
  10. abstract def fdFdstatSetFlags(fd: Fd, flags: FdFlags): F[Errno]
    Annotations
    @effectful(name = "fd_fdstat_set_flags")
  11. abstract def fdFdstatSetRights(fd: Fd, fsRightsBase: Rights, fsRightsInheriting: Rights): F[Errno]
    Annotations
    @effectful(name = "fd_fdstat_set_rights")
  12. abstract def fdFilestatGet(fd: Fd, ptr: Pointer): F[Errno]
    Annotations
    @effectful(name = "fd_filestat_get")
  13. abstract def fdFilestatSetSize(fd: Fd, size: Filesize): F[Errno]
    Annotations
    @effectful(name = "fd_filestat_set_size")
  14. abstract def fdFilestatSetTimes(fd: Fd, atim: Timestamp, mtim: Timestamp, fstFlags: Fstflags): F[Errno]
    Annotations
    @effectful(name = "fd_filestat_set_times")
  15. abstract def fdPread(fd: Fd, iovs: Pointer, iovsSize: Size, offset: Filesize, nread: Pointer): F[Errno]
    Annotations
    @effectful(name = "fd_pread")
  16. abstract def fdPrestatDirName(fd: Fd, path: Pointer, pathLen: Size): F[Errno]
    Annotations
    @effectful(name = "fd_prestat_dir_name")
  17. abstract def fdPrestatGet(fd: Fd, prestat: Pointer): F[Errno]
    Annotations
    @effectful(name = "fd_prestat_get")
  18. abstract def fdPwrite(fd: Fd, iovs: Pointer, iovsSize: Size, offset: Filesize, nwritten: Pointer): F[Errno]
    Annotations
    @effectful(name = "fd_pwrite")
  19. abstract def fdRead(fd: Fd, iovs: Pointer, iovsSize: Size, nread: Pointer): F[Errno]
    Annotations
    @effectful(name = "fd_read")
  20. abstract def fdReaddir(fd: Fd, buf: Pointer, bufLen: Size, dircookie: Dircookie, bufused: Size): F[Errno]
    Annotations
    @effectful(name = "fd_readdir")
  21. abstract def fdRenumber(fd: Fd, to: Fd): F[Errno]
    Annotations
    @effectful(name = "fd_renumber")
  22. abstract def fdSeek(fd: Fd, offset: Filedelta, whence: Whence, newOffset: Pointer): F[Errno]
    Annotations
    @effectful(name = "fd_seek")
  23. abstract def fdSync(fd: Fd): F[Errno]
    Annotations
    @effectful(name = "fd_sync")
  24. abstract def fdTell(fd: Fd, offset: Pointer): F[Errno]
    Annotations
    @effectful(name = "fd_tell")
  25. abstract def fdWrite(fd: Fd, iovs: Pointer, iovsSize: Size, nwritten: Pointer): F[Errno]
    Annotations
    @effectful(name = "fd_write")
  26. abstract val mem: Deferred[F, Memory[F]]
  27. abstract def pathCreateDirectory(fd: Fd, pathOffset: Pointer, pathSize: Size): F[Errno]
    Annotations
    @effectful(name = "path_create_directory")
  28. abstract def pathFilestatGet(fd: Fd, flags: Lookupflags, pathOffset: Pointer, pathSize: Size, buf: Pointer): F[Errno]
    Annotations
    @effectful(name = "path_filestat_get")
  29. abstract def pathFilestatSetTimes(fd: Fd, dirflags: Lookupflags, pathOffset: Pointer, pathSize: Size, atim: Timestamp, mtim: Timestamp, fstFlags: Fstflags): F[Errno]
    Annotations
    @effectful(name = "path_filestat_set_times")
  30. abstract def pathLink(oldFd: Fd, oldFlags: Lookupflags, oldPathOffset: Pointer, oldPathSize: Size, newFd: Fd, newPathOffset: Pointer, newPathSize: Size): F[Errno]
    Annotations
    @effectful(name = "path_link")
  31. abstract def pathOpen(fd: Fd, dirflags: Lookupflags, pathOffset: Pointer, pathSize: Size, oflags: Oflags, fsRightsBase: Rights, fsRightsInheriting: Rights, fdflags: FdFlags, opened: Pointer): F[Errno]
    Annotations
    @effectful(name = "path_open")
  32. abstract def pathReadlink(fd: Fd, pathOffset: Pointer, pathSize: Size, buf: Pointer, bufLen: Size, bufused: Pointer): F[Errno]
    Annotations
    @effectful(name = "path_readlink")
  33. abstract def pathRemoveDirectory(fd: Fd, pathOffset: Pointer, pathSize: Size): F[Errno]
    Annotations
    @effectful(name = "path_remove_directory")
  34. abstract def pathRename(fd: Fd, oldPathOffset: Pointer, oldPathSize: Size, newFd: Fd, newPathOffset: Pointer, newPathSize: Size): F[Errno]
    Annotations
    @effectful(name = "path_rename")
  35. abstract def pathSymlink(oldPathOffset: Pointer, oldPathSize: Size, newFd: Fd, newPathOffset: Pointer, newPathSize: Size): F[Errno]
    Annotations
    @effectful(name = "path_symlink")
  36. abstract def pathUnlinkFile(fd: Fd, pathOffset: Pointer, pathSize: Size): F[Errno]
    Annotations
    @effectful(name = "path_unlink_file")
  37. abstract def pollOneoff(in: Pointer, out: Pointer, nsubscriptions: Size, nevents: Pointer): F[Errno]
    Annotations
    @effectful(name = "poll_oneoff")
  38. abstract def procExit(rval: Exitcode): F[Unit]
    Annotations
    @effectful(name = "proc_exit")
  39. abstract def procRaise(sig: Signal): F[Errno]
    Annotations
    @effectful(name = "proc_raise")
  40. abstract def randomGet(buf: Pointer, bufLen: Size): F[Errno]
    Annotations
    @effectful(name = "random_get")
  41. abstract def schedYield(): F[Errno]
    Annotations
    @effectful(name = "sched_yield")
  42. abstract def sockRecv(fd: Fd, riDataOffset: Pointer, riDataSize: Size, riFlags: Riflags, roDataSize: Pointer, roFlags: Pointer): F[Errno]
    Annotations
    @effectful(name = "sock_recv")
  43. abstract def sockSend(fd: Fd, siDataOffset: Pointer, siDataSize: Size, siFlags: Siflags, soDataLen: Pointer): F[Errno]
    Annotations
    @effectful(name = "sock_send")
  44. abstract def sockShutdown(fd: Fd, how: Sdflags): F[Errno]
    Annotations
    @effectful(name = "sock_shutdown")

Concrete 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. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. 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 AnyRef

Inherited from Any

Ungrouped