Sign in

Radar · Rust · Archive · Week 12 · Mar 16 – 22, 2026

Add `#[export_ordinal(n)]` attribute

Worth knowinglanguage

What changed
Adds an attribute that allows specifying the ordinal of an exported function when creating cdylibs on Windows.
Production impact
The source does not say.
Try it
Add #[unsafe(export_ordinal(1))] to an extern "C" function and build a cdylib to see the ordinal in the generated DLL.
Source
github.com/rust-lang/rfcs/pull/3641

Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed