{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/1261","labels_url":"https://api.github.com/repos/facebook/react-native/issues/1261/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/1261/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/1261/events","html_url":"https://github.com/facebook/react-native/issues/1261","id":75954579,"number":1261,"title":"Move JavaScript executors to their own subproject + expose executor class","user":{"login":"robertjpayne","id":214288,"avatar_url":"https://avatars.githubusercontent.com/u/214288?v=3","gravatar_id":"","url":"https://api.github.com/users/robertjpayne","html_url":"https://github.com/robertjpayne","followers_url":"https://api.github.com/users/robertjpayne/followers","following_url":"https://api.github.com/users/robertjpayne/following{/other_user}","gists_url":"https://api.github.com/users/robertjpayne/gists{/gist_id}","starred_url":"https://api.github.com/users/robertjpayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertjpayne/subscriptions","organizations_url":"https://api.github.com/users/robertjpayne/orgs","repos_url":"https://api.github.com/users/robertjpayne/repos","events_url":"https://api.github.com/users/robertjpayne/events{/privacy}","received_events_url":"https://api.github.com/users/robertjpayne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-13T11:36:10Z","updated_at":"2015-05-13T11:38:18Z","closed_at":null,"body":"Next week I'm going to attempt to bring SpiderMonkey's JavaScript engine over to react-native. There's a few things that will need to happen with the current codebase to easily support new JavaScript engines:\r\n\r\n* RCTBridge currently has a expose instance setter for the JavaScript executor class, but unfortunately you cannot set this before the bridge is initialised and it loads up. This should be a class method that can set the default or an initialisation option.\r\n\r\n* React Native is including JavaScriptCore in the RCTContextExecutor and RCTJavaScriptExecutor files. This imports symbol definitions that then break SpiderMonkey due to conflicts. Would be nice to have these dependencies removed and RCTContextExecutor moved to it's own module that can be enabled/disabled easily.\r\n\r\n### Why SpiderMonkey?\r\n\r\n* Single C/C++ JavaScript API to expose low level native modules such as XMLHttpRequest / websocket / socket.io / WebSQL / IndexedDB etc…\r\n\r\n* Allow exposing native objects to the JS environment to better manage things like file handling etc…\r\n\r\n* Fine grained control over resource usage. SpiderMonkey allows the implementor to setup resource limits of both heap and stack memory and the GC will aggressively ensure those are met.\r\n\r\n* Faster execution of the bridge due to less copying of data ( we don't have to copy JSON data just to deserialise it etc… )\r\n\r\n* Single JS engine to run both in production and dev and debugging thanks to FireFox's remote debugger, right now it's unreliable to test certain things via the debugger because Chrome provides a lot of DOM api's that are otherwise unavailable.\r\n\r\n\r\nAnyways, if this sounds like something everyone is happen with I'll work on a PR."},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/101635941","html_url":"https://github.com/facebook/react-native/issues/1261#issuecomment-101635941","issue_url":"https://api.github.com/repos/facebook/react-native/issues/1261","id":101635941,"user":{"login":"robertjpayne","id":214288,"avatar_url":"https://avatars.githubusercontent.com/u/214288?v=3","gravatar_id":"","url":"https://api.github.com/users/robertjpayne","html_url":"https://github.com/robertjpayne","followers_url":"https://api.github.com/users/robertjpayne/followers","following_url":"https://api.github.com/users/robertjpayne/following{/other_user}","gists_url":"https://api.github.com/users/robertjpayne/gists{/gist_id}","starred_url":"https://api.github.com/users/robertjpayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertjpayne/subscriptions","organizations_url":"https://api.github.com/users/robertjpayne/orgs","repos_url":"https://api.github.com/users/robertjpayne/repos","events_url":"https://api.github.com/users/robertjpayne/events{/privacy}","received_events_url":"https://api.github.com/users/robertjpayne/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T11:38:18Z","updated_at":"2015-05-13T11:38:18Z","body":"I should note that SpiderMonkey integration itself will be a separate project apart from react-native. I just need a few tweaks to the core to allow an integration to even happen."}}