Skip to content

Commit c4d1d6d

Browse files
committed
feat: compile with no enabled features
1 parent 3c4f541 commit c4d1d6d

File tree

2 files changed

+61
-2
lines changed

2 files changed

+61
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020
- name: Run tests
21-
run: cargo test --verbose --all-features
21+
run: cargo test --all-targets --verbose --all-features
22+
- name: Run no features
23+
run: cargo test --all-targets --verbose --no-default-features
2224

2325
deny:
2426
runs-on: ubuntu-24.04

midi2/src/lib.rs

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,73 @@ pub mod utility;
2727
pub mod buffer;
2828
pub mod error;
2929

30-
mod detail;
30+
#[cfg(any(
31+
feature = "channel-voice1",
32+
feature = "channel-voice2",
33+
feature = "ci",
34+
feature = "flex-data",
35+
feature = "sysex7",
36+
feature = "sysex8",
37+
feature = "system-common",
38+
feature = "ump-stream",
39+
feature = "utility"
40+
))]
3141
mod message;
42+
#[cfg(any(
43+
feature = "channel-voice1",
44+
feature = "channel-voice2",
45+
feature = "ci",
46+
feature = "flex-data",
47+
feature = "sysex7",
48+
feature = "sysex8",
49+
feature = "system-common",
50+
feature = "ump-stream",
51+
feature = "utility"
52+
))]
3253
mod packet;
54+
#[cfg(any(
55+
feature = "channel-voice1",
56+
feature = "channel-voice2",
57+
feature = "ci",
58+
feature = "flex-data",
59+
feature = "sysex7",
60+
feature = "sysex8",
61+
feature = "system-common",
62+
feature = "ump-stream",
63+
feature = "utility"
64+
))]
3365
mod packets;
66+
67+
mod detail;
3468
mod traits;
3569

3670
pub use ux;
3771

72+
#[cfg(any(
73+
feature = "channel-voice1",
74+
feature = "channel-voice2",
75+
feature = "ci",
76+
feature = "flex-data",
77+
feature = "sysex7",
78+
feature = "sysex8",
79+
feature = "system-common",
80+
feature = "ump-stream",
81+
feature = "utility"
82+
))]
3883
pub use message::*;
84+
#[cfg(any(
85+
feature = "channel-voice1",
86+
feature = "channel-voice2",
87+
feature = "ci",
88+
feature = "flex-data",
89+
feature = "sysex7",
90+
feature = "sysex8",
91+
feature = "system-common",
92+
feature = "ump-stream",
93+
feature = "utility"
94+
))]
3995
pub use packets::*;
96+
4097
pub use traits::*;
4198

4299
pub mod num {

0 commit comments

Comments
 (0)