Giter Club home page Giter Club logo

jsrun's Introduction

Duktape FFI Experimentation

This repository contains a simple program that wraps the DukTape embedded JavaScript interpreter and implements the required platform-specific functionality for module loading. It also includes a program that generates C code for FFI.

Given a C file, the ffigen program writes (to standard output) a C file that can be compiled into a library and will

To compile the example test, run these commands:

$ make
$ cd examples
$ ../ffigen test.c > generated.c 
$ indent generated.c
$ clang -g wrapper.c -fPIC -shared -o test.so

You can then run the tst.js example with jsrun and it will load the shared library and be able to find the relevant functions.

jsrun's People

Contributors

davidchisnall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jsrun's Issues

Multiple files for input

The usage string suggests we can put multiple files but it's acting like only the first is attempted. What we're looking for is basically concatenating all the input files and then executing.

This is in an attempt to run Octane. We can now run one test by concatenating three javascript files and then running the result manually.

Might be helpful to clarify the usage string or implement some meaningful interpretation of executing multiple files.

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.