Building Q+ from source
Requirements: Linux x86-64, gcc, GNU make not required (shell script only).
tools/build.sh
Expected hashes (Q+ Language v1.30.0-dev 候选, clean build):
build/bqvmsha256ca0539df3190874eadae942cc1a1166bc0213475abbf146469e42eff17ee79a0(unified VM epoll natives 225/226/227)build/bqvm_smallsha256e24b284b36b173003af532d36780d47628c3fab692835ef349fa4fd8405af4f6(unified VM epoll natives 225/226/227)build/qboot.qbcsha256abd9fb8341a23efcb86d0b073331cd2e1247d920a33ee7b0108ff28f908d0d63build/cgtest.qbcsha256d0295342b67c15e65ba539511c4241146e0905c1ee75e2387a619bad08eae2f1(AOT float residual closure R49)build/cgtest_aotsha2561e619ad37109b383ecc3fb1343898a06196db4f1ea5af41849fcfc2c664a268c(deterministic; equalsbootstrap/cgtest_aotfixed point)bootstrap/stage0.qsha2567a954aa542678d2d44e5e239e600c712c20fe974510c57809d45595036713aab(capacity-only stage0 compiler source; 12-chunk source window)
bootstrap/qboot.qbc equals build/qboot.qbc sha; bootstrap/cgtest_aot equals the AOT fixed point; SHA256SUMS updated accordingly.
The build also produces build/cgtest.qbc (AOT compiler), build/cgtest_aot (AOT ELF tool), build/stage0.qbc (capacity-only bootstrap compiler) and build/bqvm_small (small-heap VM for the heap-exhaustion regression).
The v1.1 compiler source no longer fits the v1.0 bootstrap compiler's source window, so the build uses a two-step bootstrap: bootstrap/qboot.qbc compiles the capacity-only bootstrap/stage0.q, then stage0.qbc compiles src/compiler/qboot/qboot_v52_final3_fix2.q. The result is verified to be a fixed point (the new compiler recompiles itself byte-identically). The AOT ELF tool is rebuilt from src/compiler/qplusc/ and must be byte-identical to the shipped bootstrap/cgtest_aot fixed point.
Release tree components(1.30.0-dev / spec v4.61)
| 组件 | 版本 | 门禁 |
|---|---|---|
| 语言 / VM / AOT | 1.30.0-dev,spec v4.61(qboot abd9fb83、bqvm ca0539df、AOT 1e619ad3) | tools/build.sh + tools/test.sh + tools/robustness_test.sh |
| VS Code / LSP 扩展 | 0.6.0(发布支持组件);0.7–0.12 optional/dev;IDE 0.19 overlay 外部(不随 tar;描述滞后,语言树以集成版为准) | QPLUS_ROOT=$PWD editors/vscode/scripts/validate.sh --integration(190) |
| qpm 包管理器 | 0.5-alpha(prod POC:批量/并行/per-file/多包/签名可信链/update-vendor/撤销/透明日志+compact proof/gossip/verify-sth/witness/checkpoint 链/包级 SBOM+依赖图/SPDX 签名 POC) | bash tools/qpm/ci/selftest.sh(657/657)+ production 55/55 + update 47/47 + revoke 37/37 + sign 29/29 + trust 38/38 + translog 46/46 + translog2 69/69 + translog3 45/45 + translog4 50/50 + sbom 41/41 + sbom2 41/41 |
| 文档站 + Playground | v4.61 | python3 site/build_site.py && python3 site/ci/selftest.py |
| 平台(Windows / ARM64) | build+smoke+子集;Windows async 仅 Fiber sockets 子集;Windows AOT / ARM64 AOT 显式 SKIP | bash ci/portability_check.sh(PASS=11/FAIL=0/SKIP=3) |
| OS SDK | 1.18.0(loopback TCP/UDP/async POC;OS-10 argv PASS;MVP/原型/NOT PUBLISHED;conformance 14/2/4、tests 29/29、fuzz 7 组 339、api_stability 128/0、examples 5/5、qpm e2e 18/18;OS-07/08 PARTIAL;exec 未实现如实) | 见 docs/OS_SDK_1.5_MVP.md(外部,非发布) |
Module loading note
Relative use std.<module> paths are resolved against the current working directory. Set QPLUS_ROOT=<tree-root> to additionally resolve them from a different working directory (the build/test scripts run from the tree root, so this is optional).
Tests
tools/build.sh
tools/test.sh
tools/test.sh runs: examples, typecheck fixtures, features/semantics, type bounds, integer matrix, runtime errors (incl. heap exhaustion), and VM/AOT parity plus AOT loud-fail checks. Release packaging: tools/package.sh.
Compile / run a Q+ program
build/bqvm --timeout-ms 0 build/qboot.qbc src/examples/arith_sum.q -o <tmp>/a.qbc
build/bqvm <tmp>/a.qbc
Benchmark(P2-B2)
build/bqvm --timeout-ms 0 build/qboot.qbc bench/fib.q -o <tmp>/fib.qbc
bench/run.sh 3
bench/run.sh measures build/bqvm vs AOT ELF (and C reference where available) and writes raw data to bench/results/raw-*.tsv. See bench/README.md; numbers are machine-specific.
编辑器对齐(B2):editors/vscode 源码树为 0.5.0 dev 基线;v1.0 发布 pack 的 editors 0.6.0 由发布工程 overlay 构建。LSP 支持组件 = 0.6.0;0.9.0/0.10.0/0.11.0/0.12.0 为 OPTIONAL/DEV(不进 tar、未发布 Marketplace)。
OS SDK:1.18.0(loopback TCP/UDP/async POC,MVP/原型,NOT PUBLISHED;OS-10 argv PASS;conformance 14/2/4、tests 29/29、fuzz 339、128/0、examples 5/5、qpm e2e 18/18;OS-07/08 PARTIAL;exec 未实现)。
qpm:tools/qpm/ 生产化 POC(本地静态 registry;657/657+55/55+47/47+37/37+29/29+38/38+translog 46/46+translog2 69/69+translog3 45/45+translog4 50/50+sbom 41/41+sbom2 41/41;NOT PUBLISHED/无中心服务)。
**AOT 网络:POC 支持 std.net TCP 公共包装 + UDP 基础子集(native 200–208/210–214+251;opt-in;仅 Linux x86-64 阻塞 IPv4 loopback;nonblock/poll/epoll/async -8);详见 docs/AOT_NET_POC.md。