Help us shape the future of Go! Take the 2026 Go Developer Survey

packager

command
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

jsbuild 将 JavaScript 文件打包成独立的可执行程序。

原理: 把入口 JS 及其相对 import 的模块嵌入一个生成的 Go 工程, 然后调用 `go build` 编译成单个 .exe。生成的程序自带 Gox, 运行时会话临时目录中解压脚本, 再通过现有的 vm.EvalFile 执行, 因此 import/export 模块也能正常工作。完全复用现有代码, 不改动任何 Gox 的源文件。

用法:

jsbuild <input.js> [-o output.exe] [--name 应用名] [--windowed] [--verbose]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL