Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Feature tour

Runnable examples pull live source from sbe-feature-tour (compiled by docs_validation_test). Schematics that cannot run in the harness stay rust,ignore.

AreaFeatureWhere
Generategenerate(..) in build.rs, write_to_out_dir / write_toGenerate in build.rs
Generatesbe_mod! / include_sbe!Include generated code
Generatebuild vs runtime dependency, generator as a libraryDepend on the generator
Generateseveral schemas, SchemaSource::with_shared, with_shared_moduleMulti-schema patterns
Generateparse diagnostics (miette spans, fancy feature)Error diagnostics
Generatevalidate_against_sbe_xsd, SchemaSource::with_xsd_validationExtension XML: what is captured
Generatemoving from sbe-toolComing from sbe-tool
Encodetype-state stages in wire orderWire order via named stages
Encodemethod chaining, fixed(&FixedFields)Method chaining
Encodeoptional fields, apply_nullsEncode and decode
Encodeexact buffer sizing, *EncodedLengthBuffer sizing
EncodeAeron try_claim: Claim, send_fixed, send, OfferClaimAeron try_claim
Decodecomposites, endianness, layoutComposite layout and endianness
Decodeflyweights vs owned structsFlyweight vs whole-struct
Decodechecked entry points, tails checked as reachedTrust boundary
DecodeNullVal and OptionWhy NullVal instead of Option
DecodeDisplay / Debug textDisplay and Debug
Decodeschema descriptions as rustdocSchema descriptions as rustdoc
Configpresets: new, lean, profile(GenerationProfile)GenerationConfig options
Configwith_conversion, with_domain_type, with_manual_domain_type, selectorswith_conversion vs with_domain_type
Configwith_enum_mapping, with_composite_mappingApp types on composites
Configwith_null_as_option, with_all_enums_as_optionOpting into Option
Configwith_bool_domain_typeNull-aware accessors on BooleanType
Configwith_domain_objects(DomainVarData)Domain DTOs
Configcompact_str, smol_str, bytes, chrono featuresFeature integrations
Configtimestamp conversionsTimestamp conversions
Configwith_validateValue validation
Configwith_source_traits, with_encode_version, with_external_sbe_rt, with_module_name, with_keyword_append_token, with_deprecated_attrs, with_display_debug, with_meta_attributes, with_dispatchGenerationConfig options
Extendwith_hook, contexts, accessor names and typesCode-generation hooks
Extendwith_try_hook, GenerateError::HookHooks that can fail
Extendschema extension marks, any attribute, prefixed or notExtension XML
Extendwith_extension_constsEvery mark as a const
Extendexample label and field-pair hooksExample hooks
ExtendConversionSelector::extension_attrExtensionAttr conversions
Extenda venue’s SBE responses rendered as its JSONExchange example
Referencetype-state cost, API freeze, feature matrixType-state, API freeze, Feature matrix
Referencebenchmarks against sbe-toolBenchmarks, Methodology