boa icon indicating copy to clipboard operation
boa copied to clipboard

Any plan for the FFI?

Open attila-lin opened this issue 5 years ago • 6 comments

Nice work! But as an embeddable engine, I think it would also be nice to provide some API functions for the other languages to use.

attila-lin avatar Apr 18 '20 06:04 attila-lin

This would be an interesting addition. I would do it in a different crate in the workspace, with only the FFI, using boa as a dependency.

Razican avatar Apr 18 '20 09:04 Razican

We could use cbindgen crate to automatically generate C/C++ FFIs.

HalidOdat avatar Apr 18 '20 12:04 HalidOdat

And it would be better to provide more accessibility to the engine, like https://duktape.org/api.html

attila-lin avatar Apr 20 '20 06:04 attila-lin

New Guy here. I'm sniffing around this. I think the problem here is going to be more one of defining scope and granularity. Like I think just implementing an eval is one thing, but those fine folks at duktape have a dukload of things they expose. Making it similarly comprehensive for Boa is probably... hard. But I can take a whack at eval in its own FFI crate.

bcr avatar Sep 26 '22 05:09 bcr

We discussed this in our triage and we agreed that we wanted to experiment with the diplomat tool first before commiting to an FFI interface, since it makes the maintenance work more manageable.

jedel1043 avatar Nov 29 '23 18:11 jedel1043