Repository navigation
add single-file packaging (fun pack) and bundled-app runtime - #23
Merged
Merged
Conversation
funlang
approved these changes
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
支持单文件打包:
funcmd pack把项目打成一个可执行文件,普通 funcmd/脚本运行不受影响。例子:
funcmd pack foo.fun -o foo # 单个脚本 → 一个 foo 可执行文件
funcmd pack main.fun -o dist/app -a public # 带静态站/图片等资源
范围:入口 + 递归 use 依赖 + use ':file' as id 内嵌文件自动带上;资源用 -a
声明(目录递归);未声明的不进包;旧产物自动跳过。argv
语义不变(1.arg()=入口、2.arg()=第一个真实参数)。
v0:STORE 不压缩、CRC=0(外部 unzip 会告警);只扫字面量 use。
验证:新增跨平台 e2e(打包→运行→校验);mac 89/89、Linux arm64 93/93,Windows 由 CI 覆盖。