dtor
Global, no_std-compatible destructors for all platforms that run after main (like C/C++ __attribute__((destructor)))
1.0.6
45M downloads/mo
#1316 most downloaded on crates.io
mmastrac/linktime
What this package is like to depend on
Last release 14 days ago
09 Aug 2026
Release timing varies
gaps range from 1 weeks to 5 months
Some releases are documented
notes for 14 of 29 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
29 releases · first in 2024
21 releases in the last 12 months
see the full history below
Release timeline
29 releases · Feb 2024 to Aug 2026Releases
latest 29-
1.0.609 Aug 2026Release notes
Open source →What's Changed
- Bumped internal proc macro minimum version (should not result in any downstream visible changes)
- Document
crate_pathand re-exports by @mmastrac in #514
Full Changelog: dtor-1.0.5...dtor-1.0.6
Release notes
Open source →Changed
- Bump
linktime-proc-macrodependency to 0.2.3.
Documentation
- Documented the
crate_pathoverride for re-exporting the macro from another crate.
-
1.0.530 May 2026Release notes
Open source →Changed
- Bump
link-sectiondependency to 0.18.1. - Fixed WASM import module for
atexitto support Rust 1.96.
- Bump
-
1.0.428 May 2026Release notes
Open source →Changed
- Bump
link-sectiondependency to 0.18.0. - Improve error messages for bad attribute values.
- Bump
-
1.0.317 May 2026 -
1.0.209 May 2026Release notes
Open source →Added
- Support for UEFI targets (
.fini_arraymatching gnu-efi) - Fallback to
.fini_arrayfor unsupported targets (with a warning)
Changed
target_vendor = "pc"is nowtarget_os = "windows". This should be a strictly increasing set of support for windows targets.
- Support for UEFI targets (
-
1.0.107 May 2026Release notes
Open source →Changed
- OpenBSD support uses
method = at_module_exitrather thanmethod = linkerby default due to C library inconsistencies. When usingmethod = linker, thelink_sectionis now.dtorsrather than.fini_array. - Documentation improvements.
- OpenBSD support uses
-
1.0.004 May 2026Release notes
Open source →Changed
- Stabilized (yay!). Functionally identical to 0.14.1. Thanks to all the contributors who helped along the way! Please file any upgrade issues in https://github.com/mmastrac/linktime/issues.
- For those upgrading from earlier versions, the major changes for you to note
are:
#[dtor(unsafe)]is now required for#[dtor]items. If you are building a binary, you can useRUSTFLAGS="--cfg linktime_no_fail_on_missing_unsafe"(or alternatively, specify this in yourconfig.tomlfile) to bypass the error.- For those re-exporting
dtorfrom their own crates: thedtor::declarative::dtor!macro should be preferred over#[dtor(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/dtor/latest/dtor/declarative/macro.dtor.html for more details.
-
0.14.104 May 2026Release notes
Open source →Changed
wasm32-unknown-unknownwould run dtor items on each call of an exported function.
-
0.14.004 May 2026Release notes
Open source →Fixed
- WASM support now uses
atexiton all platforms (includingwasm32-unknown-unknown). - Typos and other documentation nits.
- WASM support now uses
-
0.13.102 May 2026 -
0.13.002 May 2026 -
0.12.030 Apr 2026Release notes
Open source →Added
- Support for
#[dtor]onimplitems. To be valid, thefnmust have noselfparameter and must not access any generic parameters from the outer item. - Added
life before maindocumentation to all crates.
Removed
- Removed support code for
ctor's deprecateddtormacros.
- Support for
-
0.11.028 Apr 2026Release notes
Open source →Added
- Added
methodattribute todtormacro. - Added
link_sectionandexport_name_prefixattributes todtormacro. - AIX support for
ctor/dtorcrates.
Changed
- Significant rewrite to ctor/dtor macros and documentation.
- Renamed
at_library_exittoat_module_exitindtorcrate. - Macro attributes and crate features are auto-documented.
Removed
cxa_atexitfeature fromdtorcrate. (appropriate method is now used per-platform)export_nativefeature fromdtorcrate. (natives always exported)
- Added
-
0.8.122 Apr 2026Release notes
Open source →Added
- Included licenses in all files.
- Bumped proc-macro dependency versions.
dtorcrate exportsnativemodule withat_binary_exitandat_library_exitfunctions.
Fixed
- Various hardening fixes under Miri.
-
0.7.013 Apr 2026Nothing published for this version
-
0.6.009 Apr 2026Nothing published for this version
-
0.5.008 Apr 2026Nothing published for this version
-
0.4.008 Apr 2026Nothing published for this version
-
0.3.028 Mar 2026Nothing published for this version
-
0.2.027 Mar 2026Nothing published for this version
-
0.1.103 Nov 2025Nothing published for this version
-
0.1.010 Aug 2025Nothing published for this version
-
0.0.727 Jul 2025Nothing published for this version
-
0.0.621 Apr 2025Nothing published for this version
-
0.0.509 Mar 2025Nothing published for this version
-
0.0.426 Feb 2025Nothing published for this version
-
0.0.218 Feb 2025Nothing published for this version
-
0.0.115 Feb 2025Nothing published for this version
-
0.0.027 Feb 2024Nothing published for this version