Commit graph

21 commits

Author SHA1 Message Date
Aapo Alasuutari 82655b9285
perf(ext/ffi): Optimize FFI Rust side type checks (#14923) 2022-06-21 09:16:59 +05:30
Aapo Alasuutari a38a1f91cf
chore(ext/ffi): simplify FFI types (#14920)
This commit simplifies the TypeScript types used for interacting with Deno FFI. The basis is that types are now first grouped into logical wholes, NativeNumberType, NativeBigIntType etc. These wholes are combined into the NativeType and NativeResultType general types.

Additionally, this PR removes the { function: { parameters: [], result: "void" } } type declaration from parameters (and result types. Now functions are merely passed and returned as "function".
2022-06-21 08:20:33 +05:30
Divy Srivastava 354fa6cd00
BREAKING(ext/ffi): Remove Deno.UnsafePointer indirection (#14915) 2022-06-20 19:08:10 +05:30
Aapo Alasuutari 3d6fa64f19
feat(ext/ffi): Callbacks (#14663)
This commit adds support for unstable FFI
callbacks. A callback is registered using
the `Deno.UnsafeCallback` API.

The backing memory for the callback can 
be disposed of using `Deno.UnsafeCallback#close`.
It is not safe to pass the callback after calling
close.

Callbacks from other than the isolate thread
are not supported.

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2022-06-20 16:36:04 +05:30
Elias Sjögreen 8113fac939
feat(ext/ffi): support passing and returning bigints (#14523) 2022-06-08 16:43:10 +05:30
Aapo Alasuutari b1a6555c05
feat(ext/ffi): Support read only global statics (#13662) 2022-02-18 17:51:19 +05:30
Yoshiya Hinosawa 4c1053ad33
chore: update copyright year (#13434) 2022-01-20 16:10:16 +09:00
DjDeveloper 62291e9b0e
feat(ext/ffi): UnsafeFnPointer API (#13340) 2022-01-12 12:38:26 +01:00
DjDeveloper a7ea93b978
fix(ext/ffi): pointer type can accept null (#13335) 2022-01-11 15:01:52 +05:30
DjDeveloper 5680d33dd9
feat(ext/ffi): support alias names for symbol definitions (#13090) 2022-01-11 07:21:16 +01:00
Divy Srivastava d8e96d2742
feat(ext/ffi): infer symbol types (#13221)
Co-authored-by: sinclairzx81 <sinclairzx81@users.noreply.github.com>
2022-01-10 21:03:25 +05:30
Ryan Dahl 1fb5858009
chore: update copyright to 2022 (#13306)
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2022-01-07 22:09:52 -05:00
DjDeveloper 9778545048
fix(ext/ffi): throw errors instead of panic (#13283) 2022-01-05 12:55:31 +05:30
Elias Sjögreen ee49cce726
feat(ext/ffi): implement UnsafePointer and UnsafePointerView (#12828) 2021-12-15 15:41:49 +01:00
Carter Snook 0cb81951af
test(ffi): add mutable buffer tests (#12701) 2021-11-10 14:55:46 +01:00
Bartek Iwańczuk 76de56091b
test(ext/ffi): add test for multiple buffers (#12373) 2021-10-10 15:18:02 +02:00
Divy Srivastava ab2e0a465e
fix(ext/ffi): don't panic in dlopen (#12344) 2021-10-07 11:03:00 -04:00
Bartek Iwańczuk 3faf75aa88
feat(ext/ffi): add support for buffer arguments (#12335)
This commit adds support for passing buffer arguments across 
FFI boundary.


Co-authored-by: eliassjogreen <eliassjogreen1@gmail.com>
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-10-06 00:27:05 +02:00
Divy Srivastava 80aee99c9e
feat(ext/ffi): Non-blocking FFI (#12274) 2021-10-05 14:50:00 +02:00
Elias Sjögreen 60b68e63f1
test(ext/ffi): add tests for different parameter and return types (#12158) 2021-09-20 15:42:54 -07:00
Elias Sjögreen 33c8d790c3
feat: ffi to replace plugins (#11152)
This commit removes implementation of "native plugins" and replaces
it with FFI API.

Effectively "Deno.openPlugin" API was replaced with "Deno.dlopen" API.
2021-08-06 23:28:10 +02:00