PackageTrack
Sign in Get early access

link-section

Link-time initialized slices for Rust, with full support for Linux, macOS, Windows, WASM and many more platforms.

0.19.3 6.1M downloads/mo #4114 most downloaded on crates.io mmastrac/linktime

What this package is like to depend on

Last release 14 days ago

09 Aug 2026

Ships on a steady schedule

a new release about every 1 weeks

Most releases are documented

notes for 19 of 31 stable releases

Nothing withdrawn

no release was ever pulled

4 months old

31 releases · first in 2026

31 releases in the last 12 months

see the full history below

Release timeline

31 releases · Mar 2026 to Aug 2026
Release Pre-release

Releases

latest 31
  1. 0.19.3 09 Aug 2026
    Release notes

    What's Changed

    Full Changelog: link-section-0.19.2...link-section-0.19.3

    Open source →
    Release notes

    Changed

    • Bump linktime-proc-macro dependency to 0.2.3 (consistent 64-bit hash chunks and cross-crate section-name fix).

    Documentation

    • Documented the crate_path override and surfaced the generated attribute reference (including crate_path) in the crate docs and README.

    Fixed

    • Fix cross-crate section-name error on Rust versions 1.88-1.94 (https://github.com/mmastrac/linktime/pull/509)
    • Fix undefined behavior on WASM when a const item is submitted to a reference section: the item's cell lacked the fix-up slot the section-wide layout expects, so materialisation read past the cell and could write through a garbage slot pointer (https://github.com/mmastrac/linktime/pull/511).
    Open source →
  2. 0.19.2 29 Jul 2026
    Release notes

    What's Changed

    • Bumped internal proc macro minimum version to pick up PR #495 (should not result in any downstream visible changes)

    Full Changelog: link-section-0.19.1...link-section-0.19.2

    Open source →
    Release notes

    Changed

    • Bump linktime-proc-macro dependency to 0.2.1 (makes link-section names more stable).
    Open source →
  3. 0.19.1 21 Jul 2026
    Release notes

    Fixed

    • Fix for semicolons accidentally inserted in WASM expression macro (generates a warning on nightly).
    Open source →
  4. 0.19.0 06 Jul 2026
    Release notes

    Fixed

    • WASM: item counts no longer collapse under fat LTO. Items are gathered through address-significant intrusive list nodes that survive LTO. Fixes #488.

    Changed

    • WASM: the read_custom_section host import is no longer required. Sections are gathered in-module via .init_array.0 submissions and an .init_array.1 finalizer; the #[ctor] priority contract is unchanged.
    • WASM: each item now lives in a single intrusive LinkCell<T> static (value plus trailing list metadata) instead of a separate value static and cell.

    Removed

    • Ref::as_ptr and MovableRef::as_ptr are now pub(crate). They exposed raw pointer plumbing that was never meant to be public API; use Deref (or offset_of for section-membership checks) instead. This is a breaking change.
    Open source →
  5. 0.18.3 23 Jun 2026
    Release notes

    Fixed

    • Windows/COFF: section start/end pointers are now opacified with black_box, fixing a miscompile where an optimizing (LTO) build could prove a gathered slice (e.g. ScatteredSlice<&'static T>) reads as all-zero and fold it to null values, crashing on use (0xC0000005). Fixes #479.
    Open source →
  6. 0.18.2 06 Jun 2026
    Release notes

    Changed

    • Empty sections are now automatically supported on all platforms other than AIX.
    Open source →
  7. 0.18.1 30 May 2026
    Release notes

    Changed

    • Fixed WASM import module for read_custom_section and atexit.
    Open source →
  8. 0.18.0 28 May 2026
    Release notes

    Changed

    • proc_macro feature is now required for any non-unsafe section.
    • Non-unsafe sections now generate a unique ID for the submission site which allows multiple sections to share the same identifier.
    Open source →
  9. 0.17.2 19 May 2026
    Release notes

    Changed

    • Fixed bug with submission of raw items to aux sections.
    Open source →
  10. 0.17.1 17 May 2026
    Release notes

    Added

    • MovableRef and Ref implement Debug and Display if the referenced type does.

    Changed

    • Deprecated reference module in favor of Ref from the crate root.
    Open source →
  11. 0.17.0 17 May 2026
    Release notes

    Added

    • reference sections support access both as a slice and as a reference at the submission site on all platforms (including WASM).
    • movable sections support reordering and back-reference updates during startup initialization (allowing a "reference" to an item that may move during initialization at the submission site).
    • typed and mutable sections have been split: typed allows for const and static items, while mutable allows for const items and as_mut_slice access.

    Changed

    • Bumped MSRV to 1.85.0.
    • Significant rewrite to link-section's internal implementation.
    • Sections require a type: #[section(typed)], #[section(untyped)], #[section(mutable)], #[section(movable)], or #[section(reference)].
    • When submitting a fn() with a body to a typed link section, the function's body is not placed in any specific section. To restore the previous behavior, manually split function pointers and bodies:
    #[section(untyped, aux(main = FN_ARRAY))]
    pub static FN_BODIES: link_section::Section;
    
    #[section(typed)]
    pub static FN_ARRAY: link_section::TypedSection<fn()>;
    
    #[in_section(FN_ARRAY)]
    const _: fn() = linked_function;
    
    #[in_section(FN_BODIES)]
    pub fn linked_function() {
        eprintln!("linked_function");
    }
    
    Open source →
  12. 0.16.1 11 May 2026
    Release notes

    Changed

    • Repair MSRV breakage for WASM targets.
    Open source →
  13. 0.16.0 09 May 2026
    Release notes

    Added

    • Support for AIX targets. Requires -C link-arg=-bdbg:namedsects:ss (or a recent Rust version that sets this automatically).
    Open source →
  14. 0.15.0 06 May 2026
    Release notes

    Added

    • Support for const items in link sections.
    • WASM now requires const items, and uses ctor-like initialization to copy data to a contiguous section. To access link-section slices in WASM in constructor functions, make sure to use priority = 1.
    • Zero-sized types are no longer used in externs. Windows now uses a non-zero-sized alignment marker to align the start and end of the section. Other LLVM/GCC platforms use a u8.
    • link-section is now no_std-compatible.
    Open source →
  15. 0.14.0 04 May 2026
    Release notes

    Changed

    • WASM targets now use an extern read_custom_section function to read custom sections.
    Open source →
  16. 0.13.1 02 May 2026
    Release notes

    Changed

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

    Changed

    • used_linker feature moved to --cfg linktime_used_linker flag.
    • On macOS, fn items are placed in a __TEXT,__text,regular,pure_instructions section (fixes a linker warning in nightly).
    Open source →
  18. 0.12.0 30 Apr 2026

    Nothing published for this version

  19. 0.11.0 28 Apr 2026
    Release notes

    Changed

    • Macro attributes and crate features are auto-documented.
    Open source →
  20. 0.2.1 22 Apr 2026
    Release notes

    Added

    • Included licenses in all files.
    • Bumped proc-macro dependency versions.

    Changed

    • link-section crate no longer offers const section pointers.
    Open source →
  21. 0.2.0 13 Apr 2026

    Nothing published for this version

  22. 0.0.12 09 Apr 2026

    Nothing published for this version

  23. 0.0.10 08 Apr 2026

    Nothing published for this version

  24. 0.0.9 08 Apr 2026

    Nothing published for this version

  25. 0.0.8 08 Apr 2026

    Nothing published for this version

  26. 0.0.7 07 Apr 2026

    Nothing published for this version

  27. 0.0.5 05 Apr 2026

    Nothing published for this version

  28. 0.0.4 05 Apr 2026

    Nothing published for this version

  29. 0.0.3 05 Apr 2026

    Nothing published for this version

  30. 0.0.2 04 Apr 2026

    Nothing published for this version

  31. 0.0.1 27 Mar 2026

    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