For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/lynxtron/api/@lynx-js/lynxtron-rebuild/index.md.
  • English
  • @lynx-js/lynxtron-rebuild

    @lynx-js/lynxtron-rebuild rebuilds npm Node.js native modules for the Lynxtron runtime ABI. It corresponds to @electron/rebuild in the Electron ecosystem, but targets the Lynxtron runtime.

    Install

    npm install -D @lynx-js/lynxtron-rebuild

    Usage

    npx @lynx-js/lynxtron-rebuild

    Run it after installing or updating native modules. The tool may reuse compatible prebuilt artifacts, so a successful exit does not necessarily mean it compiled a new binary. Inspect its log and the loaded .node path, and exercise the module in the target Lynxtron runtime and packaged app.

    When To Use It

    ScenarioRequired
    Pure JavaScript npm packagesNo rebuild required
    Modules that depend on the Node.js/V8 ABIUse @lynx-js/lynxtron-rebuild when the binary does not match Lynxtron
    Node-API modules with a compatible prebuildMay reuse it; verify OS, architecture, Node-API version, native dependencies, and actual loading in Lynxtron
    Native modules migrated from an Electron projectReplace Electron ABI-specific binaries with Lynxtron builds; compatible Node-API prebuilds may be reused
    Lynx native librariesUsually built through npm run build:lynxtron instead of lynxtron-rebuild

    For more details, see Node.js Native Modules.

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.