A simple thread schedule and priority library for rust

Overview

thread-priority

CI Crates Docs MIT licensed

A simple library to control thread schedule policies and thread priority.

If your operating system isn't yet supported, please, create an issue.

Minimal Rust Compiler Version

Is 1.46. If you need any help making it possible to compile with 1.36 please reach out.

Supported platforms

  • Linux
  • DragonFly
  • FreeBSD
  • OpenBSD
  • NetBSD
  • macOS
  • Windows

Examples

Minimal cross-platform examples

Setting current thread's priority to minimum:

use thread_priority::*;

fn main() {
    assert!(set_current_thread_priority(ThreadPriority::Min).is_ok());
}

The same as above but using a specific value:

use thread_priority::*;
use std::convert::TryInto;

fn main() {
    // The lower the number the lower the priority.
    assert!(set_current_thread_priority(ThreadPriority::Crossplatform(0.try_into().unwrap())).is_ok());
}

Windows-specific examples

Set the thread priority to the lowest possible value:

use thread_priority::*;

fn main() {
    // The lower the number the lower the priority.
    assert!(set_current_thread_priority(ThreadPriority::Os(WinAPIThreadPriority::Lowest.into())).is_ok());
}

Set the ideal processor for the new thread:

use thread_priority::*;

fn main() {
    std::thread::spawn(|| {
        set_thread_ideal_processor(thread_native_id(), 0);
        println!("Hello world!");
    });
}

Building a thread using the ThreadBuilderExt trait

use thread_priority::*;
use thread_priority::ThreadBuilderExt;

let thread = std::thread::Builder::new()
    .name("MyNewThread".to_owned())
    .spawn_with_priority(ThreadPriority::Max, |result| {
        // This is printed out from within the spawned thread.
        println!("Set priority result: {:?}", result);
        assert!(result.is_ok());
}).unwrap();
thread.join();

Building a thread using the ThreadBuilder.

use thread_priority::*;

let thread = ThreadBuilder::default()
    .name("MyThread")
    .priority(ThreadPriority::Max)
    .spawn(|result| {
        // This is printed out from within the spawned thread.
        println!("Set priority result: {:?}", result);
        assert!(result.is_ok());
}).unwrap();
thread.join();

// Another example where we don't care about the priority having been set.
let thread = ThreadBuilder::default()
    .name("MyThread")
    .priority(ThreadPriority::Max)
    .spawn_careless(|| {
        // This is printed out from within the spawned thread.
        println!("We don't care about the priority result.");
}).unwrap();
thread.join();

Using ThreadExt trait on the current thread

use thread_priority::*;

assert!(std::thread::current().get_priority().is_ok());
println!("This thread's native id is: {:?}", std::thread::current().get_native_id());

License

This project is licensed under the MIT license.

Comments
  • Build fails on OpenBSD

    Build fails on OpenBSD

    OpenBSD is listed as a supported platforms, but it fails to build on it.

    Here is error log. It seems that libc crate doesn't have these structs and functions on openbsd.

       Compiling thread-priority v0.8.0
    error[E0412]: cannot find type `sched_param` in crate `libc`
      --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.0/src/unix.rs:63:34
       |
    63 |     fn into_posix(self) -> libc::sched_param {
       |                                  ^^^^^^^^^^^ not found in `libc`
    
    error[E0412]: cannot find type `sched_param` in crate `libc`
      --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.0/src/unix.rs:64:54
       |
    64 |         let mut param = unsafe { MaybeUninit::<libc::sched_param>::zeroed().assume_init() };
       |                                                      ^^^^^^^^^^^ not found in `libc`
    
    error[E0412]: cannot find type `sched_param` in crate `libc`
      --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.0/src/unix.rs:69:38
       |
    69 |     fn from_posix(sched_param: libc::sched_param) -> Self {
       |                                      ^^^^^^^^^^^ not found in `libc`
    
    error[E0425]: cannot find function `__errno_location` in crate `libc`
       --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.0/src/unix.rs:204:38
        |
    204 |                 Err(Error::OS(*libc::__errno_location()))
        |                                      ^^^^^^^^^^^^^^^^ not found in `libc`
    
    error[E0425]: cannot find function `__errno_location` in crate `libc`
       --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.0/src/unix.rs:222:38
        |
    222 |                 Err(Error::OS(*libc::__errno_location()))
        |                                      ^^^^^^^^^^^^^^^^ not found in `libc`
    
    error[E0425]: cannot find function `pthread_setschedparam` in crate `libc`
       --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.0/src/unix.rs:387:23
        |
    387 |                 libc::pthread_setschedparam(
        |                       ^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
    
    error[E0412]: cannot find type `sched_param` in crate `libc`
       --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.0/src/unix.rs:390:45
        |
    390 |                     &params as *const libc::sched_param,
        |                                             ^^^^^^^^^^^ not found in `libc`
    
    error[E0425]: cannot find function `pthread_getschedparam` in crate `libc`
       --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.0/src/unix.rs:452:25
        |
    452 |         let ret = libc::pthread_getschedparam(
        |                         ^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
    
    error[E0412]: cannot find type `sched_param` in crate `libc`
       --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.0/src/unix.rs:455:39
        |
    455 |             &mut params as *mut libc::sched_param,
        |                                       ^^^^^^^^^^^ not found in `libc`
    
    Some errors have detailed explanations: E0412, E0425.
    For more information about an error, try `rustc --explain E0412`.
    error: could not compile `thread-priority` due to 9 previous errors
    
    opened by la-ninpre 12
  • Cannot build for cross-platform arm64-android (or any android)

    Cannot build for cross-platform arm64-android (or any android)

    Try to use "cross build" to aarch64-linux-android, and it fails due to compile errors, latest version v0.8.2 of crate thread_priority. This process done(with unexpected) by github actions CI/CD, and uses latest version of crate cross. looks like only exception for android, it works fine on other systems. workflow yaml here https://github.com/mknnix/melminter-mod/actions/runs/2897593543/workflow

    error[E0433]: failed to resolve: use of undeclared crate or module `unix`
       --> /cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.2/src/lib.rs:376:31
        |
    376 |     pub fn policy<VALUE: Into<unix::ThreadSchedulePolicy>>(mut self, value: VALUE) -> Self {
        |                               ^^^^ use of undeclared crate or module `unix`
    
    error[E0425]: cannot find function `set_current_thread_priority` in this scope
       --> /cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.2/src/lib.rs:264:9
        |
    264 |         set_current_thread_priority(self)
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^------
        |         |
        |         help: try calling `set_current_thread_priority` as a method: `self.set_current_thread_priority()`
    
    error[E0412]: cannot find type `ThreadId` in this scope
       --> /cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.2/src/lib.rs:274:13
        |
    274 |     pub id: ThreadId,
        |             ^^^^^^^^ not found in this scope
        |
    help: consider importing this struct
        |
    90  | use std::thread::ThreadId;
        |
    
    error[E0425]: cannot find function `get_current_thread_priority` in this scope
       --> /cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.2/src/lib.rs:289:23
        |
    289 |             priority: get_current_thread_priority()?,
        |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `thread_native_id` in this scope
       --> /cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.2/src/lib.rs:290:17
        |
    290 |             id: thread_native_id(),
        |                 ^^^^^^^^^^^^^^^^ not found in this scope
    
    error[E0412]: cannot find type `ThreadSchedulePolicy` in this scope
       --> /cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.2/src/lib.rs:327:20
        |
    321 | pub struct ThreadBuilder {
        |                         - help: you might be missing a type parameter: `<ThreadSchedulePolicy>`
    ...
    327 |     policy: Option<ThreadSchedulePolicy>,
        |                    ^^^^^^^^^^^^^^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `set_thread_priority_and_policy` in this scope
       --> /cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.2/src/lib.rs:430:49
        |
    430 |             (Some(priority), Some(policy)) => f(set_thread_priority_and_policy(
        |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `thread_native_id` in this scope
       --> /cargo/registry/src/github.com-1ecc6299db9ec823/thread-priority-0.8.2/src/lib.rs:431:17
        |
    431 |                 thread_native_id(),
        |                 ^^^^^^^^^^^^^^^^ not found in this scope
    
    
    opened by mknnix 11
  • Add Linux SCHED_DEADLINE support

    Add Linux SCHED_DEADLINE support

    This adds rudimentary support for SCHED_DEADLINE on Linux systems. It is tested and working on Linux 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux, but I see no reason it wouldn't work as far back as 3.14 when SCHED_DEADLINE was introduced.

    There's a few ugly bits:

    • Since SCHED_DEADLINE isn't POSIX, there's a bunch of #[cfg(target_os = "linux")] all over the place, a dedicated linux.rs might be better. I also noticed some libc:: dependencies that aren't present on macOS, so I don't know that unix.rs is fully POSIX anyway.
    • The ThreadId passed in is interpreted as a pid_t instead of being translated properly (solutions to which are also hacky), since the syscall for deadline scheduling expects a kernel tid (userspace pid).
    opened by FridayOrtiz 6
  • macOS support

    macOS support

    Recent changes are tested in Windows. No apparently problems. Excellent!

    This PR add a stub for macOS to eliminate the need for runtime platform checks. Instead a specific new exception type is thrown for UnsupportedPlatform while still allowing compilation despite C stdlib differences from Unix standard.

    I've assumed that macOS is the exception to platform family "unix". An alternative would be that "linux" is the only platform supporting our threading constructs- not sure, but a reasonable guess which works either way.

    Some of the documentation examples needed simplification to avoid "docs are always on Linux, so the old example assertions in docs were not true due to UnsupportedPlatform" when running tests on mac. Thus you likely want to bump the secondary version number for any release.

    opened by paulirotta 6
  • Easily set real-time priority

    Easily set real-time priority

    Hi vityafx, thanks for this useful crate :) I'm trying to set the highest real-time highest priority for low-latency audio operation.

    let thread_id = thread_native_id();
    set_thread_priority(thread_id,
                        ThreadPriority::Max,
                        ThreadSchedulePolicy::Realtime(RealtimeThreadSchedulePolicy::Fifo)).unwrap();
    

    This always fails with: Err value: Pthread(22), whereas this is fine:

    set_thread_priority(thread_id,
                        ThreadPriority::Min,
                        ThreadSchedulePolicy::Normal(NormalThreadSchedulePolicy::Normal)
    

    Also this code has the result expected, but it's surprising to have a numeric value.

    let policy = ThreadSchedulePolicy::Realtime(RealtimeThreadSchedulePolicy::Fifo);
    let params = ScheduleParams { sched_priority: 3 };
    set_thread_schedule_policy(thread_id, policy, params).unwrap();
    

    How would you set the highest real-time priority ergonomically?

    opened by supercurio 6
  • Cannot build in *msvc toolchains. Is this expected?

    Cannot build in *msvc toolchains. Is this expected?

    Unresolved symbols in libc:

    [E0432]: unresolved import `libc::sched_param`
      --> C:\Users\niguo\.cargo\registry\src\github.com-1ecc6299db9ec823\thread-priority-0.1.0\
    \lib.rs:35:9
       |
    35 | pub use libc::sched_param as ScheduleParams;
       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `sched_param` in the root
    
    error[E0412]: cannot find type `pthread_t` in module `libc`
       --> C:\Users\niguo\.cargo\registry\src\github.com-1ecc6299db9ec823\thread-priority-0.1.0
    \src\lib.rs:162:42
        |
    162 | pub fn set_thread_priority(native: libc::pthread_t,
        |                                          ^^^^^^^^^ not found in `libc`
    
    error[E0425]: cannot find function `pthread_setschedprio` in module `libc`
       --> C:\Users\niguo\.cargo\registry\src\github.com-1ecc6299db9ec823\thread-priority-0.1.0
    \src\lib.rs:166:21
        |
    166 |         match libc::pthread_setschedprio(native, priority.to_posix(policy)?) {
        |                     ^^^^^^^^^^^^^^^^^^^^ not found in `libc`
    
    error[E0412]: cannot find type `pthread_t` in module `libc`
       --> C:\Users\niguo\.cargo\registry\src\github.com-1ecc6299db9ec823\thread-priority-0.1.0
    \src\lib.rs:185:36
        |
    185 | pub fn thread_native_id() -> libc::pthread_t {
        |                                    ^^^^^^^^^ not found in `libc`
    
    error[E0425]: cannot find function `pthread_self` in module `libc`
       --> C:\Users\niguo\.cargo\registry\src\github.com-1ecc6299db9ec823\thread-priority-0.1.0
    \src\lib.rs:187:15
        |
    187 |         libc::pthread_self()
        |               ^^^^^^^^^^^^ not found in `libc`
    
    error[E0425]: cannot find function `sched_getscheduler` in module `libc`
       --> C:\Users\niguo\.cargo\registry\src\github.com-1ecc6299db9ec823\thread-priority-0.1.0
    \src\lib.rs:205:48
        |
    205 |         ThreadSchedulePolicy::from_posix(libc::sched_getscheduler(libc::getpid()))
        |                                                ^^^^^^^^^^^^^^^^^^ not found in `libc`
    
    
    error[E0412]: cannot find type `pthread_t` in module `libc`
       --> C:\Users\niguo\.cargo\registry\src\github.com-1ecc6299db9ec823\thread-priority-0.1.0
    \src\lib.rs:227:49
        |
    227 | pub fn set_thread_schedule_policy(native: libc::pthread_t,
        |                                                 ^^^^^^^^^ not found in `libc`
    
    error[E0425]: cannot find function `pthread_setschedparam` in module `libc`
       --> C:\Users\niguo\.cargo\registry\src\github.com-1ecc6299db9ec823\thread-priority-0.1.0
    \src\lib.rs:231:25
        |
    231 |         let ret = libc::pthread_setschedparam(native,
        |                         ^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
    
    error[E0412]: cannot find type `pthread_t` in module `libc`
       --> C:\Users\niguo\.cargo\registry\src\github.com-1ecc6299db9ec823\thread-priority-0.1.0
    \src\lib.rs:254:51
        |
    254 | pub fn thread_schedule_policy_param(native: libc::pthread_t) -> Result<(ThreadSchedul
    ePolicy,
        |                                                   ^^^^^^^^^ not found in `libc`
    
    error[E0425]: cannot find function `pthread_getschedparam` in module `libc`
       --> C:\Users\niguo\.cargo\registry\src\github.com-1ecc6299db9ec823\thread-priority-0.1.0
    \src\lib.rs:260:25
        |
    260 |         let ret = libc::pthread_getschedparam(native,
        |                         ^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
    
    error   Compiling rand v0.3.18
    : aborting due to 10 previous errors
    
    error: Could not compile `thread-priority`.
    warning: build failed, waiting for other jobs to finish...
    error: build failed
    
    question 
    opened by norru 5
  • Ideas for improvement

    Ideas for improvement

    This thread is just a bunch of ideas flying around in my head, so feel free to either close this issue or comment on it. I'm fine with both ;)


    Make a ThreadExt trait and implement the function set_priority and other with respect to the OS for std::thread::Thread. This would make things seamless, e.g.

    std::thread::current().set_thread_priority_and_policy(...)
    

    You could also extend std::thread::Builder and have a function priority where you specify the priority beforehand.


    Unify common functions.

    What I mean by that is that currently I have to take a look into the unix mod to see what functions are available to me. This makes sense because unix might offer different things that windows does. But I would like to have a common struct/trait that combine the lowest common denominator. You can then do something sililar to what the std does by having a OS specific trait that extends your struct. For an example what I mean look at std::fs::File with the AsRawFd and AsRawHandle traits.


    Restrict the creation of invalid states. I see that the ThreadPolicy enum can have an invalid state where when you pass a value beyond 100 to the Specific variant (btw. the documentation there says [0; 100] (read including 0 and 100), but the code says [0; 100) (read including 0, excluding 100). There needs to be a correction.

    One way of doing this might be that the variant Specific does not hold a u32, but a struct SpecificNumber that has a new function which restricts the value passed to it and returning a Result. Second would be that ThreadPolicy is a struct containing a single, non-public, enum. Similar to this: https://stackoverflow.com/questions/28090120/can-i-create-private-enum-constructors.

    This way you can have some functions not returning a Result anymore, because they can't fail.


    Create a few examples in the repo. People love examples and hate reading docs (although I love reading rust docs, because they are unified and so pleasent to read). But a dedicated examples folder with just one example would spice things up and let people investigate everything they can do with this crate without looking into every function available.

    Let me know what you think about this. This crate looks nice and it perfectly fits into my current project. So thank you for developing it :)

    opened by hellow554 4
  • Doesn't set nice(2) value

    Doesn't set nice(2) value

    I was kind of expecting this crate on UNIX to call nice(2) in order to mark the thread as lower priority, but it doesn't. At least on Linux so far it seems I'm able to set the thread policy to Batch and that worked successfully, but Linux doesn't seem to do anything at all with the priority value; that's more for the realtime/deadline schedulers.

    Am I looking for the wrong thing? I ended up just calling libc::nice() in my application.

    opened by devyn 3
  • Add more interfaces.

    Add more interfaces.

    1. Adds a ThreadBuilderExt trait containing helpful methods for spawning a thread with priority. The trait is seamlessly implemented for the std::thread::Builder so that it is easy to use.
    2. Adds a struct ThreadBuilder which can be used to set the priority and stuff much more easily than just calling functions, before starting a thread.
    opened by vityafx 2
  • Make set_thread_priority actually set the schedule policy.

    Make set_thread_priority actually set the schedule policy.

    This makes set_thread_priority set the schedule policy of the thread as documented. Before this change only the priority was changed, but the specified policy was ignored.

    opened by surban 2
  • Reorganise the code structure

    Reorganise the code structure

    Adds more space for implementing platform-independent thread priority routines:

    1. Separates linux, unix, and all other (possible posix-compatible) implementations into "unix" module.
    2. Adds a separate module for windows-only routines.
    3. Adds a few functions "set_current_thread_priority" and "ThreadPriority::set_for_current" for better comform and for avoiding writing repetitive code.

    Signed-off-by: Victor Polevoy [email protected]

    opened by vityafx 0
  • add support for iOS target, use `pthread_setschedparam` on macOS target

    add support for iOS target, use `pthread_setschedparam` on macOS target

    on apple targets, only pthread_setschedparam is allowed to upgrade threads to a higher priority. this PR change the implementation of set_thread_priority_and_policy_deadline on macOS and iOS targets to use pthread_setschedparam only.

    Ref:

    • https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/pthread_setschedparam.3.html#//apple_ref/doc/man/3/pthread_setschedparam
    • https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html#//apple_ref/doc/uid/10000057i-CH15-SW12
    • https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/pthread_setschedparam.3.html#//apple_ref/doc/man/3/pthread_setschedparam
    opened by name1e5s 1
  • `set_current_thread_priority(get_current_thread_priority)` seems to fail

    `set_current_thread_priority(get_current_thread_priority)` seems to fail

    I've decided to try out thread_priority for my project and started by trying out the most simple example:

    let current = thread_priority::get_current_thread_priority().unwrap();
    println!("Current thread priority is: {current:?}");
    thread_priority::set_current_thread_priority(current).unwrap();
    

    Sadly, the example panics with an Error::PriorityNotInRange(1..=99) (current is logged to be ThreadPriority::CrossPlatform(0)). I am wondering if ThreadPriority::CrossPlatform(0) stands for something like "cannot retrieve priority"? I would naively imagine the default priority of a thread to hover somewhere around 50, rather than at (actually, below) the lowest possible value.

    opened by matteomonti 5
  • Add support for SCHED_DEADLINE flags

    Add support for SCHED_DEADLINE flags

    In reference to #13, this adds support for the three flags supported by SCHED_DEADLINE.

    I don't like that this changes the interface (deadline policy goes from taking 3 u64 to 3 u64 and an Option<DeadlineFlags>) and am open to alternative suggestions that are backwards-compatible.

    opened by FridayOrtiz 1
  • Add flag support to deadline scheduling.

    Add flag support to deadline scheduling.

    Regarding the discussion in https://github.com/vityafx/thread-priority/pull/12, the crate currently does not support setting flags during deadline scheduling. I would like to add it.

    @vityafx , I don't have permissions to assign issues in this repo but feel free to assign it to me.

    opened by FridayOrtiz 1
  • Make Pthread error be a named constant

    Make Pthread error be a named constant

    As a library user I want to have a errors understandable at a glance without looking what the error number means. In #3 I have a error Pthread(22) which I can't understand quickly. Making the error be a named constant (a enum variant) allows me to understand the error quickly: Error::Pthread(PthreadError::EINVAL).

    opened by vityafx 0
Owner
Victor Polevoy
C/C++/Rust systems and application developer, Certified Scrum Professional (CSP).
Victor Polevoy
Thread-safe clone-on-write container for fast concurrent writing and reading.

sync_cow Thread-safe clone-on-write container for fast concurrent writing and reading. SyncCow is a container for concurrent writing and reading of da

null 40 Jan 16, 2023
Linked Atomic Random Insert Vector: a thread-safe, self-memory-managed vector with no guaranteed sequential insert.

Linked Atomic Random Insert Vector Lariv is a thread-safe, self-memory-managed vector with no guaranteed sequential insert. It internally uses a linke

Guillem Jara 8 Feb 1, 2023
Simple and customizable procedural noise generation library written in Rust.

libnoise A simple, performant, and customizable procedural noise generation library inspired by libnoise for C++ featuring: Easy coherent noise genera

SpoogieOogie 29 Aug 13, 2023
A typesafe, flexible, simple, and user-friendly unit system library for Rust that has good error messages.

uy A typesafe, flexible, simple, and user-friendly unit system library for Rust that has good error messages. Usage uy not only stores the unit of a v

Lachlan Sneff 19 Aug 8, 2023
A simple library to get all pairs from any Dex and sync reserves.

pair_sync A simple library to get all pairs from any supported Dex and sync reserves. Crates.io Documentation in progress Filename: examples/sync-pair

null 116 Dec 30, 2022
Rust 核心库和标准库的源码级中文翻译,可作为 IDE 工具的智能提示 (Rust core library and standard library translation. can be used as IntelliSense for IDE tools)

Rust 标准库中文版 这是翻译 Rust 库 的地方, 相关源代码来自于 https://github.com/rust-lang/rust。 如果您不会说英语,那么拥有使用中文的文档至关重要,即使您会说英语,使用母语也仍然能让您感到愉快。Rust 标准库是高质量的,不管是新手还是老手,都可以从中

wtklbm 493 Jan 4, 2023
A simple /proc//{mem,maps} library for Rust

Summary A very simple library that wraps around /proc/pid/mem and /proc/pid/maps to read memory out of a running process on Linux. Usage Basic usage l

null 6 Jul 27, 2022
A simple endian-handling library for Rust

endi Yet another endian handling library for Rust. The approach is very similar to that of byteordered crate with its Endianness enum, except that end

Zeeshan Ali Khan 5 Dec 11, 2023
A simple local storage media library manager.

OFFFLIX A simple application to auto manage series on your local storage. Features Resume watching Play next episode Auto increment season Play random

null 33 Mar 7, 2023
Fast and simple datetime, date, time and duration parsing for rust.

speedate Fast and simple datetime, date, time and duration parsing for rust. speedate is a lax† RFC 3339 date and time parser, in other words, it pars

Samuel Colvin 43 Nov 25, 2022
TypeRust - simple Rust playground where you can build or run your Rust code and share it with others

Rust playground Welcome to TypeRust! This is a simple Rust playground where you can build or run your Rust code and share it with others. There are a

Kirill Vasiltsov 28 Dec 12, 2022
Simple and performant hot-reloading for Rust

reloady Simple, performant hot-reloading for Rust. Requires Rust nightly and only works on Linux for now. installing CLI To install the CLI helper car

Anirudh Balaji 24 Aug 5, 2022
A simple programming language for something between C and Rust.

inuc inuc is a systems programming language that is something between C and Rust. Features : [] Strong , static typing (type inference not a priority

Sagnik Chatterjee 1 Feb 7, 2022
Rust language from simple to deep, and then to strengthen learning in multiple module

Rust Library This project is used to learn rust language from simple to deep, and then to strengthen learning in multiple module. It is used to help n

Summer 1 Sep 19, 2022
A relatively simple puzzle generator application written in Rust and used via Javascript

Puzzlip Basic Overview This is a relatively simple puzzle generator application written in Rust and used via Javascript in https://puzzlip.com. If you

Nenad 5 Dec 7, 2022
🚀simple server that returns error codes with their respective messages and debug information, written in rust 🦀

ErrorServer ?? A simple & lightweight server that returns a HTML page of the error code with its respective message and debug information, written in

Jakob 2 Dec 15, 2022
Simple, automatic, and customizable tree pretty-printing in Rust.

display_tree Simple, automatic, and customizable tree pretty-printing in Rust. This crate provides tools to easily pretty-print data as a tree, includ

Cameron Delong 20 Dec 24, 2022
Omeglib, a portmanteau of "omegle" and "library", is a crate for interacting with omegle, simply and asynchronously

Omeglib, a portmanteau of "omegle" and "library", is a crate for interacting with omegle, simply and asynchronously. It is intended to suit one's every requirement regarding chat on omegle.

null 1 May 25, 2022
A tool and library to losslessly join multiple .mp4 files shot with same camera and settings

mp4-merge A tool and library to losslessly join multiple .mp4 files shot with same camera and settings. This is useful to merge multiple files that ar

Gyroflow 7 Jan 2, 2023