gen-napi

command module
v0.0.0-...-564e5ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 1 Imported by: 0

README

Gen-NAPI (WIP) latest: external main

Not even remotely prod ready!

Gen-NAPI is under development, and is not yet ready for production use. It is currently only tested against test/TensorBase.h and used to test NAPI performance for the shumai NAPI bindings.

Longer term, Gen-NAPI will aim to provide an easy, opinionated, means of generating high performance NAPI bindings for existing C++ libraries.

How it works

Using go-tree-sitter, we're able to parse a C++ Header file, query the tree-sitter syntax tree for relevant logic (e.g. Function, Class, Enum, etc... declarations), and extract the argument (overloads a WIP)/return types into data structures that provide the rough information from which we're able to generate Node-API bindings via node-addon-api. The library will provide a means to manually override logic when needed; although, obviously, the goal is that the logic will be opinionated to the point of automatically handling so that overrides are used for performance vs necessary to compile w CMake.

TODO: Documentation

Docs are pending testing against other header libraries, removing the one(?) hardcoded ref to a shumai global function (row/col major inversion), and general clean up of the logic/config setup.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL