Coder Social home page Coder Social logo

libembindcefv8's Introduction

libembindcefv8

Bind C/C++ to Javascript using emscripten embind or chromium embedded framework v8

How to use

#include "embindcefv8.h"

embindcefv8::Class<UserClass>("UserClass")
    .constructor()                              // expose the default constructor
    .constructor<int>()                         // expose the constructor with a integer parameter
    .property("aInt", &UserClass::aInt)         // expose a class attribute
    .method("aMethod", &UserClass::aMethod)     // expose a class method

libembindcefv8's People

Contributors

gogoprog avatar

Stargazers

 avatar  avatar  avatar  avatar Juha Järvi avatar

Watchers

James Cloos avatar  avatar  avatar  avatar liuweiguang avatar  avatar

libembindcefv8's Issues

Interfacing with nbind

There's a similar project called nbind which bridges JavaScript and C++ with an embind-style syntax, currently supporting Emscripten (directly without using embind) and Node.js (interfacing with the V8 engine) on the C++ side. Maybe CEF could be added to it as another supported C++ interface? It might be an easy way to get the following features:

  • Converting between JavaScript arrays and C++ std::vector or std::array
  • Reflection, to read C++ method parameter and return value types etc. from JavaScript
  • 64-bit integers passed to/from JavaScript
  • Passing JavaScript callbacks to C++ functions
  • More features could be added simultaneously for all supported JavaScript environments.

Do you know if the CEF api is similar to Node.js v8 API? The API has been quite unstable and is abstracted away by nan. Is the CEF API more stable?

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.