Handling target features

⚓ Rust    📅 2025-12-09    👤 surdeus    👁️ 3      

surdeus

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Handling target features

i have a function with #[target_feature(enable = "neon")] is there any way to have something like

#[target_feature(enable = "neon")]
my_function()//neon impl
#[not(target_feature(enable = "neon"))]
my_function()//non neon impl

or do i actually always need a wrapper function that checks if neon is present?

3 posts - 2 participants

Read full topic

🏷️ Rust_feed