{"id":24755261,"url":"https://github.com/katzer/mruby-os","last_synced_at":"2025-07-07T15:40:37.453Z","repository":{"id":42200845,"uuid":"81850173","full_name":"katzer/mruby-os","owner":"katzer","description":"Determine system and binary capabilities at runtime","archived":false,"fork":false,"pushed_at":"2022-07-05T07:49:25.000Z","size":30,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-03-11T06:12:48.609Z","etag":null,"topics":["mruby-gem","system-capabilities","uname"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/katzer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-13T17:10:40.000Z","updated_at":"2022-07-05T07:38:37.000Z","dependencies_parsed_at":"2022-07-10T20:31:46.542Z","dependency_job_id":null,"html_url":"https://github.com/katzer/mruby-os","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fmruby-os","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fmruby-os/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fmruby-os/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fmruby-os/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/katzer","download_url":"https://codeload.github.com/katzer/mruby-os/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236018674,"owners_count":19082129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mruby-gem","system-capabilities","uname"],"created_at":"2025-01-28T12:37:59.237Z","updated_at":"2025-01-28T12:37:59.775Z","avatar_url":"https://github.com/katzer.png","language":"Ruby","readme":"# mruby-os \u003cbr\u003e [![Build Status](https://travis-ci.com/katzer/mruby-os.svg?branch=master)](https://travis-ci.com/katzer/mruby-os) [![Build status](https://ci.appveyor.com/api/projects/status/9o4do8f94gh0kagg?svg=true)](https://ci.appveyor.com/project/katzer/mruby-os)\n\nDetermine system and binary capabilities at runtime.\n\n## Installation\n\nAdd the line below to your `build_config.rb`:\n\n```ruby\nMRuby::Build.new do |conf|\n  # ... (snip) ...\n  conf.gem 'mruby-os'\nend\n```\n\nOr add this line to your aplication's `mrbgem.rake`:\n\n```ruby\nMRuby::Gem::Specification.new('your-mrbgem') do |spec|\n  # ... (snip) ...\n  spec.add_dependency 'mruby-logger'\nend\n```\n\n## Usage\n\nTo get the machine architecture:\n```ruby\nOS.machine # i686 or x86_64\n```\n\nTo get the max \"word size\" of the machine:\n```ruby\nOS.bits # 32 or 64\n# or\nOS.bits :machine\n```\n\nTo get the used \"word size\" by the binary:\n```ruby\nOS.bits :binary\n```\n\nTo get the kernel name:\n```ruby\nOS.sysname # Darwin, Linux or Windows_NT\n```\n\nTo execute code per platform:\n```ruby\nif OS.posix?\n  # The normal way\nelse\n  # Windows\nend\n```\n\nSee also `linux?`, `mac?`, `macos?`, `osx?`, `x?`.\n\n## Development\n\nClone the repo:\n    \n    $ git clone https://github.com/katzer/mruby-os.git \u0026\u0026 cd mruby-os/\n\nCompile the source:\n\n    $ rake compile\n\nRun the tests:\n\n    $ rake test\n\n## Authors\n\n- Sebastián Katzer, Fa. appPlant GmbH\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License][license].\n\nMade with :yum: in Leipzig\n\n© 2017 [appPlant GmbH][appplant]\n\n[license]: http://opensource.org/licenses/MIT\n[appplant]: www.appplant.de\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatzer%2Fmruby-os","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatzer%2Fmruby-os","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatzer%2Fmruby-os/lists"}