#thread #numbers #unix #client #gnu #env #jobserver

jobslot

An implementation of the GNU make jobserver for Rust

14 releases

0.2.19 Jul 31, 2024
0.2.17 Mar 17, 2024
0.2.14 Nov 16, 2023
0.2.11 Apr 15, 2023
0.2.8 Nov 23, 2022

#44 in Concurrency

Download history 9655/week @ 2024-07-23 9684/week @ 2024-07-30 9425/week @ 2024-08-06 9996/week @ 2024-08-13 11251/week @ 2024-08-20 9309/week @ 2024-08-27 13052/week @ 2024-09-03 12667/week @ 2024-09-10 13390/week @ 2024-09-17 13321/week @ 2024-09-24 15331/week @ 2024-10-01 13106/week @ 2024-10-08 14489/week @ 2024-10-15 15738/week @ 2024-10-22 15479/week @ 2024-10-29 17654/week @ 2024-11-05

65,864 downloads per month
Used in 7 crates (3 directly)

MIT/Apache

62KB
1K SLoC

jobslot

An implementation of the GNU make jobserver for Rust

CI

Crates.io

Documentation

Advantages over jobserver?

  • jobslot contains bug fix for Client::configure is unsafe
  • jobslot removed use of signal handling in the helper thread on unix
  • jobslot uses windows-sys on windows instead of manually declaring bindings (some of the bindings seem to be wrong)
  • jobslot uses getrandom on windows instead of making homebrew one using raw windows api
  • jobslot::Client::from_env can be called any number of times on Windows and Unix.

Usage

First, add this to your Cargo.toml:

[dependencies]
jobslot = "0.2"

Use of this crate in rustc

This crate uses getrandom v0.2.7 on windows. If you want to use this crate in rustc, make sure to bump getrandom to v0.2 to avoid pulling in different major versions of the same crate.

License

This project is licensed under either of

at your option.

Contribution

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

Dependencies

~0.3–10MB
~98K SLoC