7 ms·
> As long as you don’t use anything from the Node or web browser ecosystems So what are you using then?
by codethief 4y ago
> As long as you don’t use anything from the Node or web browser ecosystems
So what are you using then?
- campbel 4y agoYou can write custom JS bindings for C++ with V8. So you could expose some functionality that way and then implement routines in JS.
- pavlov 4y agoEither custom embedding in a native app (JavaScriptCore or V8 directly, or a runtime wrapper abstraction like FB's JSI), or plain Node with extreme prejudice against anything from the npm pits of hell.
- mftb 4y agoJS, particularly in the era discussed here, only came with a small number of standard objects. The Host was expected to provide a series of Host Objects. In a browser these might be things like Window, Document and XMLHttpRequest. Scanning the linked article on the JWST it seems these might be things like Command and Telemetry, that would be written in C++, and then scripted in JS.
- BeefWellington 4y agoHaving worked on an embedded script engine that was JS-based at the time, this is exactly what we were doing. Basically the script host (C++ code) offered up specific sets of available objects to the engine that you could interact with and essentially trigger the C++ functionality from, passing in data, and such. It wasn't a fantastic experience at the time but luckily for us the stakes were pretty low as we were working on interactive mall map kiosk devices.
- mftb 4y agoYea, me too. Sounds like we've chewed some of the same, "programming dirt".