Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.
/ node-clangffi Public archive

Generate Typescript FFI bindings for C/C++ libraries using libclang and ffi-napi.

License

Notifications You must be signed in to change notification settings

RainwayApp/node-clangffi

Repository files navigation

node-clangffi

CI CD

Tools to generate Typescript FFI bindings for C/C++ libraries using libclang and ffi-napi.

Features

See the following packages for more information:

  • clangffi - cli tool for generating bindings

npm

npm

Contributing

Contributions are welcome, but guidelines for how to get involved are not in place yet. As a result, please start by opening an issue. Thanks for your interest!

Coding Guidelines

  • This project contains a .prettierrc configuration file to help your editor contribute consistent code. For vscode, use this extension.
  • We use conventional commits to help with automatic semantic versioning. Please ensure your commit messages follow this format.

Helpful commands

  • npm run bootstrap to bootstrap the project.
  • npx lerna add <dep> packages/<project> [--dev] to add a dep (--dev makes it a dev dep).
  • npm run build builds all packages.
  • npm run clangffi runs clangffi (remember to build first).
  • npm run generate-dogfood re-generates our libclang bindings using libclang-bindings (ourself).

To get started:

# clone and enter the project directory
git clone --config core.autocrlf=false --recursive https://github.com/rainwayapp/node-clangffi.git
cd node-clangffi

# install deps
npm i

# bootstrap and build
npm run bootstrap && npm run build

# bootstrap once last time to ensure typings are present
npm run bootstrap