Emscripten
Index
Namespaces
Interfaces
Type Aliases
Variables
Functions
- UTF16ToString
- UTF32ToString
- UTF8ToString
- addFunction
- addRunDependency
- allocate
- allocateUTF8
- allocateUTF8OnStack
- ccall
- cwrap
- getValue
- intArrayFromString
- intArrayToString
- lengthBytesUTF16
- lengthBytesUTF32
- lengthBytesUTF8
- removeFunction
- removeRunDependency
- setValue
- stackAlloc
- stackRestore
- stackSave
- stringToUTF16
- stringToUTF32
- stringToUTF8
- writeArrayToMemory
- writeAsciiToMemory
- writeStringToMemory
Namespaces
FS
FSNode
constructor
Parameters
parent: FSNode
name: string
mode: number
rdev: number
Returns FSNode
id
readonlyisDevice
readonlyisFolder
mode
mount
optionalmounted
name
parent
rdev
read
readMode
write
writeMode
FSStream
constructor
Returns FSStream
flags
readonlyisAppend
readonlyisRead
readonlyisWrite
object
position
Analyze
error
exists
isRoot
name
object
parentExists
parentObject
parentPath
path
ErrnoError
code
errno
name
Lookup
node
path
Mount
mountpoint
mounts
opts
root
type
allocate
Parameters
stream: FSStream
offset: number
length: number
Returns void
analyzePath
Parameters
path: string
optionaldontResolveLastLink: boolean
Returns Analyze
chdir
Parameters
path: string
Returns void
chmod
Parameters
path: string
mode: number
optionaldontFollow: boolean
Returns void
chown
Parameters
path: string
uid: number
gid: number
optionaldontFollow: boolean
Returns void
close
Parameters
stream: FSStream
Returns void
createDataFile
Parameters
parent: string | FSNode
name: string
data: ArrayBufferView
canRead: boolean
canWrite: boolean
canOwn: boolean
Returns FSNode
createLazyFile
Parameters
parent: string | FSNode
name: string
url: string
canRead: boolean
canWrite: boolean
Returns FSNode
createPreloadedFile
Parameters
parent: string | FSNode
name: string
url: string
canRead: boolean
canWrite: boolean
optionalonload: () => void
optionalonerror: () => void
optionaldontCreateFile: boolean
optionalcanOwn: boolean
Returns void
cwd
Returns string
fchmod
Parameters
fd: number
mode: number
Returns void
fchown
Parameters
fd: number
uid: number
gid: number
Returns void
ftruncate
Parameters
fd: number
len: number
Returns void
getPath
Parameters
node: FSNode
Returns string
init
Parameters
input: null | () => null | number
output: null | (c: number) => any
error: null | (c: number) => any
Returns void
ioctl
Parameters
stream: FSStream
cmd: any
arg: any
Returns any
isBlkdev
Parameters
mode: number
Returns boolean
isChrdev
Parameters
mode: number
Returns boolean
isDir
Parameters
mode: number
Returns boolean
isFIFO
Parameters
mode: number
Returns boolean
isFile
Parameters
mode: number
Returns boolean
isLink
Parameters
mode: number
Returns boolean
isSocket
Parameters
mode: number
Returns boolean
lchmod
Parameters
path: string
mode: number
Returns void
lchown
Parameters
path: string
uid: number
gid: number
Returns void
llseek
Parameters
stream: FSStream
offset: number
whence: number
Returns any
lookupPath
Parameters
path: string
opts: any
Returns Lookup
lstat
Parameters
path: string
Returns any
major
Parameters
dev: number
Returns number
makedev
Parameters
ma: number
mi: number
Returns number
minor
Parameters
dev: number
Returns number
mkdev
Parameters
path: string
optionalmode: number
optionaldev: number
Returns any
mkdir
Parameters
path: string
optionalmode: number
Returns any
mmap
Parameters
stream: FSStream
buffer: ArrayBufferView
offset: number
length: number
position: number
prot: number
flags: number
Returns any
mount
Parameters
type: FileSystemType
opts: any
mountpoint: string
Returns any
open
Parameters
path: string
flags: string
optionalmode: number
optionalfd_start: number
optionalfd_end: number
Returns FSStream
read
Parameters
stream: FSStream
buffer: ArrayBufferView
offset: number
length: number
optionalposition: number
Returns number
readFile
Parameters
path: string
opts: { encoding: binary; flags?: string }
Returns Uint8Array
readdir
Parameters
path: string
Returns any
readlink
Parameters
path: string
Returns string
registerDevice
Parameters
dev: number
ops: any
Returns void
rename
Parameters
old_path: string
new_path: string
Returns void
rmdir
Parameters
path: string
Returns void
stat
Parameters
path: string
optionaldontFollow: boolean
Returns any
symlink
Parameters
oldpath: string
newpath: string
Returns any
syncfs
Parameters
populate: boolean
callback: (e: any) => any
Returns void
truncate
Parameters
path: string
len: number
Returns void
unlink
Parameters
path: string
Returns void
unmount
Parameters
mountpoint: string
Returns void
utime
Parameters
path: string
atime: number
mtime: number
Returns void
write
Parameters
stream: FSStream
buffer: ArrayBufferView
offset: number
length: number
optionalposition: number
optionalcanOwn: boolean
Returns number
writeFile
Parameters
path: string
data: string | ArrayBufferView
optionalopts: { flags?: string }
Returns void
Interfaces
CCallOpts
optionalasync
EmscriptenModule
FAST_MEMORY
FHEAP
HEAP
HEAP16
HEAP32
HEAP64
HEAP8
HEAPF32
HEAPF64
HEAPU16
HEAPU32
HEAPU64
HEAPU8
IHEAP
TOTAL_MEMORY
TOTAL_STACK
arguments
environment
filePackagePrefixURL
logReadFiles
noExitRuntime
noInitialRun
onAbort
Type declaration
Parameters
what: any
Returns void
onRuntimeInitialized
Type declaration
Returns void
postRun
preInit
preRun
preinitializedWebGLContext
preloadedAudios
preloadedImages
wasmBinary
_free
Parameters
ptr: number
Returns void
_malloc
Parameters
size: number
Returns number
addOnExit
Parameters
cb: () => any
Returns void
addOnInit
Parameters
cb: () => any
Returns void
addOnPostRun
Parameters
cb: () => any
Returns void
addOnPreMain
Parameters
cb: () => any
Returns void
addOnPreRun
Parameters
cb: () => any
Returns void
destroy
Parameters
object: object
Returns void
getPreloadedPackage
Parameters
remotePackageName: string
remotePackageSize: number
Returns ArrayBuffer
instantiateWasm
Parameters
imports: Imports
successCallback: (module: Instance) => void
Returns undefined | Exports
locateFile
Parameters
url: string
scriptDirectory: string
Returns string
onCustomMessage
Parameters
event: MessageEvent<any>
Returns void
Parameters
str: string
Returns void
printErr
Parameters
str: string
Returns void
FileSystemType
mount
Parameters
mount: Mount
Returns FSNode
syncfs
Parameters
mount: Mount
populate: () => unknown
done: (err?: null | number) => unknown
Returns void
RootFS
FSNode
FSStream
allocate
Type declaration
Parameters
stream: FSStream
offset: number
length: number
Returns void
analyzePath
Type declaration
Parameters
path: string
optionaldontResolveLastLink: boolean
Returns Analyze
chdir
Type declaration
Parameters
path: string
Returns void
chmod
Type declaration
Parameters
path: string
mode: number
optionaldontFollow: boolean
Returns void
chown
Type declaration
Parameters
path: string
uid: number
gid: number
optionaldontFollow: boolean
Returns void
close
Type declaration
Parameters
stream: FSStream
Returns void
createDataFile
Type declaration
Parameters
parent: string | FSNode
name: string
data: ArrayBufferView
canRead: boolean
canWrite: boolean
canOwn: boolean
Returns FSNode
createLazyFile
Type declaration
Parameters
parent: string | FSNode
name: string
url: string
canRead: boolean
canWrite: boolean
Returns FSNode
createPreloadedFile
Type declaration
Parameters
parent: string | FSNode
name: string
url: string
canRead: boolean
canWrite: boolean
optionalonload: () => void
optionalonerror: () => void
optionaldontCreateFile: boolean
optionalcanOwn: boolean
Returns void
cwd
Type declaration
Returns string
fchmod
Type declaration
Parameters
fd: number
mode: number
Returns void
fchown
Type declaration
Parameters
fd: number
uid: number
gid: number
Returns void
filesystems
ftruncate
Type declaration
Parameters
fd: number
len: number
Returns void
getPath
Type declaration
Parameters
node: FSNode
Returns string
init
Type declaration
Parameters
input: null | () => null | number
output: null | (c: number) => any
error: null | (c: number) => any
Returns void
ioctl
Type declaration
Parameters
stream: FSStream
cmd: any
arg: any
Returns any
isBlkdev
Type declaration
Parameters
mode: number
Returns boolean
isChrdev
Type declaration
Parameters
mode: number
Returns boolean
isDir
Type declaration
Parameters
mode: number
Returns boolean
isFIFO
Type declaration
Parameters
mode: number
Returns boolean
isFile
Type declaration
Parameters
mode: number
Returns boolean
isLink
Type declaration
Parameters
mode: number
Returns boolean
isSocket
Type declaration
Parameters
mode: number
Returns boolean
lchmod
Type declaration
Parameters
path: string
mode: number
Returns void
lchown
Type declaration
Parameters
path: string
uid: number
gid: number
Returns void
llseek
Type declaration
Parameters
stream: FSStream
offset: number
whence: number
Returns any
lookupPath
lstat
Type declaration
Parameters
path: string
Returns any
major
Type declaration
Parameters
dev: number
Returns number
makedev
Type declaration
Parameters
ma: number
mi: number
Returns number
minor
Type declaration
Parameters
dev: number
Returns number
mkdev
Type declaration
Parameters
path: string
optionalmode: number
optionaldev: number
Returns any
mkdir
Type declaration
Parameters
path: string
optionalmode: number
Returns any
mmap
Type declaration
Parameters
stream: FSStream
buffer: ArrayBufferView
offset: number
length: number
position: number
prot: number
flags: number
Returns any
mount
Type declaration
Parameters
type: FileSystemType
opts: any
mountpoint: string
Returns any
open
Type declaration
Parameters
path: string
flags: string
optionalmode: number
optionalfd_start: number
optionalfd_end: number
Returns FSStream
read
Type declaration
Parameters
stream: FSStream
buffer: ArrayBufferView
offset: number
length: number
optionalposition: number
Returns number
readFile
Type declaration
Parameters
path: string
opts: { encoding: binary; flags?: string }
Returns Uint8Array
Parameters
path: string
opts: { encoding: utf8; flags?: string }
Returns string
Parameters
path: string
optionalopts: { flags?: string }
Returns Uint8Array
readdir
Type declaration
Parameters
path: string
Returns any
readlink
Type declaration
Parameters
path: string
Returns string
registerDevice
Type declaration
Parameters
dev: number
ops: any
Returns void
rename
Type declaration
Parameters
old_path: string
new_path: string
Returns void
rmdir
Type declaration
Parameters
path: string
Returns void
stat
Type declaration
Parameters
path: string
optionaldontFollow: boolean
Returns any
symlink
Type declaration
Parameters
oldpath: string
newpath: string
Returns any
syncfs
Type declaration
Parameters
populate: boolean
callback: (e: any) => any
Returns void
Parameters
callback: (e: any) => any
optionalpopulate: boolean
Returns void
truncate
Type declaration
Parameters
path: string
len: number
Returns void
unlink
Type declaration
Parameters
path: string
Returns void
unmount
Type declaration
Parameters
mountpoint: string
Returns void
utime
Type declaration
Parameters
path: string
atime: number
mtime: number
Returns void
write
Type declaration
Parameters
stream: FSStream
buffer: ArrayBufferView
offset: number
length: number
optionalposition: number
optionalcanOwn: boolean
Returns number
writeFile
Type declaration
Parameters
path: string
data: string | ArrayBufferView
optionalopts: { flags?: string }
Returns void
mkdirTree
Parameters
path: string
Returns void
Type Aliases
CFloatType
CIntType
CPointerType
CType
EmscriptenModuleFactory
Type parameters
Type declaration
A factory function is generated when setting the
MODULARIZE
build option to1
in your Emscripten build. It return a Promise that resolves to an initialized, ready-to-callEmscriptenModule
instance.By default, the factory function will be named
Module
. It’s recommended to use theEXPORT_ES6
option, in which the factory function will be the default export. If used withoutEXPORT_ES6
, the factory function will be a global variable. You can rename the variable using theEXPORT_NAME
build option. It’s left to you to export any global variables as needed in your application’s types.Parameters
optionalmoduleOverrides: Partial<T>
Default properties for the initialized module.
Returns Promise<T>
EnvironmentType
FileSystemInstance
JSType
TypeCompatibleWithC
Variables
constALLOC_DYNAMIC
constALLOC_NONE
constALLOC_NORMAL
constALLOC_STACK
constALLOC_STATIC
constIDBFS
constMEMFS
constNODEFS
Functions
UTF16ToString
Parameters
ptr: number
Returns string
UTF32ToString
Parameters
ptr: number
Returns string
UTF8ToString
Parameters
ptr: number
optionalmaxBytesToRead: number
Returns string
addFunction
Parameters
func: (...args: any[]) => any
optionalsignature: string
Returns number
addRunDependency
Parameters
id: any
Returns void
allocate
allocateUTF8
Parameters
str: string
Returns number
allocateUTF8OnStack
Parameters
str: string
Returns number
ccall
cwrap
getValue
Parameters
ptr: number
type: CType
optionalnoSafe: boolean
Returns number
intArrayFromString
Parameters
stringy: string
optionaldontAddNull: boolean
optionallength: number
Returns number[]
intArrayToString
Parameters
array: number[]
Returns string
lengthBytesUTF16
Parameters
str: string
Returns number
lengthBytesUTF32
Parameters
str: string
Returns number
lengthBytesUTF8
Parameters
str: string
Returns number
removeFunction
Parameters
funcPtr: number
Returns void
removeRunDependency
Parameters
id: any
Returns void
setValue
Parameters
ptr: number
value: any
type: CType
optionalnoSafe: boolean
Returns void
stackAlloc
Parameters
size: number
Returns number
stackRestore
Parameters
ptr: number
Returns void
stackSave
Returns number
stringToUTF16
Parameters
str: string
outPtr: number
optionalmaxBytesToRead: number
Returns void
stringToUTF32
Parameters
str: string
outPtr: number
optionalmaxBytesToRead: number
Returns void
stringToUTF8
Parameters
str: string
outPtr: number
optionalmaxBytesToRead: number
Returns void
writeArrayToMemory
Parameters
array: number[]
buffer: number
Returns void
writeAsciiToMemory
Parameters
str: string
buffer: number
dontAddNull: boolean
Returns void
writeStringToMemory
Parameters
str: string
buffer: number
dontAddNull: boolean
Returns void
Other WebAssembly declarations, for compatibility with older versions of Typescript