{"repo":"openpeeps/denim","free":true,"listed":false,"github":"https://github.com/openpeeps/denim","clone":"git clone https://github.com/openpeeps/denim.git","description":"Node 💖 Nim = Denim! Build powerful NodeJS / BunJS addons with Nim language via Node API (NAPI)","language":"Nim","stars":55,"topics":["node","node-addon-api","nim-lang","nodejs-addon","nodejs-native-addon","toolkit","cli-tool","javascript","napi","native-addon"],"license":"MIT","category":"cli-tools","readme_excerpt":"Denim - Native NodeJS/BunJS addons powered by Nim 👑 Written in Nim language nimble install denim API reference 😍 Key Features - [x] CLI build via Nim + node-gyp or CMake.js (faster) - [ ] CLI publish to NPM - [x] Low-level API - [x] High-level API - [x] Open Source MIT License - [x] Written in 👑 Nim language Requirements - Nim (latest / via choosenim ) - Node (latest) and node-gyp or CMake.js CLI Denim is a hybrid package, you can use it as a CLI for compiling Nim code to .node addon via Nim + NodeGYP and as a library for importing NAPI bindings. Simply run denim -h Use Denim as a Nimble task: Want to pass custom flags to Nim Compiler? Create a .nims file: [!NOTE] Combining native code with JavaScript is a powerful way to optimize performance-critical parts. Note that converting data between Nim and N-API types adds overhead, so it's best to minimize the number of calls across the boundary and batch data when possible. Defining a module Use init to define module initialization. Nim Type to NapiValueType Use low-level API to convert Nim values to napi value ( NapiValueType ). Use assert to check if a low-level function returns a success or failure. Currently, the following status codes are supported Alternatively, use % to auto-convert Nim values to NapiValueType . Exports Since v0.1.5 , you can use {.export napi.} pragma to export functions and object properties. Calling a function/property from Node/Bun Built-in type checker Real-World Examples - Tim Engine &mdash; A temp","default_branch":null,"files":null,"tree":[],"storefront":"/r/openpeeps","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/openpeeps/denim/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}