pi-mono/packages/tui/native/win32
2026-08-05 09:05:20 +02:00
..
prebuilds fix(tui): detect Windows Shift+Enter 2026-08-05 09:05:20 +02:00
src fix(tui): detect Windows Shift+Enter 2026-08-05 09:05:20 +02:00
build.mjs fix(tui): detect Windows Shift+Enter 2026-08-05 09:05:20 +02:00
README.md fix(tui): detect Windows Shift+Enter 2026-08-05 09:05:20 +02:00

Windows native prebuilds

Build both Windows architectures from the repository root:

npm --prefix packages/tui run build:native:win32

On Windows, the build uses the Microsoft C++ Build Tools from Visual Studio. build.mjs locates VsDevCmd.bat, initializes a developer environment for amd64 and arm64, and builds the addon with cl.exe/link.exe.

Install the "Desktop development with C++" workload, or at minimum the MSVC toolset and Windows SDK components. No Node headers are required; the addon resolves N-API symbols from the host process.

For non-Windows cross-builds, or for custom Windows toolchains, set PI_TUI_WIN32_TOOLCHAIN=mingw and provide MinGW-compatible compilers:

PI_TUI_WIN32_TOOLCHAIN=mingw \
CC_X64=/path/to/x86_64-w64-mingw32-gcc \
CC_ARM64=/path/to/aarch64-w64-mingw32-gcc \
npm --prefix packages/tui run build:native:win32

The addon intentionally avoids the C runtime and links only against kernel32.