Skip to content

Commit d35c22f

Browse files
authored
refactor(s2n-events): Move s2n-quic event generation program out of s2n-events (#2789)
1 parent fdf9586 commit d35c22f

File tree

4 files changed

+31
-13
lines changed

4 files changed

+31
-13
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,11 +711,11 @@ jobs:
711711

712712
- name: Run events codegen
713713
run: |
714-
cargo run --manifest-path ./tools/s2n-events/Cargo.toml
714+
cargo run --manifest-path ./tools/event-generator/Cargo.toml
715715
716716
- name: Check to make sure the generated events are up-to-date
717717
run: |
718-
# If this fails you need to run `cargo run --manifest-path ./tools/s2n-events/Cargo.toml`
718+
# If this fails you need to run `cargo run --manifest-path ./tools/event-generator/Cargo.toml`
719719
git diff --exit-code
720720
721721
# ensures there are no unused snapshots

tools/event-generator/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "event-generator"
3+
version = "0.1.0"
4+
edition = "2024"
5+
publish = false
6+
7+
[dependencies]
8+
s2n-events = { path = "../s2n-events" }
9+
proc-macro2 = "1.0.101"
10+
quote = "1.0.40"
11+
glob = "0.3.3"
12+
13+
[workspace]
14+
members = ["."]
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,7 @@
33

44
use proc_macro2::TokenStream;
55
use quote::quote;
6-
7-
type Error = Box<dyn std::error::Error + Send + Sync>;
8-
type Result<T, E = Error> = core::result::Result<T, E>;
9-
10-
mod output;
11-
mod output_mode;
12-
mod parser;
13-
mod validation;
14-
15-
use output::Output;
16-
use output_mode::OutputMode;
6+
use s2n_events::{Output, OutputMode, Result, parser, validation};
177

188
struct EventInfo<'a> {
199
input_path: &'a str,

tools/s2n-events/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
mod output;
5+
mod output_mode;
6+
7+
pub mod parser;
8+
pub mod validation;
9+
10+
pub use output::Output;
11+
pub use output_mode::OutputMode;
12+
13+
pub type Error = Box<dyn std::error::Error + Send + Sync>;
14+
pub type Result<T, E = Error> = core::result::Result<T, E>;

0 commit comments

Comments
 (0)