Merged
Conversation
…replace WAT tests
…sts to test-harness
…g tests to test-harness
…n test ergonomics
…port, drop unused deps
Add compact() Lua global that filters nil arguments and joins
remaining segments with spaces, enabling one-liner configs:
compact(green("node:", nodejs.version), ctx.pwd, "❯")
Style functions (green, bold, etc.) now propagate nil - if any
argument is nil, the function returns nil instead of erroring.
This lets compact() skip entire styled segments when their data
is unavailable.
Replace anstyle with owo-colors for ANSI rendering. Test
assertions now use paint() + style() instead of inspecting
the StyledContent tree structure directly.
Ignore STARSHIP_CONFIG when it points to a .toml file (starship v1 leftover). Auto-detect plugin dir by falling back to target/wasm32-unknown-unknown/release when the default plugins dir has no .wasm files. Config chunks now run in a custom Lua environment that returns nil-proxy tables for undefined globals (e.g. uninstalled plugins), preventing 'attempt to index nil' crashes. Warns once per unknown global name per daemon lifetime. Filter STARSHIP_PROFILE tracing to starship crates by defaulting RUST_LOG, suppressing cranelift/wasmtime debug noise.
Add -vv to both the top-level codspeed build and the nested cargo builds in the runtime build script. Also detach the nested cargo from the parent jobserver to rule out deadlock.
eprintln timing around each phase of the build script so we can see whether the wasm plugin builds are slow or deadlocked. Nested cargo gets -vv for full compilation output.
eprintln is suppressed without -vv which cargo-codspeed doesn't support. cargo::warning always prints.
The build.rs spawns nested cargo builds for wasm plugins which deadlocks on the parent cargo's target directory lock (cargo#6412). Use --target-dir to isolate the child builds and strip inherited RUSTFLAGS/jobserver env vars to prevent contention.
Run walltime on codspeed-macro and memory on a regular ARM runner in parallel via matrix. Each mode builds separately since the measurement instrumentation is baked into the binary at compile time.
…end config Benchmarks wasmtime module compilation (plugin_load), single wasm round-trip (plugin_call_method), and full config eval with plugin proxy resolution (config_with_plugins).
Each mode has its own build->run chain so they don't block each other.
Plugin benchmarks need the .wasm files at runtime. Upload them alongside codspeed artifacts and download to repo root to preserve the target/ directory structure.
WASM_PLUGIN_DIR is a compile-time path that doesn't exist on the run runner. Fall back to cwd-relative target/ path when the compiled-in path is missing.
build.rs outputs plugins to target/wasm-plugins/ but the upload step and runtime fallback both referenced target/wasm32-unknown-unknown/. Fixed all three locations: upload, wasm_path() fallback, and bench wasm_bytes() helper.
Merging this PR will improve performance by ×5.7
Performance Changes
Comparing |
The codspeed-macro runner ships Cargo 1.81 which doesn't support edition 2024. Install current stable toolchain so cargo metadata can parse the workspace.
codspeed-macro runner has older GLIBC than ubuntu-24.04. Building on 22.04 produces a binary compatible with both runners.
Consistent runner across build and run jobs avoids GLIBC mismatch with codspeed-macro and cache incompatibility between 22.04/24.04.
Use runtime env var with absolute workspace path instead of current_dir() fallback, which is unreliable when CodSpeed executes the binary.
Replace runtime file loading in tests/benchmarks with compile-time embedded wasm bytes. Eliminates WASM_PLUGIN_DIR runtime env var, wasm_path() fallback chain, and wasm-plugins artifact uploads. CI workflow simplified: only target/codspeed is uploaded/downloaded. Plugin bytes are baked into the binary by the runtime crate's build.rs, which is the only crate that needs WASM_PLUGIN_DIR.
Replace the recursive StyledContent enum (Text | Styled { style, children })
with a flat StyledContent(Vec<Span>) where each Span carries fully resolved
styling. Styles are now merged at Lua construction time via Style::merge,
eliminating tree recursion and intermediate String allocations at render time.
Display impl streams directly to the formatter using owo_colors
fmt_prefix/fmt_suffix -- zero buffering, zero recursion.
Remove render_prompt wrapper, inline .to_string() / Display at call sites.
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.
No description provided.