File tree 11 files changed +202
-100
lines changed
11 files changed +202
-100
lines changed Original file line number Diff line number Diff line change
1
+ name : Continuous integration
2
+
3
+ on : [push, pull_request]
4
+
5
+ env :
6
+ CARGO_TERM_COLOR : always
7
+
8
+ jobs :
9
+ check :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+ - uses : actions-rs/toolchain@v1
14
+ with :
15
+ profile : minimal
16
+ toolchain : nightly
17
+ override : true
18
+ - uses : actions-rs/cargo@v1
19
+ with :
20
+ command : check
21
+ args : --all-features
22
+
23
+ build :
24
+ runs-on : ubuntu-latest
25
+ steps :
26
+ - uses : actions/checkout@v3
27
+ - uses : actions-rs/toolchain@v1
28
+ with :
29
+ profile : minimal
30
+ toolchain : nightly
31
+ override : true
32
+ - uses : actions-rs/cargo@v1
33
+ with :
34
+ command : build
35
+ args : --all-features
36
+
37
+ test :
38
+ runs-on : ubuntu-latest
39
+ steps :
40
+ - uses : actions/checkout@v3
41
+ - uses : actions-rs/toolchain@v1
42
+ with :
43
+ profile : minimal
44
+ toolchain : nightly
45
+ override : true
46
+ - uses : actions-rs/cargo@v1
47
+ with :
48
+ command : test
49
+ args : --all-features
50
+
51
+ fmt :
52
+ runs-on : ubuntu-latest
53
+ steps :
54
+ - uses : actions/checkout@v3
55
+ - uses : actions-rs/toolchain@v1
56
+ with :
57
+ profile : minimal
58
+ toolchain : nightly
59
+ override : true
60
+ - run : rustup component add rustfmt
61
+ - uses : actions-rs/cargo@v1
62
+ with :
63
+ command : fmt
64
+ args : --all -- --check
65
+
66
+ clippy :
67
+ runs-on : ubuntu-latest
68
+ steps :
69
+ - uses : actions/checkout@v3
70
+ - uses : actions-rs/toolchain@v1
71
+ with :
72
+ profile : minimal
73
+ toolchain : nightly
74
+ override : true
75
+ - run : rustup component add clippy
76
+ - uses : actions-rs/cargo@v1
77
+ with :
78
+ command : clippy
79
+ args : -- -D -warnings
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " binator_network"
3
3
authors = [" Stargateur" ]
4
- version = " 0.0.0 "
4
+ version = " 0.0.1 "
5
5
description = " binator network"
6
6
license = " Zlib"
7
7
repository = " https://github.com/binator/network"
@@ -19,11 +19,7 @@ include = [
19
19
]
20
20
21
21
[dependencies ]
22
- binator_core = " 0.0.2"
23
- binator_utils = " 0.0.0"
24
- binator_base = " 0.0.0"
25
- binator_context = " 0.0.0"
26
- binator_number = " 0.0.0"
22
+ binator = " 0.3.0"
27
23
serde = { version = " 1.0" , optional = true , features = [" derive" ] }
28
24
const_format = { version = " 0.2" , features = [" const_generics" ] }
29
25
paste = " 1"
@@ -37,11 +33,7 @@ pretty_assertions = "1"
37
33
derive-new = " 0.5"
38
34
derive_more = " 0.99"
39
35
40
- binator_core = { version = " 0.0.2" , features = [" tracing" ]}
41
- binator_utils = { version = " 0.0.0" , features = [" tracing" ]}
42
- binator_base = { version = " 0.0.0" , features = [" tracing" ]}
43
- binator_context = { version = " 0.0.0" , features = [" tracing" ]}
44
- binator_number = { version = " 0.0.0" , features = [" tracing" ]}
36
+ binator = { version = " 0.3.0" , features = [" tracing" ]}
45
37
46
38
tracing = " 0.1"
47
39
tracing-subscriber = {version = " 0.3" , features = [" env-filter" , " fmt" ]}
Original file line number Diff line number Diff line change 1
- use binator_base:: octet;
2
- use binator_core:: {
1
+ use binator:: {
2
+ base:: octet,
3
+ utils:: {
4
+ Utils ,
5
+ UtilsAtom ,
6
+ } ,
3
7
Contexting ,
4
8
CoreAtom ,
5
9
Parse ,
6
10
Parsed ,
7
11
Streaming ,
8
12
} ;
9
- use binator_utils:: {
10
- Utils ,
11
- UtilsAtom ,
12
- } ;
13
13
14
14
use crate :: struct_variants;
15
15
@@ -128,8 +128,10 @@ where
128
128
129
129
#[ cfg( test) ]
130
130
mod tests {
131
- use binator_context:: Ignore ;
132
- use binator_core:: Parsed ;
131
+ use binator:: {
132
+ context:: Ignore ,
133
+ Parsed ,
134
+ } ;
133
135
134
136
use super :: EtherType ;
135
137
Original file line number Diff line number Diff line change 1
1
//! Handles parsing of Ethernet headers
2
2
3
- use binator_base:: octet;
4
- use binator_core:: {
3
+ use binator:: {
4
+ base:: octet,
5
+ utils:: {
6
+ Utils ,
7
+ UtilsAtom ,
8
+ } ,
5
9
Contexting ,
6
10
CoreAtom ,
7
11
Parse ,
8
12
Parsed ,
9
13
Streaming ,
10
14
Success ,
11
15
} ;
12
- use binator_utils:: {
13
- Utils ,
14
- UtilsAtom ,
15
- } ;
16
16
17
17
use crate :: ether_type:: {
18
18
ether_type,
94
94
95
95
#[ cfg( test) ]
96
96
mod tests {
97
- use binator_context:: Ignore ;
98
- use binator_core:: Parsed ;
97
+ use binator:: {
98
+ context:: Ignore ,
99
+ Parsed ,
100
+ } ;
99
101
100
102
use super :: {
101
103
EtherType ,
Original file line number Diff line number Diff line change @@ -8,10 +8,25 @@ use std::net::{
8
8
Ipv6Addr ,
9
9
} ;
10
10
11
- use binator_base:: * ;
12
- use binator_core:: * ;
13
- use binator_number:: * ;
14
- use binator_utils:: * ;
11
+ use binator:: {
12
+ base:: {
13
+ is,
14
+ to_digit,
15
+ uint_radix,
16
+ BaseAtom ,
17
+ IntRadixAtom ,
18
+ Radix ,
19
+ } ,
20
+ utils:: {
21
+ Utils ,
22
+ UtilsAtom ,
23
+ } ,
24
+ Contexting ,
25
+ CoreAtom ,
26
+ Parse ,
27
+ Parsed ,
28
+ Streaming ,
29
+ } ;
15
30
16
31
/// Atom of ip_addr parser
17
32
#[ derive( Debug , Clone , PartialEq , Eq ) ]
@@ -453,9 +468,11 @@ mod tests {
453
468
str:: FromStr ,
454
469
} ;
455
470
456
- use binator_base:: * ;
457
- use binator_context:: Tree ;
458
- use binator_core:: * ;
471
+ use binator:: {
472
+ base:: * ,
473
+ context:: Tree ,
474
+ * ,
475
+ } ;
459
476
use derive_more:: {
460
477
Display ,
461
478
From ,
Original file line number Diff line number Diff line change 1
1
//! Handles parsing of Internet Protocol fields (shared between ipv4 and ipv6)
2
2
3
- use binator_base:: octet;
4
- use binator_core:: {
3
+ use binator:: {
4
+ base:: octet,
5
+ utils:: Utils ,
5
6
Contexting ,
6
7
CoreAtom ,
7
8
Parse ,
8
9
Parsed ,
9
10
Streaming ,
10
11
} ;
11
- use binator_utils:: Utils ;
12
12
13
13
use crate :: struct_variants;
14
14
@@ -313,8 +313,10 @@ where
313
313
314
314
#[ cfg( test) ]
315
315
mod tests {
316
- use binator_context:: Ignore ;
317
- use binator_core:: Parsed ;
316
+ use binator:: {
317
+ context:: Ignore ,
318
+ Parsed ,
319
+ } ;
318
320
319
321
use super :: IPProtocol ;
320
322
Original file line number Diff line number Diff line change @@ -8,25 +8,25 @@ use std::{
8
8
net:: Ipv4Addr ,
9
9
} ;
10
10
11
- use binator_base:: {
12
- any,
13
- nbit,
14
- octet,
15
- NBit ,
16
- } ;
17
- use binator_core:: {
18
- Acc ,
11
+ use binator:: {
12
+ base:: {
13
+ any,
14
+ nbit,
15
+ octet,
16
+ NBit ,
17
+ } ,
18
+ utils:: {
19
+ Acc ,
20
+ Utils ,
21
+ UtilsAtom ,
22
+ } ,
19
23
Contexting ,
20
24
CoreAtom ,
21
25
Parse ,
22
26
Parsed ,
23
27
Streaming ,
24
28
Success ,
25
29
} ;
26
- use binator_utils:: {
27
- Utils ,
28
- UtilsAtom ,
29
- } ;
30
30
31
31
use crate :: ip_protocol:: {
32
32
self ,
@@ -274,8 +274,10 @@ where
274
274
mod tests {
275
275
use std:: net:: Ipv4Addr ;
276
276
277
- use binator_context:: Ignore ;
278
- use binator_core:: Parsed ;
277
+ use binator:: {
278
+ context:: Ignore ,
279
+ Parsed ,
280
+ } ;
279
281
280
282
use super :: {
281
283
IPProtocol ,
Original file line number Diff line number Diff line change @@ -8,23 +8,23 @@ use std::{
8
8
net:: Ipv6Addr ,
9
9
} ;
10
10
11
- use binator_base:: {
12
- nbit,
13
- octet,
14
- NBit ,
15
- } ;
16
- use binator_core:: {
11
+ use binator:: {
12
+ base:: {
13
+ nbit,
14
+ octet,
15
+ NBit ,
16
+ } ,
17
+ utils:: {
18
+ Utils ,
19
+ UtilsAtom ,
20
+ } ,
17
21
Contexting ,
18
22
CoreAtom ,
19
23
Parse ,
20
24
Parsed ,
21
25
Streaming ,
22
26
Success ,
23
27
} ;
24
- use binator_utils:: {
25
- Utils ,
26
- UtilsAtom ,
27
- } ;
28
28
29
29
use crate :: ip_protocol:: {
30
30
self ,
@@ -178,8 +178,10 @@ where
178
178
mod tests {
179
179
use std:: net:: Ipv6Addr ;
180
180
181
- use binator_context:: Ignore ;
182
- use binator_core:: Parsed ;
181
+ use binator:: {
182
+ context:: Ignore ,
183
+ Parsed ,
184
+ } ;
183
185
use pretty_assertions:: assert_eq;
184
186
185
187
use super :: {
Original file line number Diff line number Diff line change @@ -120,19 +120,19 @@ pub(crate) use struct_variants;
120
120
mod tests {
121
121
use core:: fmt:: Debug ;
122
122
123
- use binator_base:: {
124
- all,
125
- BaseAtom ,
126
- } ;
127
- use binator_context:: Tree ;
128
- use binator_core:: {
123
+ use binator:: {
124
+ base:: {
125
+ all,
126
+ BaseAtom ,
127
+ IntRadixAtom ,
128
+ } ,
129
+ context:: Tree ,
130
+ utils:: UtilsAtom ,
129
131
CoreAtom ,
130
132
Parse ,
131
133
Streaming ,
132
134
Success ,
133
135
} ;
134
- use binator_number:: IntRadixAtom ;
135
- use binator_utils:: UtilsAtom ;
136
136
use derive_more:: {
137
137
Display ,
138
138
From ,
You can’t perform that action at this time.
0 commit comments