Daisy is a C++11 wrapper and binding for JerryScript inspired by HAL, which mainly targets mobile platform such as iOS/Android.
EXPERIMENTAL: DO NOT USE IN PRODUCTION YET.
Step 1. Install Xcode 6
Step 2. Install cmake version 3.0 (or higher) using either sudo port install cmake
or brew unlink cmake; brew install cmake
.
Step 3. Download our pre-compiled version of Google Test gtest-1.7.0-osx.zip (3 MB), unzip anywhere (the location doesn't matter) and set the environment variable GTEST_ROOT to where you unzipped it.
Just run the following commands from your bash prompt to setup your development environment for Google Test before proceeding:
$ curl -O http://timobile.appcelerator.com.s3.amazonaws.com/gtest-1.7.0-osx.zip
$ unzip gtest-1.7.0-osx.zip
Step 1. Make sure you have all prerequisites described above.
Daisy is using android-cmake. For more information about prerequisites and configurations, see android-cmake for detail.
By default, build_ios.sh
build & run unit tests for OS X. To change target platform and architecture make sure change PLATFORM and ARCHTECTURE in build_ios.sh
.
$ ./build_ios.sh
$ ./build_android.sh
Daisy implements HAL API. For more information, take a look at unit tests.
JSContextGroup js_context_group;
auto js_context = js_context_group.CreateContext();
auto js_value = js_context.JSEvaluateScript("'Hello, World!';");
XCTAssertTrue(js_value.IsString());
XCTAssertEqual("Hello, World!", static_cast<std::string>(js_value));
- JSExport property enumeration
- JSExport property getter/setter callback
- Logger