cargo / ctor
ctor
What changed in ctor 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
2 breaking1 security2 new APIs and options1 performance1 behavior and defaults7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initctor 114 changes
Breaking changes 2
The MSRV is now 1.85.0 when the priority feature is enabled; otherwise it remains 1.60.0. Disabling default features and enabling proc_macro and std restores the 1.60.0 MSRV.
WebAssembly now meets the minimum supported Rust version of 1.85.
Security 1
Fixes unsafe C library access with the default priority value.
New APIs and options 2
UEFI targets are supported; run constructors via ctor::run_constructors.
A const block can initialize a set of ctors, including optional ctors generated by a const function.
Performance 1
The #[ctor] macro requires significantly less macro recursion.
Behavior and default changes 1
Adds UEFI support using .init_array.
Fixes and other changes 7
Generated startup constructors dereference reference statics twice so Static::deref runs before main.
Apple-platform staticlibs now always keep the primary priority ctor.
Error messages for bad attributes are better.
Falls back to .init_array on unsupported platforms.
Uses target_os=windows rather than target_vendor=pc for Windows detection.
Static ctors support various forms of &'static.
Fixed duplicated ctor calls in WASM.