All Projects → schultyy → os_type

schultyy / os_type

Licence: MIT license
Rust library to detect the operating system type

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to os type

munix
🦠 µnix is a UNIX-like operating system
Stars: ✭ 57 (+119.23%)
Mutual labels:  operating-system
Freeze-OS
An Operating System that runs on top of an interpreter.
Stars: ✭ 24 (-7.69%)
Mutual labels:  operating-system
Archive-SE
Systèmes d'Exploitation [II F - EL et Info]
Stars: ✭ 13 (-50%)
Mutual labels:  operating-system
kora-kernel
Kernel for my operating system KoraOS
Stars: ✭ 15 (-42.31%)
Mutual labels:  operating-system
zambesii
Non-unix, custom-API hybrid OS kernel written in C++ which can be thought of as an emulated microkernel. The native API is almost fully asynchronous and the kernel is aimed at high-scaling, high-throughput-requiring multiprocessor workloads, with working support for SMP and NUMA already implemented. Join the IRC channel, #zbz-dev on freenode!
Stars: ✭ 13 (-50%)
Mutual labels:  operating-system
sweb
SWEB Educational OS
Stars: ✭ 96 (+269.23%)
Mutual labels:  operating-system
vinix
Vinix is an effort to write a modern, fast, and useful operating system in the V programming language
Stars: ✭ 1,512 (+5715.38%)
Mutual labels:  operating-system
ArvernOS
💾 A minimal, experimental and "toy" monolithic kernel to learn about OS development // Work In Progress
Stars: ✭ 313 (+1103.85%)
Mutual labels:  operating-system
The-Complete-FAANG-Preparation
This repository contains all the DSA (Data-Structures, Algorithms, 450 DSA by Love Babbar Bhaiya, FAANG Questions), Technical Subjects (OS + DBMS + SQL + CN + OOPs) Theory+Questions, FAANG Interview questions, and Miscellaneous Stuff (Programming MCQs, Puzzles, Aptitude, Reasoning). The Programming languages used for demonstration are C++, Pytho…
Stars: ✭ 8,681 (+33288.46%)
Mutual labels:  operating-system
FutureDOS
A futuristic DOS
Stars: ✭ 46 (+76.92%)
Mutual labels:  operating-system
greenteaos.github.io
🏠 Homepage of the @GreenteaOS
Stars: ✭ 16 (-38.46%)
Mutual labels:  operating-system
vesper
Single-address-space capability-based nanokernel
Stars: ✭ 55 (+111.54%)
Mutual labels:  operating-system
chromium os-tinker board
Build your Chromium OS for Asus Tinker Board
Stars: ✭ 30 (+15.38%)
Mutual labels:  operating-system
OpenGnsys
OpenGnsys (pronounced Open Genesis) is a free and open source project that provides tools for managing and deploying different operating systems.
Stars: ✭ 15 (-42.31%)
Mutual labels:  operating-system
ShawnOS
A Basic x86 Operating System/Kernel
Stars: ✭ 39 (+50%)
Mutual labels:  operating-system
xkdb
Xinu Kernel DeBugger (xkdb) - GDB for Xinu backends
Stars: ✭ 19 (-26.92%)
Mutual labels:  operating-system
MoonOS
MoonOS (just a kernel atm) is a micro kernel designed for the x86_64 and arm architecure.
Stars: ✭ 82 (+215.38%)
Mutual labels:  operating-system
Aqeous
(Inactive, Checkout AvanaOS, Rewrite of this) This is a New Operating System (Kernel right now). Made completely from scratch, We aim to make a complete OS for Learning purpose
Stars: ✭ 23 (-11.54%)
Mutual labels:  operating-system
dandelion
🌀 Microkernel Real-Time Operating System in Rust
Stars: ✭ 20 (-23.08%)
Mutual labels:  operating-system
Melvix
💻 A small operating system written from scratch
Stars: ✭ 69 (+165.38%)
Mutual labels:  operating-system

Rust

os_type

Rust library to detect the operating system type, because sometimes you need to know.

Usage

Include this into your Cargo.toml:

[dependencies]
os_type="2.6"

In your code:

extern crate os_type;
let os = os_type::current_platform();
println!("Type: {:?}", os.os_type);
println!("Version: {}", os.version);

Or to provide different handling on different operating systems:

match os_type::current_platform().os_type {
  os_type::OSType::OSX => {
    println!("This is probably an apple laptop!");
  }
  os_type::OSType::Ubuntu => {
    println!("This is running Ubuntu Linux!");
  }
  _ => {
    println!("Unknown Operating System");
  }
}

Using os_type::current_platform().os_type, expect one of these return values:

  • Unknown
  • Redhat
  • CentOS
  • OSX
  • Ubuntu
  • Debian
  • Arch
  • Manjaro
  • Alpine
  • Deepin
  • NixOS
  • Kali

If you need support for more OS types, please consider opening a Pull Request.

Requirements

On Linux based systems this library requires that lsb_release is installed.

Contributing

Bug reports and pull requests are welcome on GitHub. You can find more information about contributing in the CONTRIBUTING.md. This project is intended to be a safe, welcoming space for collaboration and discussion, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].