Live data from Hacker News

Turbocall – Just-in-time compiler for Deno FFI

divy.work

1–10 of 14 posts

Re: Turbocall – Just-in-time compiler for Deno FFI

#2
This is one of the approaches for FFI taken by other runtimes, however it has the issue that without binding generators (jextract, P/Invoke code generators, ctypesgen), the type declarations are a pain to write.

Thus something like this would need a similar tool.

Re: Turbocall – Just-in-time compiler for Deno FFI

#4
Honestly I feel like they should work first on API compatibility with NodeJS just so that it can be easier to adopt/migrate seamlessly, then try more improvements in the runtime. It's nice that they have performance optimizations but what are they good for when I can't use Deno because it's not compatible/missing APIs?

Re: Turbocall – Just-in-time compiler for Deno FFI

#5
post #4

Honestly I feel like they should work first on API compatibility with NodeJS just so that it can be easier to adopt/migrate seamlessly, then try more improvements in the runtime. It's nice that they have performance optimizations but what are they good for when I can't use Deno because it's not compatible/missing APIs?

This feature and these APIs have been in Demo for a few years at this point.

Re: Turbocall – Just-in-time compiler for Deno FFI

#6
post #2

This is one of the approaches for FFI taken by other runtimes, however it has the issue that without binding generators (jextract, P/Invoke code generators, ctypesgen), the type declarations are a pain to write. Thus something like this would need a similar tool.

deno_bindgen exists which can be used to do this from Rust.

I have written a partial solution for C, though it is bespoke for my libclang bindings, and a very rough one for C++. Both of these require more work to really be ready-to-use tools however.

[1] libclang C binding generator: https://github.com/aapoalas/libclang_deno/blob/main/build/bu...

[2] C++ binding generator: https://github.com/aapoalas/txx

Re: Turbocall – Just-in-time compiler for Deno FFI

#7
post #6
post #2

This is one of the approaches for FFI taken by other runtimes, however it has the issue that without binding generators (jextract, P/Invoke code generators, ctypesgen), the type declarations are a pain to write. Thus something like this would need a similar tool.

deno_bindgen exists which can be used to do this from Rust. I have written a partial solution for C, though it is bespoke for my libclang bindings, and a very rough one for C++. Both of these require more work to really be ready-to-use tools however. [1] libclang C binding generator: https://github.com/aapoalas/libclang_deno/blob/main/build/bu... [2] C++ binding generator: https://github.com/aapoalas/txx

I see, thanks for the heads up.

Re: Turbocall – Just-in-time compiler for Deno FFI

#10
post #4

Honestly I feel like they should work first on API compatibility with NodeJS just so that it can be easier to adopt/migrate seamlessly, then try more improvements in the runtime. It's nice that they have performance optimizations but what are they good for when I can't use Deno because it's not compatible/missing APIs?

This is only one strategy to get adoption. The other is to have better apis/more features so that new projects gradually move to your runtime.

In this hypothetical, eventually being on node would become like still being on java 8 is today.

Post reply on HN