#json #targeted

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

#1458 in #json

Download history 76/week @ 2024-12-11 19/week @ 2024-12-18 19/week @ 2025-01-01 31/week @ 2025-01-08 60/week @ 2025-01-15 45/week @ 2025-01-22 33/week @ 2025-01-29 48/week @ 2025-02-05 44/week @ 2025-02-12 46/week @ 2025-02-19 56/week @ 2025-02-26 21/week @ 2025-03-05 58/week @ 2025-03-12 33/week @ 2025-03-19 35/week @ 2025-03-26

157 downloads per month
Used in ruduino

MIT license

9KB
107 lines

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.


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

Dependencies

~145KB