Repository navigation
pbit: portability matrix, installers and npm wrapper (no publish) - #5
Closed
BitmapAsset wants to merge 3 commits into
Closed
BitmapAsset wants to merge 3 commits into
BitmapAsset wants to merge 3 commits into
Conversation
- .github/workflows/bench.yml: build, test and measure pbit on the ubuntu, macOS arm64, Windows and macOS Intel runners, plus static musl and cross builds, a wasm32-wasip1 check and minimum-Rust probes. Runs on pushes to this branch and by hand only. - scripts/bench/: matrix_bench.py (one JSON per platform, N = 5) and local-server tests for the installers and the npm wrapper. - install.sh and install.ps1: fetch a release archive, verify its SHA-256, install without sudo or administrator rights. - npm/: the `pbit` package (postinstall fetch with checksum, exit codes passed through, fetch on first run when install scripts are off). Not published. - docs/agents.md and examples/node/decide.mjs: calling pbit from a shell, Python, Node, PowerShell and agent harnesses. - release.yml: archives also carry examples/, python/ and docs/. - Crate manifests: readme, keywords, categories.
…un 1 results - docs/agents.md, install.ps1, scripts/bench/*.ps1: Windows PowerShell 5.1 on the windows-latest image pipes text into native commands with a UTF-8 byte-order mark, which pbit 0.2.0 rejects (exit 2). Document and test $OutputEncoding = [System.Text.UTF8Encoding]::new($false). - scripts/bench/serve.py: the installer tests' local server, without the reverse-DNS lookup that stalled http.server ~35 s per start on macOS. - bench.yml: the macOS Intel row runs only when asked (a tag in the pushed commit message, or the intel input of a manual run); cargo test runs with --no-fail-fast so every test binary reports. - scripts/bench/results/2026-10-01: bench run 36969399069 (four runner rows, static and cross builds, tests) and the local M4 row. - scripts/bench/render_matrix.py: renders the matrix tables from those files.
… via cmd - BENCHMARK-MATRIX.md: per-platform tables rendered from the JSON results by scripts/bench/render_matrix.py, with what they support and what they do not. - PORTABILITY.md: targets built and tested, what each binary links, toolchain lines, minimum Rust version, the wasm32-wasip1 probe, the installers, and findings that need a source, test or release change. - Windows PowerShell 5.1 adds a byte-order mark to text it pipes into a program even with $OutputEncoding at us-ascii, so the $OutputEncoding workaround did not help there: docs/agents.md, install.ps1 and the PowerShell test scripts now route its pipes through cmd. - scripts/bench/results/2026-10-01: bench run 36970631022.
Owner
Author
|
Landed on main as one squashed commit, b17150b (review: manifests only, 0 Rust source, tree scan clean, cargo check ok). Closing. |
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.
Draft. Nothing is tagged, released or published, and no Rust source changed (manifests gained metadata lines only).
What this adds
.github/workflows/bench.yml: builds, tests and measures pbit onubuntu-latest,macos-latestandwindows-latest(plusmacos-15-intelon request), with static musl and cross builds, awasm32-wasip1check and minimum-Rust probes. It runs on pushes to this branch or by hand, never onpull_requestormain, standard runners only.scripts/bench/: the matrix harness (one JSON per platform, N = 5), the table renderer, local-server tests for the installers and the npm wrapper, and the results of 2026-10-01.BENCHMARK-MATRIX.md(numbers per platform) andPORTABILITY.md(targets, linking, toolchain lines, MSRV, WASM, installers, findings).install.sh(POSIX sh) andinstall.ps1(Windows PowerShell 5.1 and PowerShell 7): fetch the release archive, verify its.sha256, install without sudo or administrator rights.npm/: thepbitnpm package. Postinstall fetches the binary and verifies its SHA-256; exit codes pass through; the binary is fetched on first run if install scripts are off. Not published.docs/agents.mdandexamples/node/decide.mjs: calling pbit from a shell, Python, Node, PowerShell and agent harnesses.release.yml(packaging step only): archives also carryexamples/,python/anddocs/.readme,keywords,categories.Evidence
install.ps1and the PowerShell recipes under Windows PowerShell 5.1 throughcmd; as is, 5.1 still exits 2. Its Windowscargo testfailed one wall-clock bound (acc1_tv_le_001_within_10ms: p50 10.37 ms against a 10 ms limit); the other 126 tests passed.ci.ymlon this PR (run 36971967219): green on ubuntu, macOS and Windows.cargo test --release --workspace --no-fail-fast(run 2): 127 passed, 1 ignored on Linux, macOS arm64 and Windows.install.sh: 15 runs on Linux, macOS arm64 and macOS Intel (sh,bash,dash) plus the local M4.install.ps1: PowerShell 7.6. npm wrapper: Linux, Windows and the local M4.x86_64-unknown-linux-muslis static-pie;aarch64-unknown-linux-muslis static and passed a smoke test under qemu. MSRV is 1.73 for the source and 1.78 with the committed lockfile.wasm32-wasip1:cargo checkpasses.Findings for the source, test and release lanes (not changed here)
[Console]::InputEncodingis UTF-8 with a BOM. Sopbit demo | pbit decidefails there. Stripping a leadingU+FEFFinread_stdin()would fix it. Run 3 found a second workaround besidescmd /c: setting[Console]::InputEncoding = [System.Text.UTF8Encoding]::new($false)in 5.1 makes the pipe exit 0. It is worth documenting next round; it is not indocs/agents.mdyet.VCRUNTIME140.dll;+crt-staticwould remove the dependency.acc1_tv_le_001_within_10msfailed on Windows in 2 of 3 bench runs (p50 13.14 ms and 10.37 ms against 10 ms), andrun_deadline_ms_bounds_the_whole_callfailed on the Intel runner (990 ms against a 900 ms bound).--deadline-ms 600took 990 ms on the Intel runner.bench/decide_threads.pyfails on Windows;bench/portable_vs_native.pyneeds extensionless binaries there.pbit-ir,pbit-decideandpbit-clineedversion = "0.2.0"on their path dependencies before a dry run can pass. Publish order: core, ir, decide, cli. All five names (pbit,pbit-*) are free on crates.io, andpbitis free on npm.Not done
No
npm publish, nocargo publish, no tags or releases. The WSL2 (RTX 4070) and VirtualBox rows are pending because those machines are offline.