Skip to content

Examples for the 3 packages + Release publishes all three NuGets#52

Merged
MDA2AV merged 5 commits into
mainfrom
feat/examples-and-release
Jun 17, 2026
Merged

Examples for the 3 packages + Release publishes all three NuGets#52
MDA2AV merged 5 commits into
mainfrom
feat/examples-and-release

Conversation

@MDA2AV

@MDA2AV MDA2AV commented Jun 17, 2026

Copy link
Copy Markdown
Member

Two things: replace the old examples with package-focused ones, and fix the Release action so it publishes all three NuGets (not just the managed one).

Examples

  • Deleted src/Examples (the GenHTTP/ServerTest demos) and removed them from src/Glyph11.sln.
  • New root Examples/ — a runnable, heavily-commented console app per package, each covering every option:
    • Glyph11.Example — contiguous + multi-segment parse, custom limits (rejection), reading fields/headers/query, chunked decode, error handling (incomplete vs. HttpParseException), reuse/dispose.
    • Glyph11.Native.Example — span + ReadOnlySequence (scratch + out parsed), pooled storage, status codes → HTTP mapping, chunked decode, ABI.
    • Glyph11.Pico.Example — memory + sequence parse, chunked via ChunkedBodyStream, the validation trade-off (accepts a traversal path glyph11 rejects).
  • Examples/README.md explains running each (managed needs nothing; native/pico run against a locally-built core via GLYPH11_NATIVE_PATH / GLYPH11_PICO_NATIVE_PATH).

Verified: all three compile and run end-to-end — every section prints the expected output.

Release publishes all three

release.yml only packed src/, so it published Glyph11 and nothing else — Native/Pico only published via their own native-v* / pico-v* tags. Now:

  • release.yml keeps the managed pack as a job and calls package-native.yml / package-pico.yml as reusable workflows (publish: true, secrets: inherit), so one dispatch runs the native build matrices and pushes all three.
  • Those two workflows gained a workflow_call trigger; their publish job fires when called; and the packed version uses the csproj <Version> on a real publish (a *-v* tag still wins; PRs stay throwaway CI prereleases).
  • --skip-duplicate everywhere — re-running only publishes versions not yet on NuGet.org. To release: bump a package's <Version>, run Release.

Publishes at the current versions: Glyph11 0.3.5, Glyph11.Native 0.1.0, Glyph11.Pico 0.0.1.

MDA2AV added 4 commits June 17, 2026 11:29
Delete the old src/Examples (GenHTTP/ServerTest demos) and remove them from
src/Glyph11.sln. Add a root Examples/ with a runnable, fully-commented console
app per package, each covering every option:

- Glyph11.Example         — contiguous + multi-segment parse, custom limits,
  reading fields/headers/query, chunked decode, error handling, reuse/dispose
- Glyph11.Native.Example  — span + ReadOnlySequence (scratch + out parsed) parse,
  pooled storage, status codes / HTTP mapping, chunked decode, ABI
- Glyph11.Pico.Example    — memory + sequence parse, chunked via ChunkedBodyStream,
  the validation trade-off

Verified all three compile and run (managed needs no native; native/pico run
against a locally-built core via GLYPH11_NATIVE_PATH / GLYPH11_PICO_NATIVE_PATH).
Examples/README.md explains running each.
release.yml only packed src/ (Glyph11). Make it publish all three at their csproj
versions: keep the managed pack as a job, and call package-native.yml /
package-pico.yml as reusable workflows (with publish: true, secrets: inherit) so
one dispatch runs the native build matrices and pushes Native + Pico too.

- package-native/pico: add a workflow_call trigger; publish job now also fires when
  called; version uses the csproj <Version> on a real publish (tag still wins;
  PRs stay throwaway CI prereleases). --skip-duplicate keeps re-runs safe.
Put the examples in the solution for IDE convenience. Mark them IsPackable=false
/ IsPublishable=false so the Release pack (which packs the src solution) never
turns them into NuGets, and keep the Glyph11.Native/Glyph11.Pico projects OUT of
the solution (dotnet sln add pulls them in as references) — otherwise the managed
Release job would pack them without their native binaries. Verified: packing the
solution produces only Glyph11.0.3.5.nupkg; the examples still build via their
ProjectReferences.
…port)

GenHTTP wasn't only a demo — Benchmarks and Tests ProjectReference it and use
its types (Request, RequestMethod) to exercise FlexibleParser. Deleting
src/Examples broke their references. The Glyph11 package itself never uses
GenHTTP, so move it to tests/GenHTTP (test/bench support) and re-point:
- GenHTTP -> ..\..\src\Glyph11
- Benchmarks -> ..\tests\GenHTTP ; Tests -> ..\GenHTTP
- add tests/GenHTTP to src/Glyph11.sln (it's IsPackable=false, so Release still
  packs only Glyph11)

Build succeeds; all 366 tests pass.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Details
Benchmark suite Current: d36df71 Previous: d3a06f0 Ratio
Benchmarks.FlexibleParserBenchmark.Small_ROM 140.0567254225413 ns (± 0.44856417254476727) 139.20921897888184 ns (± 0.3414138670448296) 1.01
Benchmarks.FlexibleParserBenchmark.Small_MultiSegment 374.97969881693524 ns (± 1.1308645024404378) 349.4604838689168 ns (± 2.860363450836272) 1.07
Benchmarks.FlexibleParserBenchmark.Header4K_ROM 705.234343846639 ns (± 0.5189513822054835) 708.5051829020182 ns (± 2.487052061932313) 1.00
Benchmarks.FlexibleParserBenchmark.Header4K_MultiSegment 1821.0901845296223 ns (± 17.064008957797444) 1826.123291015625 ns (± 16.460001723138515) 1.00
Benchmarks.FlexibleParserBenchmark.Header32K_ROM 5033.207661946614 ns (± 3.59153954590508) 4949.9634958903 ns (± 10.64757006352856) 1.02
Benchmarks.FlexibleParserBenchmark.Header32K_MultiSegment 13128.68792215983 ns (± 58.82534887238074) 12010.515991210938 ns (± 66.48393176840845) 1.09
Benchmarks.UltraHardenedParserBenchmark.Small_ROM 269.3668969472249 ns (± 0.34173116943299775) 252.88829962412515 ns (± 1.7230360417772392) 1.07
Benchmarks.UltraHardenedParserBenchmark.Small_MultiSegment 547.5957533518473 ns (± 0.855288372587495) 559.2204907735189 ns (± 4.167496342803848) 0.98
Benchmarks.UltraHardenedParserBenchmark.Header4K_ROM 1144.2172737121582 ns (± 0.721379856002496) 1118.6354840596516 ns (± 0.7807947528732518) 1.02
Benchmarks.UltraHardenedParserBenchmark.Header4K_MultiSegment 2352.784901936849 ns (± 18.676799564607993) 2225.3782081604004 ns (± 17.533121532742204) 1.06
Benchmarks.UltraHardenedParserBenchmark.Header32K_ROM 7714.722529093425 ns (± 13.791591812409509) 7139.710075378418 ns (± 18.12358659190381) 1.08
Benchmarks.UltraHardenedParserBenchmark.Header32K_MultiSegment 15826.914093017578 ns (± 126.90508387519729) 15398.131754557291 ns (± 158.60331507605568) 1.03
Benchmarks.FlexibleParserBenchmark.Small_ROM.Allocated 0 ns (± 0) 0 ns (± 0) 1
Benchmarks.FlexibleParserBenchmark.Small_MultiSegment.Allocated 112 ns (± 0) 112 ns (± 0) 1
Benchmarks.FlexibleParserBenchmark.Header4K_ROM.Allocated 0 ns (± 0) 0 ns (± 0) 1
Benchmarks.FlexibleParserBenchmark.Header4K_MultiSegment.Allocated 4128 ns (± 0) 4128 ns (± 0) 1
Benchmarks.FlexibleParserBenchmark.Header32K_ROM.Allocated 0 ns (± 0) 0 ns (± 0) 1
Benchmarks.FlexibleParserBenchmark.Header32K_MultiSegment.Allocated 32800 ns (± 0) 32800 ns (± 0) 1
Benchmarks.UltraHardenedParserBenchmark.Small_ROM.Allocated 0 ns (± 0) 0 ns (± 0) 1
Benchmarks.UltraHardenedParserBenchmark.Small_MultiSegment.Allocated 128 ns (± 0) 128 ns (± 0) 1
Benchmarks.UltraHardenedParserBenchmark.Header4K_ROM.Allocated 0 ns (± 0) 0 ns (± 0) 1
Benchmarks.UltraHardenedParserBenchmark.Header4K_MultiSegment.Allocated 4128 ns (± 0) 4128 ns (± 0) 1
Benchmarks.UltraHardenedParserBenchmark.Header32K_ROM.Allocated 0 ns (± 0) 0 ns (± 0) 1
Benchmarks.UltraHardenedParserBenchmark.Header32K_MultiSegment.Allocated 32800 ns (± 0) 32800 ns (± 0) 1

This comment was automatically generated by workflow using github-action-benchmark.

GenHTTP's Request was only a wrapper whose .Source is a BinaryRequest, so the
FlexibleParser benchmarks and tests now target BinaryRequest directly (Reset ->
Clear, .Source dropped) — same coverage, no GenHTTP. Deleted tests/GenHTTP,
removed it from the solution and both ProjectReferences, and swapped the
incidental 'GenHTTP' server-name string in test payloads for 'Glyph11' (same
length, offsets unchanged).

Build succeeds; all 366 tests pass; no GenHTTP references remain.
@MDA2AV MDA2AV merged commit 074be52 into main Jun 17, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant