9 releases

new 0.22.1 Feb 20, 2025
0.22.1-rc.1 Feb 19, 2025
0.21.0 Dec 18, 2024

#452 in Concurrency

Download history 31/week @ 2024-12-11 740/week @ 2024-12-18 342/week @ 2024-12-25 493/week @ 2025-01-01 1621/week @ 2025-01-08 2163/week @ 2025-01-15 1368/week @ 2025-01-22 2811/week @ 2025-01-29 2133/week @ 2025-02-05 980/week @ 2025-02-12

7,439 downloads per month
Used in 27 crates (4 directly)

MIT/Apache

12KB

re_capabilities

Part of the rerun family of crates.

Latest version Documentation MIT Apache

Specifies capability tokens, required by different parts of the code base. These are tokens passed down the call tree, to explicitly allow different capabilities in different parts of the code base.


lib.rs:

Specifies capability tokens, required by different parts of the code base. These are tokens passed down the call tree, to explicitly allow different capabilities in different parts of the code base.

For instance, the MainThreadToken is taken by argument in functions that needs to run on the main thread. By requiring this token, you guarantee at compile-time that the function is only called on the main thread.

All capability tokens should be created in the top-level of the call tree, (i.e. in fn main) and passed down to all functions that require it. That way you can be certain in what an area of code is allowed to do.

See cap-std for another capability-centric crate.

Feature flags

Dependencies

~0.2–6.5MB
~36K SLoC