#rc #intrusive #smart-pointers #arc #no-std

no-std tiptoe

An easy-to-support intrusively reference-counting smart pointer

2 releases

0.0.2 Nov 12, 2021
0.0.1 Nov 8, 2021

#2402 in Rust patterns

Download history 2/week @ 2024-01-03 25/week @ 2024-01-10 109/week @ 2024-01-17 3/week @ 2024-02-14 12/week @ 2024-02-21 51/week @ 2024-02-28 16/week @ 2024-03-06 32/week @ 2024-03-13 31/week @ 2024-03-20 16/week @ 2024-03-27 39/week @ 2024-04-03 103/week @ 2024-04-10 16/week @ 2024-04-17

174 downloads per month


600 lines


Lib.rs Crates.io Docs.rs

Rust 1.51 CI Crates.io - License

GitHub open issues open pull requests good first issues

crev reviews Zulip Chat

An easy-to-support intrusively reference-counting smart pointer.


Please use cargo-edit to always add the latest version of this library:

cargo add tiptoe --features sync



Enables the [Arc] type, which requires AtomicUsize.


use pin_project::pin_project;
use tiptoe::{IntrusivelyCountable, TipToe};

// All attributes optional.
#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct A {
    ref_counter: TipToe,

unsafe impl IntrusivelyCountable for A {
    type RefCounter = TipToe;

    fn ref_counter(&self) -> &Self::RefCounter {

fn main() {
    #[cfg(feature = "sync")]
        use tiptoe::Arc;

        let arc = Arc::new(A::default());
        let inner_ref: &A = &arc;

        let another_arc = unsafe {

Implementation Progress

This library is currently only implemented about as far as I need it for rhizome.

Please have a look at the issues if you'd like to help out.

Notable current omissions: Rc, Weak, and most optimisation that doesn't affect the API.


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

See CONTRIBUTING for more information.

Code of Conduct



tiptoe strictly follows Semantic Versioning 2.0.0 with the following exceptions:

  • The minor version will not reset to 0 on major version changes (except for v1).
    Consider it the global feature level.
  • The patch version will not reset to 0 on major or minor version changes (except for v0.1 and v1).
    Consider it the global patch level.

This includes the Rust version requirement specified above.
Earlier Rust versions may be compatible, but this can change with minor or patch releases.

Which versions are affected by features and patches can be determined from the respective headings in CHANGELOG.md.

Note that dependencies of this crate may have a more lenient MSRV policy! Please use cargo +nightly update -Z minimal-versions in your automation if you don't generate Cargo.lock manually (or as necessary) and require support for a compiler older than current stable.