Crates.io | nativethread |
lib.rs | nativethread |
version | 0.2.0 |
created_at | 2025-08-28 21:16:55.714989+00 |
updated_at | 2025-08-30 11:11:13.891695+00 |
description | No-dependency library that provides native thread operations in a wide variety of platforms |
homepage | https://sr.ht/~yuce/nativethread |
repository | https://git.sr.ht/~yuce/nativethread-rs |
max_upload_size | |
id | 1814681 |
size | 6,896 |
This Rust crate provides native thread functions for a wide variety of platforms. It is a self-contained crate, with no dependencies. The following platforms are supported:
Add the following in your Corgo.toml
:
[dependencies]
nativethread = "0.2.0"
Just call nativethread::get_id()
, which returns the native thread ID as u64
:
fn main() {
let tid = nativethread::get_id();
println!("native thread ID: {tid}");
}
This crate is licensed under MIT.