Skip to content

Experimental JavaScript interpreter for FreeBSD

Notifications You must be signed in to change notification settings

CTSRD-CHERI/jsrun

 
 

Repository files navigation

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.

About

Experimental JavaScript interpreter for FreeBSD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 96.0%
  • C++ 3.7%
  • Other 0.3%