Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4500640
ffi.d.ts
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ffi.d.ts
View Options
declare
module
'ant:ffi'
{
interface
FFITypeConstants
{
void
:
'void'
;
int8
:
'int8'
;
int16
:
'int16'
;
int
:
'int'
;
int64
:
'int64'
;
uint8
:
'uint8'
;
uint16
:
'uint16'
;
uint64
:
'uint64'
;
float
:
'float'
;
double
:
'double'
;
pointer
:
'pointer'
;
string
:
'string'
;
spread
:
'...'
;
}
type
FFIType
=
FFITypeConstants
[
keyof
FFITypeConstants
];
interface
FunctionSignature
{
returns
:
FFIType
;
args
:
FFIType
[];
}
interface
FFILibrary
{
define
(
name
:
string
,
signature
:
FunctionSignature
|
[
FFIType
,
FFIType
[]])
:
void
;
call
(
name
:
string
,
...args
:
unknown
[])
:
unknown
;
}
const
suffix
:
'dylib'
|
'so'
|
'dll'
;
const
FFIType
:
FFITypeConstants
;
function
alloc
(
size
:
number
)
:
number
;
function
free
(
ptr
:
number
)
:
void
;
function
read
(
ptr
:
number
,
size
:
number
,
type
?
:
FFIType
)
:
unknown
;
function
write
(
ptr
:
number
,
value
:
unknown
,
type
?
:
FFIType
)
:
void
;
function
pointer
(
value
:
unknown
)
:
number
;
function
freeCallback
(
ptr
:
number
)
:
void
;
function
readPtr
(
ptr
:
number
)
:
number
;
function
callback
(
signature
:
FunctionSignature
|
[
FFIType
,
FFIType
[]],
fn
:
(
...args
:
unknown
[])
=>
unknown
)
:
number
;
function
dlopen
<
T
extends
object
=
{}
>
(
libraryPath
:
string
)
:
FFILibrary
&
T
;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 3, 8:27 AM (6 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
537968
Default Alt Text
ffi.d.ts (1 KB)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment