Abstract over the atomicity of reference-counting pointers in rust

Overview

Build Status Code Coverage Dependency status crates.io Downloads Github stars Documentation License

Archery

Archery is a rust library that offers a way to abstraction over Rc and Arc smart pointers. This allows you to create data structures where the pointer type is parameterizable, so you can avoid the overhead of Arc when you don’t need to share data across threads.

In languages that supports higher-kinded polymorphism this would be simple to achieve without any library, but rust does not support that yet. To mimic higher-kinded polymorphism Archery implements the approach suggested by Joshua Liebow-Feeser in “Rust has higher kinded types already… sort of”. While other approaches exist, they seem to always offer poor ergonomics for the user.

Setup

To use Archery add the following to your Cargo.toml:

[dependencies]
archery = "<version>"

Using Archery

Archery defines a SharedPointer that receives the kind of pointer as a type parameter. This gives you a convenient and ergonomic way to abstract the pointer type away.

Example

Declare a data structure with the pointer kind as a type parameter bounded by SharedPointerKind:

use archery::*;

struct KeyValuePair<K, V, P: SharedPointerKind> {
    pub key: SharedPointer<K, P>,
    pub value: SharedPointer<V, P>,
}

impl<K, V, P: SharedPointerKind> KeyValuePair<K, V, P> {
    fn new(key: K, value: V) -> KeyValuePair<K, V, P> {
        KeyValuePair {
            key: SharedPointer::new(key),
            value: SharedPointer::new(value),
        }
    }
}

To use it just plug-in the kind of pointer you want:

let pair: KeyValuePair<_, _, RcK> =
    KeyValuePair::new("António Variações", 1944);

assert_eq!(*pair.value, 1944);

Limitations

Currently it is not possible to have unsized types inside a SharedPointer. As a workaround you can put the unsized type inside a Box.

Alternative approaches

An alternative to the approach taken by Archery is to use traits with associated types to encode type-level functions. This has been suggested multiple times, but offers ugly ergonomics (see here and here).

Comments
  • Add `as_ptr` impl (requires Rust 1.45+)

    Add `as_ptr` impl (requires Rust 1.45+)

    Hello!

    I was able to add this library to my project and enable awesome Rc/Arc configurability. This crate is a gem. 💯

    During implementation I had to add support for the Rc/Arc as_ptr functions added in Rust 1.45, so I'm hoping this contribution works for you too.

    Other recent Rc/Arc APIs I noticed are absent are pin and downgrade.

    opened by attackgoat 3
  • Update compiletest_rs requirement from 0.8.0 to 0.9.0

    Update compiletest_rs requirement from 0.8.0 to 0.9.0

    Updates the requirements on compiletest_rs to permit the latest version.

    Commits
    • 6bcae19 Release 0.9.0
    • 6b52ec9 Merge pull request #259 from smoelius/lock-coverage-files
    • 148297b Lock coverage files
    • d3282f8 Merge pull request #258 from Alexendoo/fixed-revision-filename
    • 843ecd9 Use the revision filename when compiling the rustfix output
    • 914f935 Update README.md
    • See full diff in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Update criterion requirement from 0.3.6 to 0.4.0

    Update criterion requirement from 0.3.6 to 0.4.0

    Updates the requirements on criterion to permit the latest version.

    Changelog

    Sourced from criterion's changelog.

    [0.4.0] - 2022-09-10

    Removed

    • The Criterion::can_plot function has been removed.
    • The Criterion::bench_function_over_inputs function has been removed.
    • The Criterion::bench_functions function has been removed.
    • The Criterion::bench function has been removed.

    Changed

    • HTML report hidden behind non-default feature flag: 'html_reports'
    • Standalone support (ie without cargo-criterion) feature flag: 'cargo_bench_support'
    • MSRV bumped to 1.57
    • rayon and plotters are optional (and default) dependencies.
    • Status messages ('warming up', 'analyzing', etc) are printed to stderr, benchmark results are printed to stdout.
    • Accept subsecond durations for --warm-up-time, --measurement-time and --profile-time.
    • Replaced serde_cbor with ciborium because the former is no longer maintained.
    • Upgrade clap to v3 and regex to v1.5.

    Added

    • A --discard-baseline flag for discarding rather than saving benchmark results.
    • Formal support for benchmarking code compiled to web-assembly.
    • A --quiet flag for printing just a single line per benchmark.
    • A Throughput::BytesDecimal option for measuring throughput in bytes but printing them using decimal units like kilobytes instead of binary units like kibibytes.

    Fixed

    • When using bench_with_input, the input parameter will now be passed through black_box before passing it to the benchmark.

    [0.3.6] - 2022-07-06

    Changed

    • MSRV bumped to 1.49
    • Symbol for microseconds changed from ASCII 'us' to unicode 'µs'
    • Documentation fixes
    • Clippy fixes

    [0.3.5] - 2021-07-26

    Fixed

    • Corrected Criterion.toml in the book.
    • Corrected configuration typo in the book.

    Changed

    • Bump plotters dependency to always include a bug-fix.
    • MSRV bumped to 1.46.

    ... (truncated)

    Commits
    • 5e27b69 Merge branch 'version-0.4'
    • 4d6d69a Increment version numbers.
    • 935c632 Add Throughput::BytesDecimal. Fixes #581.
    • f82ce59 Remove critcmp code (it belongs in cargo-criterion) (#610)
    • a18d080 Merge branch 'master' into version-0.4
    • f9c6b8d Merge pull request #608 from Cryptex-github/patch-1
    • 8d0224e Fix html report path
    • 2934163 Add missing black_box for bench_with_input parameters. Fixes 566.
    • dfd7b65 Add duplicated benchmark ID to assertion message.
    • ce8259e Bump criterion-plot version number.
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Update compiletest_rs requirement from 0.7.1 to 0.8.0

    Update compiletest_rs requirement from 0.7.1 to 0.8.0

    Updates the requirements on compiletest_rs to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Update pretty_assertions requirement from 0.7 to 1.0

    Update pretty_assertions requirement from 0.7 to 1.0

    Updates the requirements on pretty_assertions to permit the latest version.

    Release notes

    Sourced from pretty_assertions's releases.

    v1.0.0

    Note: As pretty_assertions has in practice had a stable API for several years, this feature release takes the opportunity to increment the version to 1.0.0 instead of 0.8.0. No breaking changes are expected.

    Removed

    • assert_ne no longer warns if values match using PartialEq but not with Debug. This was noted as no longer being necessary after Rust 1.25 (current MSRV 1.35.0)

    Added

    • Officially support no_std (thanks to @​Luro02 for the report and reviews!). Adds the std and alloc features to the pretty_assertions crate, with std enabled by default (#83, @​tommilligan)
    • Adds the unstable feature to the pretty_assertions crate, for use with nightly rustc (#81, @​tommilligan)
    • Add a drop in replacement for the unstable stdlib assert_matches macro, behind the unstable flag - thanks @​gilescope for the suggestion! (#81, @​tommilligan)
    Changelog

    Sourced from pretty_assertions's changelog.

    v1.0.0

    Removed

    • assert_ne no longer warns if values match using PartialEq but not with Debug. This was noted as no longer being necessary after Rust 1.25 (current MSRV 1.35.0)

    Added

    • Officially support no_std (thanks to @​Luro02 for the report and reviews!). Adds the std and alloc features to the pretty_assertions crate, with std enabled by default (#83, @​tommilligan)
    • Adds the unstable feature to the pretty_assertions crate, for use with nightly rustc (#81, @​tommilligan)
    • Add a drop in replacement for the unstable stdlib assert_matches macro, behind the unstable flag - thanks @​gilescope for the suggestion! (#81, @​tommilligan)

    v0.7.2

    v0.7.1

    • Fix a bug where multiline changes showed an unhelpful inline diff (#66, @​tommilligan)

    v0.7.0

    Changed

    • Move from difference to diff for calculating diffs. The exact assertion messages generated may differ from previous versions. (#52, @​tommilligan)

    For example, the following assertion message from v0.7.0:

    pretty assertion

    Was previously rendered like this in v0.6.1:

    pretty assertion

    Added

    • Support for unsized values (#42, @​stanislav-tkach)
    • Document the Comparison struct, which was previously hidden. This can be used to generate a pretty diff of two values without panicking. (#52, @​tommilligan)

    Fixed

    Internal

    Commits
    • 737c861 Merge pull request #83 from tommilligan/assert-eq-no-std
    • 659b66b chore: prepare for v1.0.0 release
    • 0a32464 feat: fix and test for no_std with alloc
    • 9ef3e0d Merge pull request #81 from tommilligan/assert-matches
    • d084599 chore: update tarpaulin version
    • 799d2b2 feature: add assert_matches as unstable feature
    • 55f9b7a Merge pull request #78 from tommilligan/test-macro-integrate
    • c45600c chore: make macro tests external
    • 9746ead Merge pull request #77 from tommilligan/fix-bench-std
    • a9ba6c2 bench: fix std comparison benchmarks
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update compiletest_rs requirement from 0.6 to 0.7

    Update compiletest_rs requirement from 0.6 to 0.7

    Updates the requirements on compiletest_rs to permit the latest version.

    Commits
    • 5eec29d Bump to 0.7.0
    • 9257f6d Merge pull request #241 from LykenSol/test-build-dir
    • 6b9fa4b Partially sync normalize_output to upstream, for $TEST_BUILD_DIR support.
    • 1f4a4c4 Merge pull request #240 from XAMPPRocky/spv-ext
    • 5c66648 Add handling for SPIR-V target
    • bc2ff25 Merge pull request #235 from jorendorff/dev
    • b1b405b Handle missing or empty DYLD_LIBRARY_PATH on Mac. Fixes #233.
    • See full diff in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update pretty_assertions requirement from 0.6 to 0.7

    Update pretty_assertions requirement from 0.6 to 0.7

    Updates the requirements on pretty_assertions to permit the latest version.

    Release notes

    Sourced from pretty_assertions's releases.

    v0.7.1

    Fixed

    • Fix a bug where multiline changes showed an unhelpful inline diff (#66, @​tommilligan)
    Changelog

    Sourced from pretty_assertions's changelog.

    v0.7.1

    • Fix a bug where multiline changes showed an unhelpful inline diff (#66, @​tommilligan)

    v0.7.0

    Changed

    • Move from difference to diff for calculating diffs. The exact assertion messages generated may differ from previous versions. (#52, @​tommilligan)

    For example, the following assertion message from v0.7.0:

    pretty assertion

    Was previously rendered like this in v0.6.1:

    pretty assertion

    Added

    • Support for unsized values (#42, @​stanislav-tkach)
    • Document the Comparison struct, which was previously hidden. This can be used to generate a pretty diff of two values without panicking. (#52, @​tommilligan)

    Fixed

    Internal

    Commits
    • 2667441 Merge pull request #68 from tommilligan/prep-v0.7.1
    • 6dde470 Merge pull request #67 from tommilligan/ci-revert-cargo-target-dir
    • b517e39 chore: prepare for v0.7.1
    • fdff5f3 Merge pull request #66 from tommilligan/chunk-diffing
    • 62e9357 Revert "ci: remove concern with CARGO_TARGET_DIR"
    • 8f7d7a5 printer: do not print inline diff for multiline insert/delete chunks
    • 083ce2e Merge pull request #65 from tommilligan/ci-rm-cargo-target-dir
    • 56a0aaa ci: remove concern with CARGO_TARGET_DIR
    • 7f6ae17 Merge pull request #63 from tommilligan/update-gitignore
    • ccb2e45 ci: update gitignore
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Update compiletest_rs requirement from 0.5 to 0.6

    Update compiletest_rs requirement from 0.5 to 0.6

    Updates the requirements on compiletest_rs to permit the latest version.

    Release notes

    Sourced from compiletest_rs's releases.

    v0.6.0

    This release adds:

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Update compiletest_rs requirement from 0.4 to 0.5

    Update compiletest_rs requirement from 0.4 to 0.5

    Updates the requirements on compiletest_rs to permit the latest version.

    Commits
    • a0155ea Bump to 0.5.0
    • 5f7578d Merge pull request #218 from laumann/fix-rustc-dev-reference
    • 4d129a6 rustc_dev was split into several crates, we use rustc_session
    • fcbbefe Merge pull request #217 from RalfJung/flags
    • a2e8292 sync with upstream
    • ef17d19 move -A unused further up in the CLI args
    • d0feade add '-A unused' before user-configured compile_flags
    • 246a708 Bump to v0.4.1
    • a6bddc8 Merge pull request #214 from laumann/fix-failing-test
    • 6fafb2f Update error message for new nightly
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Auto-derived `Clone` for something using `RcPointer` is unusable

    Auto-derived `Clone` for something using `RcPointer` is unusable

    Issue created for future reference.

    This is a rustc issue in the way Clone is derived.

    The problem is that

    #[derive(Clone)] 
    struct AThing<T, C: RcPointerKind> {
        field: RcPointer<C, T>,
    }
    

    expands to

    impl<T: Clone, C: Clone + RcPointerKind> Clone for AThing<T, C> { ... }
    

    which requires C to implement Clone. In practice it should only require the type of AThing::field to be implement Clone. See https://github.com/rust-lang/rust/issues/26925#issuecomment-380078922 for details.

    opened by orium 0
  • Make Arc optional

    Make Arc optional

    https://github.com/orium/archery/blob/49ba594bf19b92c912135c7c7e6dad37961c3867/src/shared_pointer/kind/arc/mod.rs#L8

    This won't compile under architecture that does not support atomic instructions such as riscv32imc-unknown-none-elf. But on a higher level of thoughts this means the entire Arc/ArcK should be disabled

    opened by stevefan1999-personal 0
  • Support for `static-rc` behind a feature flag

    Support for `static-rc` behind a feature flag

    Looking at the API of StaticRc and SharedPointerKind I think it would be possible to add support for static-rc behind a feature flag.

    What do you think?

    opened by teoxoy 0
Releases(v0.4.0)
  • v0.4.0(Aug 25, 2020)

  • v0.2.1(Jun 22, 2019)

  • v0.2.0(Jun 22, 2019)

    • Added some functionality to SharedPointer that you would expect from Rc/Arc.
      • Functions:
        • SharedPointer::try_unwrap().
        • SharedPointer::get_mut().
        • SharedPointer::strong_count().
        • SharedPointer::ptr_eq().
      • Traits:
        • Default.
        • From<T>.
        • From<Box<T>>.
        • std::fmt::Pointer.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Feb 25, 2019)

    • Initial release with SharedPointer, SharedPointerKind, SharedPointerKindRc, and SharedPointerKindArc.
      • Functionality exposed from the underlying pointers: deref(), make_mut(), clone().
    Source code(tar.gz)
    Source code(zip)
Owner
Diogo Sousa
Diogo Sousa
Rayon: A data parallelism library for Rust

Rayon Rayon is a data-parallelism library for Rust. It is extremely lightweight and makes it easy to convert a sequential computation into a parallel

null 7.8k Jan 7, 2023
Coroutine Library in Rust

coroutine-rs Coroutine library in Rust [dependencies] coroutine = "0.8" Usage Basic usage of Coroutine extern crate coroutine; use std::usize; use co

Rust中文社区 404 Dec 31, 2022
Coroutine I/O for Rust

Coroutine I/O Coroutine scheduling with work-stealing algorithm. WARN: Possibly crash because of TLS inline, check https://github.com/zonyitoo/coio-rs

ty 454 Dec 2, 2022
Cross-platform Rust wrappers for the USB ID Repository

usb-ids Cross-platform Rust wrappers for the USB ID Repository. This library bundles the USB ID database, allowing platforms other than Linux to query

William Woodruff 18 Dec 14, 2022
Rust Ethereum 2.0 Client

Lighthouse: Ethereum 2.0 An open-source Ethereum 2.0 client, written in Rust and maintained by Sigma Prime. Documentation Overview Lighthouse is: Read

Sigma Prime 2.1k Jan 6, 2023
Rust Parallel Iterator With Output Sequential Consistency

par_iter_sync: Parallel Iterator With Sequential Output Crate like rayon do not offer synchronization mechanism. This crate provides easy mixture of p

Congyu 1 Oct 30, 2021
Implementação de uma Skip List em Rust

SkipList SkipList é uma estrutura descrita em 1989 por William Pugh que se baseia em balancear de forma probabilística atalhos de um item a outro com

Rodrigo Crispim 3 Apr 27, 2022
RcLite: small, fast, and memory-friendly reference counting for Rust

RcLite: small, fast, and memory-friendly reference counting RcLite is a lightweight reference-counting solution for Rust that serves as an alternative

Khashayar Fereidani 147 Apr 14, 2023
Twinsies is a specialized reference-counting pointer where the item is jointly owned in 2 places

twinsies Twinsies is a special shared pointer, similar to an Arc, where two specific objects (called [Joint]) share joint ownership of the underlying

Nathan West 17 Feb 1, 2023
A number of collections, such as linked-lists, binary-trees, or B-Trees are most easily implemented with aliasing pointers.

StaticRc is a safe reference-counted pointer, similar to Rc or Arc, though performing its reference-counting at compile-time rather than run-time, and

null 372 Dec 19, 2022
Ointers is a library for representing pointers where some bits have been stolen so that they may be used by the programmer for something else

Ointers is a library for representing pointers where some bits have been stolen so that they may be used by the programmer for something else. In effect, it's a small amount of free storage

Irrustible 8 Jun 4, 2022
Avoid double indirection in nested smart pointers.

Pierce Avoid double indirection in nested smart pointers. The Pierce stuct allows you to cache the deref result of doubly-nested smart pointers. Quick

null 11 Jan 12, 2022
A simple library with just one struct which is used to wrap around pointers

A simple library with just one struct which is used to wrap around pointers. This can be used to create pointers and share them across threads without the hassle of synchronization if you really do not care about that.

null 1 Apr 11, 2022
Jsonptr - Data structures and logic for resolving, assigning, and deleting by JSON Pointers

jsonptr - JSON Pointers for Rust Data structures and logic for resolving, assigning, and deleting by JSON Pointers (RFC 6901). Usage Resolve JSON Poin

Chance 38 Aug 28, 2022
HP++: A Hazard Pointers Extension for Better Applicability

HP++: A Hazard Pointers Extension for Better Applicability This is an implementation of HP++, a safe memory reclamation scheme proposed in Jaehwang Ju

KAIST Concurrency & Parallelism Laboratory 3 May 10, 2023
Thread-safe cell based on atomic pointers to externally stored data

Simple thread-safe cell PtrCell is an atomic cell type that allows safe, concurrent access to shared data. No std, no data races, no nasal demons (UB)

Nikolay Levkovsky 3 Mar 23, 2024
notiflux - subscribe over WebSockets, publish over REST

notiflux notiflux is a pub/sub server where clients subscribe over a WebSocket and messages are broadcast over a POST request How does it work? Client

Axel Örn Sigurðsson 3 Apr 9, 2024
Rust mid-level IR Abstract Interpreter

MIRAI MIRAI is an abstract interpreter for the Rust compiler's mid-level intermediate representation (MIR). It is intended to become a widely used sta

Facebook Experimental 793 Jan 2, 2023
a simple compiled language i made in rust. it uses intermediate representation (IR) instead of an abstract syntax tree (AST).

a simple compiled language i made in rust. it uses intermediate representation (IR) instead of an abstract syntax tree (AST).

null 4 Oct 3, 2022
A fast, multi-threaded line counting utility written in Rust.

xloc A fast, multi-threaded line counting utility written in Rust. What is xloc A drop in replacement for bash's wc -l. Your project has x lines of co

null 1 Nov 15, 2021