Skip to content

perf(build): strip standalone comments - #990

Open
Chemaclass wants to merge 2 commits into
mainfrom
feat/strip-build-comments
Open

perf(build): strip standalone comments#990
Chemaclass wants to merge 2 commits into
mainfrom
feat/strip-build-comments

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

Summary

  • strip source comments from the assembled standalone binary with the Bash-aware shfmt parser
  • preserve the shebang, # src/... boundary markers, and all heredoc content
  • install the pinned build optimizer in build and npm-publish CI
  • enforce a 500 KiB ceiling for the generated executable

Size

  • before: 612,341 bytes
  • after: 479,022 bytes
  • reduction: 133,319 bytes (21.8%)

The source tree remains fully documented; only the release artifact is optimized.

Verification

  • env -u NO_COLOR ./build.sh --verify — 1,655 tests and 2,478 assertions
  • make sa
  • make lint
  • pinned shfmt v3.13.1 installation from the workflow command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant