Repository navigation
TruffleData 0.19.0
Applications that know their schemas at build time can embed typed plans in a GraalVM Native Image. This release also adds experimental Bazel readers for borrowed rkyv archives and Cap’n Proto messages.
- The Bazel rule
static_plan_librarygenerates a Java plan holder and a Native Image Feature for JSON, Protobuf, rkyv, Cap’n Proto, YAML, CSV and experimental Bebop. The image builder initializes the layout. Applications bind native handles and open readers at run time. On the JVM the holder initializes on first use. Examples for each format - The JSON generator accepts a typed subset of JSON Schema draft 2020-12, including closed objects, nullable fields, homogeneous arrays and local references. Generated layouts use the simdjson typed reader.
- The experimental
//rkyvtarget exposes primitive vectors and projected struct fields as borrowed Truffle arrays. A Myna call validates the projection once, then indexed reads access the original bytes. The experimental//capnptarget uses generated Java schema readers over bounded segments of an unpacked frame. Both targets ship in the tagged source tree. - The JSON, Protobuf, CSV and YAML README cards compare build-time and runtime plans on identical inputs. On a pinned Linux amd64 worker, Protobuf decode and release measured 1,021 ns per message with a build-time plan and 1,307 ns with the runtime plan. Both allocated 1,608 Java bytes per message. The same ten compiled reads on mixed JSON took 265 ns with a build-time plan, 266 ns with a runtime plan and 33 ns through the tape. These measurements start after plan setup. Measurements and reproduction
- The CodSpeed suite covers CPU simulation, wall time and process memory across all seven formats. The measurement driver also reports Java heap allocation per row. Benchmark evidence