char/avril
(wip) why'd you have to go and make things so complicaaaaated?
git clone https://git.t4t.associates/char/avril
d512952
main
1declare module"ext:core/ops" { 2type NativeDef = import ( "./types.js" ). NativeDef ; 3type NativeValue = import ( "./types.js" ). NativeValue ; 4type MemoryType = import ( "./types.js" ). MemoryType ; 5type MemoryValue < K extends MemoryType > = import ( "./types.js" ). MemoryValue < K > ; 6 7export function op_ffi_dlopen ( specifier : string , defs : NativeDef []): number ; 8export function op_ffi_close ( id : number ): undefined ; 9export function op_ffi_call ( id : number , index : number , args : unknown []): NativeValue ; 10export function op_ffi_call_ptr ( address : bigint , def : NativeDef , args : unknown []): NativeValue ; 11export function op_ffi_call_async_begin ( id : number , index : number , args : unknown []): number ; 12export function op_ffi_await ( callId : number ): Promise < number >; 13export function op_ffi_call_async_finish ( callId : number , result : NativeDef [ "result" ]): NativeValue ; 14export function op_ffi_address_of ( view : ArrayBuffer | ArrayBufferView ): bigint ; 15export function op_ffi_read < K extends MemoryType > ( address : bigint , kind : K ): MemoryValue < K >; 16export function op_ffi_read_bytes ( address : bigint , length : number ): Uint8Array < ArrayBuffer >; 17export function op_ffi_read_cstring ( address : bigint , max : number ): Uint8Array < ArrayBuffer >; 18export function op_ffi_write ( address : bigint , kind : MemoryType , value : unknown ): undefined ; 19export function op_ffi_write_bytes ( address : bigint , source : ArrayBuffer | ArrayBufferView ): undefined ; 20}