Repository navigation
Conversation
A compact binary serialization for fully resolved Smithy models, optimized for fast loading and selective loading of model subsets. Includes the reader, writer, LEB128/CRC-32C support, selective loading, hot/cold trait splitting, symbol-referenced dynamic values, a 'transform' CLI command, the spec and design docs, and tests/benchmarks.
sugmanue
commented
Sep 26, 2026
This branch has not been deployed
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.
Background
What do these changes do?
Add the Smithy Model Format (SMF), a compact binary serialization of a fully resolved Smithy model, as a developer preview. SMF replaces generic JSON parsing with a symbol table, positional shape layouts, a single-byte shape-type enum, a deduplicated trait-value table, and a binary-searchable shape index whose neighbor lists allow computing the closure of a service plus specific operations without parsing unrelated shapes. Includes the reader, writer, LEB128/CRC-32C support, a shared prelude symbol table, a
transformCLI command, the spec, and the design document.Why are they important?
SMF loads 2 to 5 times faster than the JSON AST for a full model and up to about 30 times faster for a selective read of one operation. Selective-read cost is bounded by the operation's closure, not the file size: one operation out of a single file holding all 424 AWS services (405,258 shapes) reads in a median of 3.3 ms versus 826 ms for the whole file. The value is a specified, documented, multi-language binary model format with lower repeated and cold-start load cost and selective loading, for dynamic clients and frequently-invoked command-line tools. It is a load-time format, not a wire format and not a composable build dependency, and it targets Smithy 2.0 semantics.
Testing
rejection tests.
-PawsModelsTests): round-trip andhot/cold-split fidelity across all 424 models (424/424 pass), plus an aggregate-corpus size and selective-read harness.
Links
designs/compact-binary-model-format.mddocs/source-2.0/spec/smf.rstBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.