Skip to content

Commit b4d7d0f

Browse files
Integrate rustfmt to generator (#9)
### Context This PR follows the recommendation in Zulip of doing what `ash` does: ash-rs/ash#735 Zulip thread: [#rust > A plan for SIMD @ 💬](https://xi.zulipchat.com/#narrow/channel/255911-rust/topic/A.20plan.20for.20SIMD/near/524498629) ### Changes The first commit contains the logic changes to the CLI. The second commit contains `rustfmt`. - Added the missing `wasm` module such that running the CLI with no arguments regenerates WASM. - Added some documentation to the CLI and piped through `rustfmt`. - Ran the generator (getting formatted output). - Formatted the entire codebase. ### Test plan Manually ran CLI. No logic changes in the generator (just formatting).
1 parent e46bcfd commit b4d7d0f

File tree

11 files changed

+684
-984
lines changed

11 files changed

+684
-984
lines changed

fearless_simd/src/core_arch/fallback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ impl Fallback {
1313
pub fn new() -> Self {
1414
Self { _private: () }
1515
}
16-
}
16+
}

fearless_simd/src/core_arch/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
#[cfg(target_arch = "aarch64")]
77
pub mod aarch64;
88

9+
pub mod fallback;
910
#[cfg(target_arch = "x86_64")]
1011
pub mod x86_64;
11-
pub mod fallback;

fearless_simd/src/generated.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
//!
66
//! All files in this subdirectory are autogenerated by the `fearless_simd_gen` crate.
77
8+
mod fallback;
89
#[cfg(all(feature = "std", target_arch = "aarch64"))]
910
mod neon;
10-
#[cfg(target_arch = "wasm32")]
11-
mod wasm;
12-
mod fallback;
1311
mod ops;
1412
mod simd_trait;
1513
mod simd_types;
14+
#[cfg(target_arch = "wasm32")]
15+
mod wasm;
1616

17+
pub use fallback::*;
1718
#[cfg(all(feature = "std", target_arch = "aarch64"))]
1819
pub use neon::*;
19-
#[cfg(target_arch = "wasm32")]
20-
pub use wasm::*;
21-
pub use fallback::*;
2220
pub use simd_trait::*;
2321
pub use simd_types::*;
22+
#[cfg(target_arch = "wasm32")]
23+
pub use wasm::*;

0 commit comments

Comments
 (0)