boa-dev / boa

Boa is an embeddable and experimental Javascript engine written in Rust. Currently, it has support for some of the language.
MIT License
5.02k stars 398 forks source link

Any plan for the FFI? #332

Open attila-lin opened 4 years ago

attila-lin commented 4 years ago

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.

Razican commented 4 years ago

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.

HalidOdat commented 4 years ago

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

attila-lin commented 4 years ago

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

bcr commented 1 year ago

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.

jedel1043 commented 10 months ago

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.