web_ffi library

Provides mechanisms to use a dart:ffi 2.12.0 like API on the web but using dart:js. While some things are missing, new things were added, identifiable by the @extra annotation.

Classes

Allocator
Manages memory on the native heap.
Double
Represents a native 64 bit double in C.
DynamicLibrary
Represents a dynamically loaded C library.
Float
Represents a native 32 bit float in C.
Int16
Represents a native signed 16 bit integer in C.
Int32
Represents a native signed 32 bit integer in C.
Int64
Represents a native signed 64 bit integer in C.
Int8
Represents a native signed 8 bit integer in C.
IntPtr
Represents a native pointer-sized integer in C.
NativeFunction<T extends Function>
Represents a function type in C.
NativeType
NativeType's subtypes represent a native type in C.
Opaque
Opaque's subtypes represent opaque types in C.
Pointer<T extends NativeType>
Represents a pointer into the native C memory. Cannot be extended.
Uint16
Represents a native unsigned 16 bit integer in C.
Uint32
Represents a native unsigned 32 bit integer in C.
Uint64
Represents a native unsigned 64 bit integer in C.
Uint8
Represents a native unsigned 8 bit integer in C.
Void
Represents a void type in C.

Extensions

AllocatorAlloc
Extension on Allocator to provide allocation with NativeType.
DoublePointer
Extension on Pointer specialized for the type argument Double.
DynamicLibraryExtension
FloatPointer
Extension on Pointer specialized for the type argument Float.
Int16Pointer
Extension on Pointer specialized for the type argument Int16.
Int32Pointer
Extension on Pointer specialized for the type argument Int32.
Int64Pointer
Extension on Pointer specialized for the type argument Int64.
Int8Pointer
Extension on Pointer specialized for the type argument Int8.
IntPtrPointer
Extension on Pointer specialized for the type argument IntPtr.
NativeFunctionPointer
Extension on Pointer specialized for the type argument NativeFunction.
PointerPointer
Extension on Pointer specialized for the type argument Pointer.
Uint16Pointer
Extension on Pointer specialized for the type argument Uint16.
Uint32Pointer
Extension on Pointer specialized for the type argument Uint32.
Uint64Pointer
Extension on Pointer specialized for the type argument Uint64.
Uint8Pointer
Extension on Pointer specialized for the type argument Uint8.

Properties

nullptr Pointer<Never>
Represents a pointer into the native C memory corresponding to "NULL", e.g. a pointer with address 0.
final

Functions

sizeOf<T extends NativeType>() int
Number of bytes used by native type T.