refactor(s2n-events): Move s2n-quic event generation program out of s2n-events #2789
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release Summary:
Resolved issues:
related to #2768
Description of changes:
s2n-events is currently structured as a package which implements event system code generation and defines a program which uses this implementation to generate the events systems for s2n-quic and s2n-quic-dc. This event generation program configures s2n-events with project specific stuff, such as input files, the output path, Ref/Mut mode, code insertions, etc. Eventually we'll want s2n-tls to provide its own configuration to s2n-events, separately from s2n-quic.
To support s2n-quic and s2n-tls separately generating their own events systems, this PR converts s2n-events into a library that exposes the parts of s2n-events that's needed to generate an events system. The s2n-quic event generation program is moved out of s2n-events and into a separate package that's owned by s2n-quic, which takes a dependency on the s2n-events library. This will allow s2n-tls to similarly take a dependency on s2n-events in an event generation program of its own.
Call-outs:
In the future, we might consider having s2n-events own more of the boilerplate code in the generate script (e.g. parsing, sorting, and validating the input files). We could also consider keeping s2n-events as program rather than a library, and specify s2n-quic/s2n-tls options separately via CLI options (#2780 (comment)).
However, I wasn't planning on having these improvements be in scope for this PR. For now, I just wanted to allow s2n-quic and s2n-tls to generate separate events systems by owning their own event generation programs, similar to the current one in s2n-events.
Testing:
The generate-events CI job was updated to point to the new events generation program. I confirmed that this job continues to error when the code generation is changed without committing the resulting changes:
https://github.com/aws/s2n-quic/actions/runs/17419054302/job/49453657153?pr=2789#step:6:1
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.