Skip to main content

Opts

Derive Macro Opts 

#[derive(Opts)]
{
    // Attributes available to this derive:
    #[opts]
}
Expand description

The derive that lets a field of the loader’s options carry #[opts(no_bpf)]: an option that only the loader uses, for which opts!() declares no tunable on the BPF side.

ⓘ
#[derive(clap::Args, scx_rustsched_macros::Opts)]
struct Opts {
    /// Scheduling slice duration in microseconds.
    #[clap(short = 's', long, default_value = "5000")]
    slice_us: u64,

    /// Treat every CPU as having the same capacity.
    #[opts(no_bpf)]
    #[clap(long)]
    uniform_capacity: bool,
}

It generates nothing: the marker is read by opts!(), from the source.