PackageTrack
Sign in Get early access

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 2026
2025 2026
Release Pre-release

Releases

latest 29
  1. 1.0.6 09 Aug 2026
    Release notes

    What's Changed

    • Bumped internal proc macro minimum version (should not result in any downstream visible changes)
    • Document crate_path and re-exports by @mmastrac in #514

    Full Changelog: dtor-1.0.5...dtor-1.0.6

    Open source →
    Release notes

    Changed

    • Bump linktime-proc-macro dependency to 0.2.3.

    Documentation

    • Documented the crate_path override for re-exporting the macro from another crate.
    Open source →
  2. 1.0.5 30 May 2026
    Release notes

    Changed

    • Bump link-section dependency to 0.18.1.
    • Fixed WASM import module for atexit to support Rust 1.96.
    Open source →
  3. 1.0.4 28 May 2026
    Release notes

    Changed

    • Bump link-section dependency to 0.18.0.
    • Improve error messages for bad attribute values.
    Open source →
  4. 1.0.3 17 May 2026
    Release notes

    Fixed

    • #[dtor] requires significantly less macro recursion.
    Open source →
  5. 1.0.2 09 May 2026
    Release notes

    Added

    • Support for UEFI targets (.fini_array matching gnu-efi)
    • Fallback to .fini_array for unsupported targets (with a warning)

    Changed

    • target_vendor = "pc" is now target_os = "windows". This should be a strictly increasing set of support for windows targets.
    Open source →
  6. 1.0.1 07 May 2026
    Release notes

    Changed

    • OpenBSD support uses method = at_module_exit rather than method = linker by default due to C library inconsistencies. When using method = linker, the link_section is now .dtors rather than .fini_array.
    • Documentation improvements.
    Open source →
  7. 1.0.0 04 May 2026
    Release notes

    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 use RUSTFLAGS="--cfg linktime_no_fail_on_missing_unsafe" (or alternatively, specify this in your config.toml file) to bypass the error.
      • For those re-exporting dtor from their own crates: the dtor::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.
    Open source →
  8. 0.14.1 04 May 2026
    Release notes

    Changed

    • wasm32-unknown-unknown would run dtor items on each call of an exported function.
    Open source →
  9. 0.14.0 04 May 2026
    Release notes

    Fixed

    • WASM support now uses atexit on all platforms (including wasm32-unknown-unknown).
    • Typos and other documentation nits.
    Open source →
  10. 0.13.1 02 May 2026
    Release notes

    Changed

    • Documentation polish and typo fixes.
    Open source →
  11. 0.13.0 02 May 2026
    Release notes

    Changed

    • used_linker feature moved to --cfg linktime_used_linker flag.
    Open source →
  12. 0.12.0 30 Apr 2026
    Release notes

    Added

    • Support for #[dtor] on impl items. To be valid, the fn must have no self parameter and must not access any generic parameters from the outer item.
    • Added life before main documentation to all crates.

    Removed

    • Removed support code for ctor's deprecated dtor macros.
    Open source →
  13. 0.11.0 28 Apr 2026
    Release notes

    Added

    • Added method attribute to dtor macro.
    • Added link_section and export_name_prefix attributes to dtor macro.
    • AIX support for ctor/dtor crates.

    Changed

    • Significant rewrite to ctor/dtor macros and documentation.
    • Renamed at_library_exit to at_module_exit in dtor crate.
    • Macro attributes and crate features are auto-documented.

    Removed

    • cxa_atexit feature from dtor crate. (appropriate method is now used per-platform)
    • export_native feature from dtor crate. (natives always exported)
    Open source →
  14. 0.8.1 22 Apr 2026
    Release notes

    Added

    • Included licenses in all files.
    • Bumped proc-macro dependency versions.
    • dtor crate exports native module with at_binary_exit and at_library_exit functions.

    Fixed

    • Various hardening fixes under Miri.
    Open source →
  15. 0.7.0 13 Apr 2026

    Nothing published for this version

  16. 0.6.0 09 Apr 2026

    Nothing published for this version

  17. 0.5.0 08 Apr 2026

    Nothing published for this version

  18. 0.4.0 08 Apr 2026

    Nothing published for this version

  19. 0.3.0 28 Mar 2026

    Nothing published for this version

  20. 0.2.0 27 Mar 2026

    Nothing published for this version

  21. 0.1.1 03 Nov 2025

    Nothing published for this version

  22. 0.1.0 10 Aug 2025

    Nothing published for this version

  23. 0.0.7 27 Jul 2025

    Nothing published for this version

  24. 0.0.6 21 Apr 2025

    Nothing published for this version

  25. 0.0.5 09 Mar 2025

    Nothing published for this version

  26. 0.0.4 26 Feb 2025

    Nothing published for this version

  27. 0.0.2 18 Feb 2025

    Nothing published for this version

  28. 0.0.1 15 Feb 2025

    Nothing published for this version

  29. 0.0.0 27 Feb 2024

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive