Repository navigation
Tags
Tags
chore(build): 0.1.17 (#36) Bump VERSION to 0.1.17 and sync every manifest via scripts/sync-versions.sh. Covers the four commits since 0.1.16: proto3 string UTF-8 validation, faster validator, deterministic caller-buffer encode, encoder caching.
feat(core): delimited framing, services/editions, embedded facade (0.… …1.13) (#23) * docs(bindings): document the embedded-schema mechanism and fix stale notes Explain how the transitive FileDescriptorSet travels as base64 in the generated output, the lazy/preload/init/use_schema lifecycle and the elixir/R deviations; correct the stale Go dynamic-only note, the stale map/cross-file scope note, and the remaining non-English words. * feat(bindings): add embedded static-memory binding over the C core One malloc phase (schema load + context), then a bounded steady state: decode reuses a single retain-capped arena, encode writes into caller memory and fails with PBW_ERR_LIMIT instead of growing. Thin wrappers over pbw_decode_ctx/pbw_encode_to, so the wire stays the core's. Wired into make test with a pinned-oracle self-check and a round-trip example; status table gains a row. * feat(core): load services, editions features and MessageSets from descriptor sets Resolve service/method names to input/output types for transports, honor edition FeatureSets and MessageSet items in decode/encode, and pin the new behavior with descriptor tests plus fuzz corpus. * refactor(core): remove unused internal helpers Drop dead wrappers left behind by earlier cleanups (pbw_decode_arena, pbw_value_new_list, le64/le32 write helpers) so the internal API matches what the codec actually uses. * fix(core): propagate depth limits in JSON, accept list form in text format Keep PBW_ERR_LIMIT (instead of INVALID) when nested JSON input breaches the depth cap, simplify JSON name printing to jsonName, and accept the reference list form for repeated message/group fields in text format with the correct nesting depth. * test(test): extend core, malformed and descriptor coverage Cover the JSON limit propagation and text list-form fixes, MessageSet fallbacks for malformed items, and service descriptors. * feat(build): add allocation-failure sweep and merged coverage floor Build the core a second time with hooked allocators so test_nofail can fail each allocation site in turn, merge its gcov counts with the normal run, and skip the thread scaling check under coverage instrumentation. * feat(core): delimited framing, descriptor limits, WKT helpers, embedded facade - core: pbw_encode_delimited_to and pbw_decode_delimited_ctx[_limits], so a framed stream runs through a caller buffer or a workspace arena; frame length is checked against max_bytes before decoding; pbw_descriptor_set_load_limits caps the descriptor set itself; pbw_service_resolve maps names to descriptors; FieldMask paths and millis <-> Timestamp/Duration in src/wkt.c - fix(core): big-endian tag words, float printing and struct member access; -m32 double comparison in the struct self-check; text \u surrogate pairs and Any store-error normalization for reference parity - bindings: embedded static-memory facade (pbwe_open/build/decode/encode); retain_cap for Java/Kotlin/Scala/Clojure/Erlang/Elixir; GC-tracked Python schema references; Ruby use-after-free on the schema load-failure path - test: fuzz corpora for wire, JSON, text and descriptor bytes; core coverage floor 65% -> 85%; allocation-failure sweep - ci: ASan binding job, 32-bit and big-endian ports gate, api-docs, nightly codegen, SLSA provenance, llms.txt sync gate; docker benchmark runner - docs: ROADMAP, docs/examples.md, docs/perf-attempts.md, refreshed BENCHMARKS, guide, design and testing notes * chore(bindings): bump to 0.1.13 for the thirteenth release * fix(core): avoid undefined qsort and memcpy on empty inputs qsort with zero fields and memcpy from a NULL source are UB; UBSan flags both in the ASan+UBSan gate. * test(test): free rejected values and stop writing into build/ pbw_message_set leaves rejected values owned by the caller, so the tests leaked them under LeakSanitizer; the corrupt descriptor fixture is now written next to the working directory, so ctest no longer needs build/. * build(build): doxygen output dir, dash-safe coverage, MSVC fopen, json.h fallback - api-docs creates build/doxygen before doxygen writes there - coverage reports its status without PIPESTATUS, which /bin/sh lacks - MSVC gets _CRT_SECURE_NO_WARNINGS for fopen in the struct runtime - bench.cc falls back to util/json_util.h when json/json.h is not shipped * ci(ci): preload libasan only for the interpreter, not the compiler A global LD_PRELOAD also instrumented gcc/cc1, whose own leak check failed the build before any test ran. * test(test): keep the NOMEM sweep and Windows builds free of leaks and UB - test_nofail stores every fresh value through set_value/set_child, which free it when the store is rejected, so LeakSanitizer sees a clean sweep - test_struct builds inf from its bit pattern instead of 1.0f / 0.0f, which MSVC rejects (C2124) - tests/test_pbwire.c renames a shadowing local (MSVC C4456) - difftest uses SerializePartialToString for the missing-required message, where older libprotobuf aborts instead of returning false - ci: interpretation headers are C2X, so PBW_EXTRA_CFLAGS carries only the sanitizer flags - copy the UB fixes into bindings/erlang/c_src/core so core-sync-check passes * ci(ci): pin the difftest baseline, install the Node oracle, match MSVC to the gate - difftest builds protoc and libprotobuf from the pinned protobuf checkout: JSON verdict parity is calibrated against PROTOBUF_VERSION, and the distro package disagrees with it - binding-asan installs the pinned protobufjs oracle the Node compat test loads - MSVC disables C4456 (shadowing), which -Wall -Wextra does not enable * ci(ci): point the bench build at abseil in the pinned checkout, fix the npm line The difftest bench now compiles against the pinned protobuf sources, whose abseil headers live under third_party/. The oracle install must be one line, or bash feeds the flags to npm as a package name. * ci(ci): add the fetched abseil include to the difftest bench build protobuf's configure FetchContent's abseil into build/_deps/absl-src, so the pinned headers need that include root as well. * ci(ci): add the vendored utf8_range include to the difftest bench build parse_context.h includes utf8_validity.h from third_party/utf8_range in the pinned checkout. * ci(ci): install the pinned protobuf and use its pkg-config file The bench object references abseil symbols directly, so the link line needs the absl libraries; installing the pinned checkout gives protobuf.pc with those Requires and correct include/lib paths.
feat(bindings): embedded static schemas, meta sidecars, Java/Node cod… …ecs (#19) * chore(bindings): bump to 0.1.7 for the seventh release attempt * feat(bindings): python/node compat facades with embedded schema Core adds pbw_decode_delimited as the one-shot twin of pbw_encode_delimited, plus a limits variant and self-checks. The typed plugin embeds the transitive descriptor closure as base64, so generated models carry their schema and need no .desc file. Python models gain official _pb2-shaped methods and Node models gain a protobufjs-static shape, both checked by shared T1-T6 compat tests over testdata vectors. Closed enums and oneof fixtures included. * feat(bindings): add direct Java Wire codec and Node decodeObject - Java generated models write/parse via Wire directly, no Message tree - Node adds decodeObject one-shot path, grows slice stack to 32 - Refresh bench tables and toolchain versions * feat(bindings): build Java dynamic schema from generated Meta tables FieldMeta now carries the proto field name and a oneof index, the Java codegen plugin emits both, and Schema.fromClasses builds a dynamic schema from Meta tables with no descriptor set file. Adds TestMetaSchema covering matrix3/oneof1 parity with the descriptor path. * feat(bindings): codegen meta sidecars with model/register/registry options * feat(bindings): Go, Rust and C# bug-compatible facades over the C core Go mirrors protoc-gen-go (CamelCase fields, optional pointers, oneof wrappers, Marshal/Unmarshal), Rust mirrors prost (Option fields, i32 enums, nested modules, encode_to_vec/decode) and C# mirrors Google.Protobuf (Parser.ParseFrom, ToByteArray, RepeatedField, KindOneofCase, Has/Clear). Each embeds its FileDescriptorSet, keeps the wire format in the C core, and proves T1-T6 against its pinned oracle (compat suites next to the models). Also fix shared model gaps the conformance proto exposed: nested enums resolve (enumLocal walks the descriptor), self-recursive references keep their bare name, external enums degrade to int, recursive messages Box, aliased enum values dedup, Eq/Hash derive recursively, and writeRustEncode handles u64 loads. * feat(bindings): bug-compatible facades for the remaining seven bindings PHP mirrors the official PHP runtime (get/set/has/clear, RepeatedField, serializeToString/mergeFromString, whichOneof); Dart mirrors protobuf-dart (create/writeToBuffer/fromBuffer, whichX, ProtobufEnum); ObjC mirrors GPBMessage (properties, XArray, Kind_OneOfCase, data/parseFromData); Java mirrors protobuf-java (Builder, toByteArray/parseFrom, KindCase) with Kotlin as a thin DSL over the Java classes; Lua embeds its schema with a legacy-compatible dual-arity codec (T1-T4); Erlang maps TESTSPEC T1-T6 onto gpb records with a committed tspec oracle; C and C++ gain T3-T6 compat sections plus an opt-in libprotobuf differential (make compat-oracle). Shared fixes: gen.go passes opt to all emitters; luaFiles takes opt; nested enums resolve from the descriptor (enumLocal no longer depends on emission order); self-reference keeps its bare name in C#/Rust paths; external enums degrade to int; Makefile oneof1 lines for java/kotlin/dart/php/objc, compat_test.php in test-php, kotlinc conformance classpath fix, csharp conf.csproj gains the Protobuf package; ORACLES.md pins all seven. * refactor(bindings): rename typed models to generated under codegen - move bindings/typed plugin to top-level codegen as protoc-gen-pbwire - rename typed tests and models to generated across all bindings * feat(bindings): add Swift, Scala, Elixir, Zig, F#, Clojure, Julia, R bindings Eight new host bindings over the shared C core, no second wire codec anywhere: - Swift (SwiftPM, static link, FFI host), Scala/Clojure (JVM, reuse the Java runtime), Elixir (struct translation over the shared NIF), Zig (static link, Zig 0.17 build API), F# (facade over the C# project), Julia (dlopen + ccall), R (C extension, named lists). - Each ships runtime + examples + tests + benchmarks + conformance entry + README; all self-checks pass on this machine (Swift 8/8, Scala 32/32, Elixir 18/18, Zig test ok, F# 36/36, Clojure 31 assertions, Julia 41/41, R both suites green). - BENCHMARKS.md gains the at-a-glance rows, baseline table rows, run commands and eight per-binding sections (xlarge: Swift 5.38x/2.62x, Scala 1.29x/1.47x, Elixir 2.27x/1.46x, F# 2.92x/1.32x, Julia 119x/0.95x, Clojure 0.11x/0.19x below baseline by design, Zig/R pbwire-only). - Makefile gains *-test/*-bench targets; bindings/README.md, README.md (fifteen -> twenty-three languages) and llms.txt updated. Note: this commit also includes pre-existing working-tree changes that predate this work (ci.yml conformance job, CMakeLists MSVC/Threads handling, docs/testing.md one-liner) to keep the tree in one piece. * feat(bindings): add emitters for Swift, Zig, Scala, Clojure, F#, Elixir, Julia, R One protoc plugin language each: typed fields plus encode/decode over the binding's dynamic API, with the FileDescriptorSet embedded (Elixir emits elixir-protobuf modules, which are its schema source). Adds the committed models under tests/gen and examples/gen, a matrix3 byte-equality generated test per binding, addressbook examples through the generated models, and the make codegen/test/conformance wiring. * fix(bindings): accumulate referenced modules across load_schema calls collect/1 dropped each module's referenced queue and kept only the last module's, so load_schema with several roots never visited their shared references (e.g. an enum). Keep every module's references for drain. * refactor(bindings): use embedded-schema generated APIs in legacy examples Ruby, Python, Node and 5EEE Lua examples passed a loaded FileDescriptorSet into the generated models; the models embed their own schema, so call the zero-argument forms (to_proto/decode, SerializeToString/FromString, encode().finish()/toObject, encode()/decode) and stop reading .desc. * ci(build): republish 0.1.7 with Elixir and F# jobs plus npm OIDC * ci(build): switch NuGet jobs to OIDC trusted publishing * feat(bindings): add bytes, groups, maps and oneofs to C struct codec Extend the C struct engine and cgen plugin beyond scalars and messages: bytes fields, legacy groups, map fields as entry structs, and oneof members with a case word. Add map/group/oneof fixtures, golden headers and struct self-checks; regen affected headers and fix up examples. * fix(build): bump maven-gpg-plugin for MAVEN_GPG_PASSPHRASE support * fix(build): publish to Central Portal via central-publishing plugin * fix(build): add developers and scm metadata required by Central * fix(bindings): load Zig generated test schema from meta sidecar The generated model test built its schema from the model module; after the meta-sidecar split the schema lives in matrix3_meta. Also fix the maptest descriptor path for the bindings/zig working directory. * chore(bindings): bump to 0.1.12 for the twelfth release * chore(bindings): regenerate committed models and fix C formatting make codegen with the pinned protoc leaves node/ruby models and their new meta sidecars dirty; make format fixes addon.c and generated_test.m.
PreviousNext