#cpu #target #conditional-compilation #macro #proc-macro #targeted #procedural

nightly macro target-cpu-macro

A procedural macro for conditional compilation based on the CPU being targeted

3 releases

0.1.3 Jan 29, 2021
0.1.2 Jan 29, 2021
0.1.1 Jul 24, 2020
0.1.0 Jul 2, 2020

#8 in #targeted

Download history 35/week @ 2023-12-17 23/week @ 2023-12-24 16/week @ 2023-12-31 35/week @ 2024-01-07 38/week @ 2024-01-14 33/week @ 2024-01-21 23/week @ 2024-01-28 23/week @ 2024-02-04 31/week @ 2024-02-11 52/week @ 2024-02-18 66/week @ 2024-02-25 47/week @ 2024-03-03 56/week @ 2024-03-10 80/week @ 2024-03-17 45/week @ 2024-03-24 98/week @ 2024-03-31

288 downloads per month
Used in ruduino

MIT license

9KB
107 lines

target-cpu-utils

A Rust library and associated macros for querying the target CPU from the active target specification JSON

Crates

Crate Name Description Directory crates.io API Documentation
target-cpu-fetch Core logic for fetching the target CPU fetch https://crates.io/crates/target-cpu-fetch https://docs.rs/target-cpu-fetch
target-cpu-macro Procedural macros relating to target CPU macro https://crates.io/crates/target-cpu-macro https://docs.rs/target-cpu-macro

lib.rs:

A crate used to query the current target CPU for a crate.

Provides macros for fetching the target CPU name, and custom attributes that can be used to conditionally enable code based on that CPU.

Uses the crate target-cpu-fetch to drive the logic.

Dependencies

~145KB