Closed nick-thompson closed 3 years ago
@JoshMarler I just snuck a little commit onto master: c4274df910bd8195175b305b61dd3b699ee14643. This nudges the way that our react-juce
package relies on the global __BlueprintNative__
object, and shims a little Proxy in there when we know that process.env.NODE_ENV !== 'production'
. This means that if you do the following:
cd packages/react-juce
npm run watch
cd ../../examples/GainPlugin/jsui
npm install ../../packages/react-juce
npm start
You'll be running GainPlugin's jsui built against react-juce development, where process.env.NODE_ENV === 'development'
, so the proxy will be shimmed in there. This trick makes the bundle quite portable, so you could drop it in Chrome and run it there or drop it into v8 without injecting all the required native methods.
With that, all that's really left here to get the initial bundle really running is shimming the timers (can just shove some bs code in there for now to get it to run)
@JoshMarler with all of the work going into Hermes and Quickjs lately, I'm going to close this PR out. We can revisit v8 at a later time
Yeah sounds fair enough. Hopefully will have a clean approach to follow now if we come back to it.
A'ight @JoshMarler this one's for you!
This work is not a branch I intend to merge, at least not in its current state. This is more of a proof-of-concept branch for kicking off the v8 integration behind the EcmascriptEngine interface (#178).
The work here addresses only this:
~/Dev/v8/v8
, and have built a macos x64 v8_monolith myself for linking.REACTJUCE_USE_V8
compiler definition for toggling whether to load the Duktape implementation or the V8 implementation, and enabling that def in GainPluginevaluate
pass to run successfully.This is almost there. There is a little more work to satisfy some global shims. The first, which I'll add here shortly, is to shim out more of the BlueprintBackend interface, for which I have a clean approach in mind. The second, is adding polyfills for timers to satisfy the updated React-Reconciler dependency.
Then, of course, there's work to actually persist the v8 isolate and context on the
EcmascriptEngine::Pimpl
instance (right now I just make the and throw them away inside of evaluate), and start fleshing out the remainder of the interface. My hunch right now is that this will generally be an easier integration than Duktape, which is quite nice!