Takumi
Platforms

Node.js Integration

Integrate Takumi with Node.js and Bun for server-side image generation.

Takumi provides N-API bindings for Node.js and Bun, leveraging Node.js's libuv thread pool for optimal performance in server-side rendering.

Node.js/Bun Setup

Built with N-API bindings that leverage Node.js's libuv thread pool for optimal performance.

npm install @takumi-rs/core @takumi-rs/helpers

Example

import { render } from "@takumi-rs/core";
import { container, text } from "@takumi-rs/helpers";

const layout = container({
  width: 400,
  height: 200,
  background_color: 0xffffff,
  children: [
    text("Hello from Node.js!", {
      font_size: 24,
      color: 0x000000,
    }),
  ],
});

const imageBuffer = render(layout);