Coder Social home page Coder Social logo

qasim / chakracore-cocoa Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 23 KB

Run JavaScript in macOS apps through Microsoft's ChakraCore engine.

License: MIT License

Swift 33.81% Objective-C 10.47% Objective-C++ 54.40% JavaScript 1.31%
chakracore javascript cocoa interop

chakracore-cocoa's Introduction

ChakraCore-Cocoa

This is a very rudimentary sample of building macOS applications that can run JavaScript through Microsoft's ChakraCore engine.

Requirements

ChakraCore itself has the following requirements:

$ brew install cmake icu4c

Setup

Clone the repository and all of its submodules:

$ git clone --recursive https://github.com/qasim/ChakraCore-Cocoa.git && cd ChakraCore-Cocoa

Then, we can generate ChakraCore's Xcode project files:

$ ./ChakraCore/build.sh --xcode --icu=/usr/local/opt/icu4c/include

Usage

Open the Xcode workspace:

$ open ChakraCore-Cocoa.xcworkspace

That's it! Build and run the ChakraCore-Cocoa target to see the sample file being executed by ChakraCore, and then printed to console, all inside a macOS app.

What's next?

This can be used to build native macOS applications that may depend on a shared JS library. One could build a Cocoa wrapper on top of ChakraCore to create an alternative to Apple's JavaScriptCore.

What about iOS?

At the time of writing, ChakraCore cannot be built for iOS targets yet (Microsoft/ChakraCore#1237).

chakracore-cocoa's People

Contributors

qasim avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.