mach_info
Version, currently master branch1 version
- master branchlatestOct 16, 2019
github.com/washu/mach_info
Mach Bindings for crystal
1 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
mach_info:
github: washu/mach_info
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.30.1- License
- MIT
- Author
- Sal Scotto
Dependencies
This version declares no dependencies.
README
mach_info
Provides a wrapper api for the mach info calls available on darwin
Installation
-
Add the dependency to your
shard.yml:dependencies: libc_mach: github: washu/mach_info -
Run
shards install
Usage
require "mach_info"
m = MachInfo.basic_host_info
total_cpus = m.max_cpus
This library adds the following Mach Info functions bindings
- host_self
- host_priv_self
- host_page_size
- host_info
- host_statistics
- host_statistics64
- kernel_version
- processor_set_default
- host_processor_info
- processor_set_info
The Core Module adds several static lookup methods to fetch the different flavors of host_info, host_processor_info, and processor_set_info functions.
Development
Install crystal, get cracking.
Contributing
- Fork it (https://github.com/washu/mach_info/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Sal Scotto - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Oct 16, 2019
- Crystal
0.30.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/washu/mach_info
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 1