crjsc

crjsc bridges Crystal and the JavaScriptCore library. JavaScriptCore is the javascript engine that powers WebKit, the underlying framework for the Safari web browser and many other applications.

You can call javascript functions and read values from Crystal, and you can write Crystal classes and have them executed in Javascript. The goal of this library is to allow the most seemless back-and-forth between Javascript and Crystal that is possible. Pull requests, issues, comments and suggestions are gladly welcome.

This library is not suitable in production, and should be considered alpha level software.

Todo

Installation

Add this to your application's shard.yml:

dependencies:
  crjsc:
    github: bmmcginty/crjsc

Usage

All of the following should be performed from the root of this repository.

See examples/file_interface.cr for an example that exposes file access to Javascript.

Development

The JavaScriptCore library will be downloaded to src/ext/webkit. It will also be symlinked to jscore for quicker access. Use jscore/API to look at the C interface to JavaScriptCore. Make changes in src/crjsc/lib.cr or the appropriate file.

Low-level Notes

Contributing

  1. Fork it ( https://github.com/bmmcginty/crjsc/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors