Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Tool:nexe

From ReverseEngineering.wiki
Tool
Developer nexe contributors
License MIT
Website https://github.com/nexe/nexe
On this wiki Facts · Code · Notes · Topics

Packager that appends a script bundle to a Node.js binary: the file ends with the string <nexe~~sentinel> followed by two little-endian doubles giving the launch-code and resource sizes.

Identification

A nexe executable is a Node.js binary (patched or stock) with extra data at the very end. Read the last 16000 bytes and search for the ASCII string <nexe~~sentinel>; the loader (boot-nexe) does the same and throws Invalid Nexe binary if it is missing.

Layout

From the end of the file: <nexe~~sentinel> (16 bytes), double LE content size, double LE resource size (both written as IEEE-754 doubles, not integers). Before the sentinel come the resources (the virtual file system built from the bundle) and, before them, the launch code (a JavaScript string that sets up process.__nexe and runs the bundle); the original node binary is at the start. So contentStart = sentinelPosition - resourceSize - contentSize and resourceStart = contentStart + contentSize (Fact:nexe/struct/Nexe footer). The bundled JavaScript is stored uncompressed in the resource part unless the --compress-style options of the build were used (Unverified).

Code & repositories

  • https://github.com/nexe/nexe @ 6220bf052223d5347ae656f0f680f33303b6a874 · license: MIT
    nexe (MIT): compiler.ts builds the deliverable and the footer, patches/boot-nexe.ts reads it.
    Tested on: source read, not run: Read the TypeScript source at this commit; not run. · checked 2026-10-18; last activity 2026-03-05

Evidence & references

  • nexe/nexe commit 6220bf052223d5347ae656f0f680f33303b6a874 (MIT): src/compiler.ts lines 290-330 (_assembleDeliverable), src/patches/boot-nexe.ts lines 1-40 (footer parse).