NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #543 most downloaded on crates.io
Global, no_std-compatible constructors for all platforms that run before main (like C/C++ __attribute__((constructor)))
Last release 1 months ago
09 Aug 2026
Release timing varies
gaps range from 8 days to 4 months
Some releases are documented
notes for 20 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
79 releases · first in 2018
Bumped internal proc macro minimum version to pick up consistent 64-bit hash chunks ( #508 ) and the cross-crate section-name fix ( #509 ) (should not
crate_path and re-exports by @mmastrac in #514Full Changelog: ctor-1.0.12...ctor-1.0.13
linktime-proc-macro dependency to 0.2.3 (consistent 64-bit hash chunks
and cross-crate section-name fix).crate_path override for re-exporting the macro from another
crate.One column per quarter.
Bump linktime-proc-macro dependency to 0.2.1 (makes link-section names more stable).
linktime-proc-macro dependency to 0.2.1 (makes link-section names more stable).Pointer-align the priority ctor anchor on Apple platforms (#502).
Faster atomics and #[cold] for Static::deref initialization (@yvt PR #501)
Static::deref initialization (@yvt PR #501)Ensure the single executing priority ctor is kept alive on Apple platforms (#496).
Bump link-section dependency to 0.19.0.
link-section dependency to 0.19.0.Bump link-section dependency to 0.18.0.
link-section dependency to 0.18.0.Bump link-section dependency to 0.17.0.
link-section dependency to 0.17.0.priority feature is enabled), otherwise remains at
1.60.0.
ctor = { version = "1.0.6", default-features = false, features = ["proc_macro", "std"] } in your Cargo.toml.#[ctor] requires significantly less macro recursion.Repair MSRV breakage for WASM targets.
Support for win7, uwp and other windows targets
.init_array matching gnu-efi).init_array for unsupported targets (with a warning)target_vendor = "pc" is now target_os = "windows". This should be a
strictly increasing set of support for windows targets.A default priority value is now supported and is the default. This is equivalent to a priority of 500 on most platforms. The previous priority default
default priority value is now supported and is the default. This is
equivalent to a priority of 500 on most platforms. The previous priority
default of 0 was unsafe for C library access on some platforms.early priority value is now equivalent to a priority of 101 on most platforms.Bump link-section dependency to 0.15.0.
link-section dependency to 0.15.0.const rather than static items for collected constructors on macOS.&'static for #[ctor] statics which desugar to
&'static Static.Display directly as well.#[ctor] items in a single #[ctor] block:#[ctor]
static CTOR: &[fn()] = const {
// ...
}
wasm32-unknown-unknown would run ctor items on each call of an exported function.
wasm32-unknown-unknown would run ctor items on each call of an exported
function.Stabilized (yay!). Identical to 0.13.1. Thanks to all the contributors who helped along the way! Please file any upgrade issues in .
dtor was split into the dtor crate. You'll need to add it to your
dependencies like so:[dependencies]
dtor = "1.0.0" # or later
#[ctor(unsafe)] is now required for #[ctor] items. If you are building a
binary, you can use RUSTFLAGS="--cfg linktime_no_fail_on_missing_unsafe"
(or alternatively, specify this in your config.toml file) to bypass the
error.ctor from their own crates: the
ctor::declarative::ctor! macro should be preferred over
#[ctor(crate_path = ...)]. The latter form will continue to work, but
the declarative macro is far more stable for most use cases. See
https://docs.rs/ctor/latest/ctor/declarative/macro.ctor.html for more
details.Crate examples were reorganized.
--cfg flags were incorrect).unsafe is now required for #[ctor] items and the no_warn_on_missing_unsafe feature is gone.
#[ctor(priority = naked)] is now #[ctor(naked)].unsafe is now required for #[ctor] items and the
no_warn_on_missing_unsafe feature is gone.
RUSTFLAGS="--cfg linktime_no_fail_on_missing_unsafe" can bypass the error.used_linker feature moved to --cfg linktime_used_linker flag.#[ctor] items (supported for Linux/Android/FreeBSD/Apple).Deprecated dtor feature and crate dependency from ctor crate (use the dtor crate directly).
#[ctor] on impl items. To be valid, the fn must have no
self parameter and must not access any generic parameters from the outer
item.life before main documentation to all crates.early and late priority values are now supported on all platforms.dtor feature and crate dependency from ctor crate (use the
dtor crate directly).priority feature is enabled, ctor priority sorting is now stable
and consistent across platforms: early/0/unspecified, then 1 <= N < 1000, then late.link_section or export_name_prefix is specified, a priority value
must not be specified (now a compiler error).linktime-proc-macro crate for proc-macro support.Deprecated dtor macros in favor of the dtor crate.
dtor macros in favor of the dtor crate.linktime-proc-macro crate for proc-macro support.dtor references in ctor docs.AIX support for ctor/dtor crates.
ctor/dtor crates.statics code in ctor to not require std.Included licenses in all files.
ctors accidentally enabled the anonymous flag.ctor exports all dtor macros from dtor crate rather than reimplementing them.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →