Class WasiPreview1

java.lang.Object
com.dylibso.chicory.wasi.WasiPreview1
All Implemented Interfaces:
Closeable, AutoCloseable

public final class WasiPreview1 extends Object implements Closeable
WASI preview 1 implementation
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
     
    int
    argsGet(com.dylibso.chicory.runtime.Memory memory, int argv, int argvBuf)
     
    int
    argsSizesGet(com.dylibso.chicory.runtime.Memory memory, int argc, int argvBufSize)
     
     
    int
    clockResGet(com.dylibso.chicory.runtime.Memory memory, int clockId, int resultPtr)
     
    int
    clockTimeGet(com.dylibso.chicory.runtime.Memory memory, int clockId, long precision, int resultPtr)
     
    void
     
    int
    environGet(com.dylibso.chicory.runtime.Memory memory, int environ, int environBuf)
     
    int
    environSizesGet(com.dylibso.chicory.runtime.Memory memory, int environCount, int environBufSize)
     
    int
    fdAdvise(int fd, long offset, long len, int advice)
     
    int
    fdAllocate(int fd, long offset, long len)
     
    int
    fdClose(int fd)
     
    int
    fdDatasync(int fd)
     
    int
    fdFdstatGet(com.dylibso.chicory.runtime.Memory memory, int fd, int buf)
     
    int
    fdFdstatSetFlags(int fd, int flags)
     
    int
    fdFdstatSetRights(int fd, long rightsBase, long rightsInheriting)
     
    int
    fdFilestatGet(com.dylibso.chicory.runtime.Memory memory, int fd, int buf)
     
    int
    fdFilestatSetSize(int fd, long size)
     
    int
    fdFilestatSetTimes(int fd, long accessTime, long modifiedTime, int fstFlags)
     
    int
    fdPread(com.dylibso.chicory.runtime.Memory memory, int fd, int iovs, int iovsLen, long offset, int nreadPtr)
     
    int
    fdPrestatDirName(com.dylibso.chicory.runtime.Memory memory, int fd, int path, int pathLen)
     
    int
    fdPrestatGet(com.dylibso.chicory.runtime.Memory memory, int fd, int buf)
     
    int
    fdPwrite(com.dylibso.chicory.runtime.Memory memory, int fd, int iovs, int iovsLen, long offset, int nwrittenPtr)
     
    int
    fdRead(com.dylibso.chicory.runtime.Memory memory, int fd, int iovs, int iovsLen, int nreadPtr)
     
    int
    fdReaddir(com.dylibso.chicory.runtime.Memory memory, int dirFd, int buf, int bufLen, long cookie, int bufUsedPtr)
     
    int
    fdRenumber(int from, int to)
     
    int
    fdSeek(com.dylibso.chicory.runtime.Memory memory, int fd, long offset, int whence, int newOffsetPtr)
     
    int
    fdSync(int fd)
     
    int
    fdTell(com.dylibso.chicory.runtime.Memory memory, int fd, int offsetPtr)
     
    int
    fdWrite(com.dylibso.chicory.runtime.Memory memory, int fd, int iovs, int iovsLen, int nwrittenPtr)
     
    int
    pathCreateDirectory(int dirFd, String rawPath)
     
    int
    pathFilestatGet(com.dylibso.chicory.runtime.Memory memory, int dirFd, int lookupFlags, String rawPath, int buf)
     
    int
    pathFilestatSetTimes(int fd, int lookupFlags, String rawPath, long accessTime, long modifiedTime, int fstFlags)
     
    int
    pathLink(int oldFd, int oldFlags, String rawOldPath, int newFd, String rawNewPath)
     
    int
    pathOpen(com.dylibso.chicory.runtime.Memory memory, int dirFd, int lookupFlags, String rawPath, int openFlags, long rightsBase, long rightsInheriting, int fdFlags, int fdPtr)
     
    int
    pathReadlink(com.dylibso.chicory.runtime.Memory memory, int dirFd, String rawPath, int buf, int bufLen, int bufUsedPtr)
     
    int
    pathRemoveDirectory(int dirFd, String rawPath)
     
    int
    pathRename(int oldFd, String oldRawPath, int newFd, String newRawPath)
     
    int
    pathSymlink(String oldRawPath, int dirFd, String newRawPath)
     
    int
    pathUnlinkFile(int dirFd, String rawPath)
     
    int
    pollOneoff(com.dylibso.chicory.runtime.Memory memory, int inPtr, int outPtr, int nsubscriptions, int neventsPtr)
     
    void
    procExit(int code)
     
    int
    procRaise(int sig)
     
    int
    randomGet(com.dylibso.chicory.runtime.Memory memory, int buf, int bufLen)
     
    int
     
    int
    sockAccept(int sock, int fdFlags, int roFdPtr)
     
    int
    sockRecv(int sock, int riDataPtr, int riDataLen, int riFlags, int roDataLenPtr, int roFlagsPtr)
     
    int
    sockSend(int sock, int siDataPtr, int siDataLen, int siFlags, int retDataLenPtr)
     
    int
    sockShutdown(int sock, int how)
     
    com.dylibso.chicory.runtime.HostFunction[]
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • builder

      public static WasiPreview1.Builder builder()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • adapterCloseBadfd

      public int adapterCloseBadfd(int fd)
    • adapterOpenBadfd

      public int adapterOpenBadfd(int fd)
    • argsGet

      public int argsGet(com.dylibso.chicory.runtime.Memory memory, int argv, int argvBuf)
    • argsSizesGet

      public int argsSizesGet(com.dylibso.chicory.runtime.Memory memory, int argc, int argvBufSize)
    • clockResGet

      public int clockResGet(com.dylibso.chicory.runtime.Memory memory, int clockId, int resultPtr)
    • clockTimeGet

      public int clockTimeGet(com.dylibso.chicory.runtime.Memory memory, int clockId, long precision, int resultPtr)
    • environGet

      public int environGet(com.dylibso.chicory.runtime.Memory memory, int environ, int environBuf)
    • environSizesGet

      public int environSizesGet(com.dylibso.chicory.runtime.Memory memory, int environCount, int environBufSize)
    • fdAdvise

      public int fdAdvise(int fd, long offset, long len, int advice)
    • fdAllocate

      public int fdAllocate(int fd, long offset, long len)
    • fdClose

      public int fdClose(int fd)
    • fdDatasync

      public int fdDatasync(int fd)
    • fdFdstatGet

      public int fdFdstatGet(com.dylibso.chicory.runtime.Memory memory, int fd, int buf)
    • fdFdstatSetFlags

      public int fdFdstatSetFlags(int fd, int flags)
    • fdFdstatSetRights

      public int fdFdstatSetRights(int fd, long rightsBase, long rightsInheriting)
    • fdFilestatGet

      public int fdFilestatGet(com.dylibso.chicory.runtime.Memory memory, int fd, int buf)
    • fdFilestatSetSize

      public int fdFilestatSetSize(int fd, long size)
    • fdFilestatSetTimes

      public int fdFilestatSetTimes(int fd, long accessTime, long modifiedTime, int fstFlags)
    • fdPread

      public int fdPread(com.dylibso.chicory.runtime.Memory memory, int fd, int iovs, int iovsLen, long offset, int nreadPtr)
    • fdPrestatDirName

      public int fdPrestatDirName(com.dylibso.chicory.runtime.Memory memory, int fd, int path, int pathLen)
    • fdPrestatGet

      public int fdPrestatGet(com.dylibso.chicory.runtime.Memory memory, int fd, int buf)
    • fdPwrite

      public int fdPwrite(com.dylibso.chicory.runtime.Memory memory, int fd, int iovs, int iovsLen, long offset, int nwrittenPtr)
    • fdRead

      public int fdRead(com.dylibso.chicory.runtime.Memory memory, int fd, int iovs, int iovsLen, int nreadPtr)
    • fdReaddir

      public int fdReaddir(com.dylibso.chicory.runtime.Memory memory, int dirFd, int buf, int bufLen, long cookie, int bufUsedPtr)
    • fdRenumber

      public int fdRenumber(int from, int to)
    • fdSeek

      public int fdSeek(com.dylibso.chicory.runtime.Memory memory, int fd, long offset, int whence, int newOffsetPtr)
    • fdSync

      public int fdSync(int fd)
    • fdTell

      public int fdTell(com.dylibso.chicory.runtime.Memory memory, int fd, int offsetPtr)
    • fdWrite

      public int fdWrite(com.dylibso.chicory.runtime.Memory memory, int fd, int iovs, int iovsLen, int nwrittenPtr)
    • pathCreateDirectory

      public int pathCreateDirectory(int dirFd, String rawPath)
    • pathFilestatGet

      public int pathFilestatGet(com.dylibso.chicory.runtime.Memory memory, int dirFd, int lookupFlags, String rawPath, int buf)
    • pathFilestatSetTimes

      public int pathFilestatSetTimes(int fd, int lookupFlags, String rawPath, long accessTime, long modifiedTime, int fstFlags)
    • pathLink

      public int pathLink(int oldFd, int oldFlags, String rawOldPath, int newFd, String rawNewPath)
    • pathOpen

      public int pathOpen(com.dylibso.chicory.runtime.Memory memory, int dirFd, int lookupFlags, String rawPath, int openFlags, long rightsBase, long rightsInheriting, int fdFlags, int fdPtr)
    • pathReadlink

      public int pathReadlink(com.dylibso.chicory.runtime.Memory memory, int dirFd, String rawPath, int buf, int bufLen, int bufUsedPtr)
    • pathRemoveDirectory

      public int pathRemoveDirectory(int dirFd, String rawPath)
    • pathRename

      public int pathRename(int oldFd, String oldRawPath, int newFd, String newRawPath)
    • pathSymlink

      public int pathSymlink(String oldRawPath, int dirFd, String newRawPath)
    • pathUnlinkFile

      public int pathUnlinkFile(int dirFd, String rawPath)
    • pollOneoff

      public int pollOneoff(com.dylibso.chicory.runtime.Memory memory, int inPtr, int outPtr, int nsubscriptions, int neventsPtr)
    • procExit

      public void procExit(int code)
    • procRaise

      public int procRaise(int sig)
    • randomGet

      public int randomGet(com.dylibso.chicory.runtime.Memory memory, int buf, int bufLen)
    • schedYield

      public int schedYield()
    • sockAccept

      public int sockAccept(int sock, int fdFlags, int roFdPtr)
    • sockRecv

      public int sockRecv(int sock, int riDataPtr, int riDataLen, int riFlags, int roDataLenPtr, int roFlagsPtr)
    • sockSend

      public int sockSend(int sock, int siDataPtr, int siDataLen, int siFlags, int retDataLenPtr)
    • sockShutdown

      public int sockShutdown(int sock, int how)
    • toHostFunctions

      public com.dylibso.chicory.runtime.HostFunction[] toHostFunctions()