Skip to content

README (0.6.2)

Eric Lange edited this page Jun 15, 2019 · 1 revision

The LiquidCore Project

LiquidCore enables Node.js virtual machines to run inside Android and iOS apps. It provides a complete runtime environment, including a virtual file system.

LiquidCore also provides a convenient way for Android developers to execute raw JavaScript inside of their apps, as iOS developers can already do natively with JavaScriptCore.

For a description of how to use LiquidCore, please see the appropriate README under LiquidCoreAndroid or LiquidCoreiOS.

Version

0.6.2

Release License: MIT

API Documentation

Android Javadocs: Version 0.6.2

iOS Objective-C/Swift: Version 0.6.2

Architecture

Android

Android architecture diagram

LiquidCore for Android includes the Node.js runtime and V8 backend. In addition, it provides three APIs for apps to interact with:

  • Java / JavaScript JNI API, which provides a convenient way to run raw JavaScript code from within Java, without the need for a clunky WebView.
  • Node Process API, which allows developers to launch fast isolated instances of the Node.js runtime.
  • MicroService API, which is an abstraction of a Node.js process and supports dynamic code fetching and native add-ons.

Native add-ons enable extending the basic runtime environment with additional native functionality. Add-ons have access to all the above APIs, plus the ability to use WebKit's JavaScriptCore API running on top of V8. This allows projects that depend on JavaScriptCore, like React Native, to use LiquidCore directly.

iOS

iOS architecture diagram

LiquidCore for iOS includes the Node.js runtime, but without the V8 backend. Instead, it marshalls calls to V8 through an interpreter to Apple's JavaScriptCore engine. It provides two APIs for apps to interact with:

  • Node LCProcess API, which allows developers to launch fast isolated instances of the Node.js runtime.
  • LCMicroService API, which is an abstraction of a Node.js process and supports dynamic code fetching and native add-ons.

Native add-ons enable extending the basic runtime environment with additional native functionality. Add-ons have access to the above APIs, plus the ability to use the V8 API. This allows projects that depend on V8, such native Node modules to use LiquidCore directly.

License

Copyright (c) 2014 - 2019 LiquidPlayer

Distributed under the MIT License. See LICENSE.md for terms and conditions.