This is DENIM! a little CLI monster and library that provides Nim bindings for writing safe and fast native NodeJS/Bun modules.
import denim
init proc(module: Module):
proc hello(name: string): string {.export_napi} =
return %*("Hello, " & args[0].getStr)
In JavaScript:
const {hello} = require('./my.node');
console.log(hello("World!")) // Hello, World!
That's it!
Check GitHub:
https://github.com/openpeeps/denim
Top comments (0)