• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jallum / flatbuffer / 14e141ac3db078d50efe4cda09ca06f525a1be3d
100%

Build:
DEFAULT BRANCH: main
Ran 31 Aug 2026 08:51PM UTC
Jobs 1
Files 10
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Aug 2026 08:51PM UTC coverage: 99.537% (+0.2%) from 99.327%
14e141ac3db078d50efe4cda09ca06f525a1be3d

push

github

web-flow
Generate schema-specialized binary writers (#16)

Stacked on #14 (and #13).

## Summary

- generate schema-specialized reverse-builder dispatch during `use
Flatbuffer` expansion
- keep schema-independent mechanics shared in the internal
`Flatbuffer.Writer`: final framing, string pooling, vector
materialization, scalar validation, aligned pushes, and vtable
construction
- compile table fields and IDs, scalar defaults, enum/union dispatch,
struct padding, vector element sizes, and alignment into the caller
- precompute alignment-friendly table emission order while independently
assembling vtable locations in field-ID order
- preserve `to_iolist/1` and `to_binary/1`, compact/shared vtables,
shared strings, atom/binary input keys, safe schemas, recursive tables,
and existing error tuples
- extend flatc interoperability so the C++ verifier reads buffers from
both interpreted and generated writers

The shared-runtime refactor removed 291 lines (about 30%) from the
writer generator; generated code now contains only the
schema-specialized control flow and measurements.

## TDD and verification

The first test traced `Flatbuffer.to_iolist/2` and
`Flatbuffer.to_binary/2`; it failed on the original macro delegation and
passes only when both calls use generated code.

- Elixir 1.18 / OTP 27: 138 tests, 0 failures, 2 excluded
- Elixir 1.19 / OTP 28: 136 tests, 0 failures, 2 excluded
- Elixir 1.20 / OTP 29 coverage: 136 tests, 0 failures, 99.5%
- flatc interoperability: 2 tests, 0 failures; C++ verifies interpreted
and generated writer buffers
- `mix deps.unlock --check-unused`
- `mix compile --warnings-as-errors`
- `mix format --check-formatted`
- `git diff --check`

## Benchee

M4 Pro, Elixir 1.19.4, OTP 28.3, 100 integers and 20 child tables, after
shared-runtime extraction:

| writer | average | median | memory | reductions |
|---|---:|---:|---:|---:|
| interpreted | 11.45 µs | 11.21 µs | 55.45 KB | 4.62 K |
| generated | 10.30 µs | 10.08 µs | 45.80 KB | 3.56 K... (continued)

142 of 143 new or added lines in 3 files covered. (99.3%)

2 existing lines in 1 file now uncovered.

645 of 648 relevant lines covered (99.54%)

78.87 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
99.39
0.7% lib/flatbuffer/writer.ex

Coverage Regressions

Lines Coverage ∆ File
2
93.33
-2.12% lib/flatbuffer/utils.ex
Jobs
ID Job ID Ran Files Coverage
1 14e141ac3db078d50efe4cda09ca06f525a1be3d.1 31 Aug 2026 08:51PM UTC 10
99.54
GitHub Action Run
Source Files on build 14e141ac3db078d50efe4cda09ca06f525a1be3d
  • Tree
  • List 10
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 14e141ac on github
  • Prev Build on main (#BA01E18A...)
  • Next Build on main (#C1286823...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc