Skip to content

infosia/Daisy

Repository files navigation

The Daisy Library

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.

Prerequisites

OS X

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

iOS

Step 1. Make sure you have all prerequisites described above.

Android

Daisy is using android-cmake. For more information about prerequisites and configurations, see android-cmake for detail.

How to build for OS X/iOS

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

How to build for Android

$ ./build_android.sh

How to use

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));

TODO

  • JSExport property enumeration
  • JSExport property getter/setter callback
  • Logger

About

C++11 wrapper around JerryScript inspired by HAL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published