feat: add link hook for treeshaking native symbols via record_use#326
Draft
mosuem wants to merge 9 commits into
Draft
feat: add link hook for treeshaking native symbols via record_use#326mosuem wants to merge 9 commits into
mosuem wants to merge 9 commits into
Conversation
mosuem
marked this pull request as draft
July 15, 2026 13:59
- Upgrade ffigen dependency to ^20.0.0 in pubspec.yaml - Consolidate YAML ffigen configs into tool/ffigen.dart - Update tool/update-bindings.sh to run dart run tool/ffigen.dart - Re-generate native bindings
- Add hooks.user_defines.webcrypto.buildMode: fetch to pubspec.yaml - Support fetch, build, and local build modes in hook/build.dart - Add lib/src/hook_helpers/hashes.dart and tool/regenerate_hashes.dart for SHA256 integrity checks - Add .github/workflows/release-artifacts.yml matrix workflow supporting Linux, macOS, Windows, Android, and iOS - Pin workflow actions to full commit SHA hashes
- Add hook/link.dart using CLinker and record_use for native symbol treeshaking - Update hook/build.dart to support static library building and ToLinkHook routing - Add .github/workflows/treeshake-test.yml workflow for desktop treeshake testing - Update src/CMakeLists.txt to support BUILD_SHARED_LIBS
mosuem
force-pushed
the
add-link-hook-treeshaking
branch
from
July 17, 2026 15:18
7992f50 to
41ebdee
Compare
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.
Summary
hook/link.dartleveragingCLinkerandrecord_useto treeshake unused BoringSSL native symbols.hook/build.dartto compile static libraries when static linking or link hooks are enabled, and routes static assets toToLinkHook.src/CMakeLists.txtto honor theBUILD_SHARED_LIBSoption..github/workflows/treeshake-test.ymlmatrix workflow to run desktop tests with native symbol treeshaking.