Reduce runtime dependency footprint#346
Merged
Merged
Conversation
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.
What problem does this PR solve?
Reduce the runtime dependency footprint and release binary size for the normal Rust ORM example path.
Issue link:
What is changed and how it works?
bindgen-runtime, avoiding optional compression feature activation fromsnappy,lz4,zstd,zlib, andbzip2.regexdependency from KiteSQL runtime code.TRIMevaluation with direct prefix/suffix trimming.LIKEevaluation with a small wildcard matcher supporting%,_, escape characters, full-string matching, and Unicode char boundaries.Size checks from the
hello_worldORM release example:.textcargo bloat --release --example hello_world --features orm --crates -n 2020.8MiB12.8MiB16.0MiBcargo bloat --release --example hello_world --no-default-features --features orm,lmdb --crates -n 2011.5MiB6.7MiB8.6MiBRegex crates no longer appear in the runtime bloat output.
Code changes
Check List
Tests
Manual test steps:
cargo fmt --all -- --checkcargo test --lib --features ormcargo run -p sqllogictest-test -- --path tests/slt/filter.sltcargo tree --features orm -e normal -i regexcargo bloat --release --example hello_world --features orm --crates -n 20cargo bloat --release --example hello_world --no-default-features --features orm,lmdb --crates -n 20Side effects
Note for reviewer
The new LIKE matcher intentionally uses SQL full-string matching semantics. Existing filter sqllogictest coverage passes, and unit tests include escape, wildcard, repeated-percent, empty-string, and Unicode cases.