JoshMarler / react-juce

Write cross-platform native apps with React.js and JUCE
https://docs.react-juce.dev
MIT License
764 stars 79 forks source link

Enable Custom Duktape Integrations #62

Open nick-thompson opened 4 years ago

nick-thompson commented 4 years ago

This issue sparked from discussion in PR #61: https://github.com/nick-thompson/blueprint/pull/61#discussion_r440796599

As Blueprint has grown, we've had to modify the duktape config inline to support the changes we need, which very much feels like (1) not the way duktape is meant to be integrated into a project and (2) it limits the end user's flexibility with duktape and Blueprint. For example, Duktape offers a compile configuration for low memory embedded environments, and there's no straightforward way to enable that in Blueprint as an end user.

This issue is meant to track this discussion and find a properly flexible way for integrating duktape

nick-thompson commented 3 years ago

Following up on #105 and after #111 we're going to go ahead with enabling custom Duktape integrations via just letting users specify a custom include path to their duktape source via CMake, while providing the default include to the copy of duktape source included in the repo.

I want to note this PR– https://github.com/nick-thompson/blueprint/pull/102/files as we're merging a commit that comments out a fast math compile catch. I want to avoid nudging the default duktape install that we ship with the project, so once we have a proper implementation for custom duktape integrations we should reset that change in that file.

Also want to note that we should Pimpl the duktape implementation behind EcmascriptEngine to provide more flexibility, as tracked in #33.