{"id":16552565,"url":"https://github.com/postmodern/ffi-libc","last_synced_at":"2025-03-16T19:33:08.142Z","repository":{"id":914151,"uuid":"675319","full_name":"postmodern/ffi-libc","owner":"postmodern","description":"Useful Ruby FFI bindings for libc","archived":false,"fork":false,"pushed_at":"2021-09-22T19:35:20.000Z","size":77,"stargazers_count":32,"open_issues_count":1,"forks_count":11,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-02-27T12:45:31.268Z","etag":null,"topics":["ffi","ffi-bindings","libc","ruby"],"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/postmodern.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-05-19T15:37:11.000Z","updated_at":"2024-07-07T02:10:50.000Z","dependencies_parsed_at":"2022-08-16T11:25:24.122Z","dependency_job_id":null,"html_url":"https://github.com/postmodern/ffi-libc","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fffi-libc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fffi-libc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fffi-libc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fffi-libc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postmodern","download_url":"https://codeload.github.com/postmodern/ffi-libc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826798,"owners_count":20354221,"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":["ffi","ffi-bindings","libc","ruby"],"created_at":"2024-10-11T19:45:20.287Z","updated_at":"2025-03-16T19:33:07.874Z","avatar_url":"https://github.com/postmodern.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ffi-libc\n\n[![CI](https://github.com/postmodern/ffi-libc/actions/workflows/ruby.yml/badge.svg)](https://github.com/postmodern/ffi-libc/actions/workflows/ruby.yml)\n[![Code Climate](https://codeclimate.com/github/postmodern/ffi-libc.svg)](https://codeclimate.com/github/postmodern/ffi-libc)\n\n* [Source](https://github.com/postmodern/ffi-libc/)\n* [Issues](https://github.com/postmodern/ffi-libc/issues)\n* [Documentation](https://rubydoc.info/gems/ffi-libc)\n\n## Description\n\nUseful Ruby FFI bindings for `libc`.\n\n## Features\n\n* Provides common Structs used in `libc`:\n  * {FFI::LibC::Ifaddrs}\n  * {FFI::LibC::In6Addr}\n  * {FFI::LibC::InAddr}\n  * {FFI::LibC::SockaddrDL}\n  * {FFI::LibC::SockaddrFamily}\n  * {FFI::LibC::SockaddrIn6}\n  * {FFI::LibC::SockaddrIn}\n  * {FFI::LibC::Sockaddr}\n  * {FFI::LibC::Timeval}\n  * {FFI::LibC::Timezone}\n  * {FFI::LibC::RUsage}\n* Binds to common functions and global variables in `libc`:\n  * `errno.h`:\n    * `sys_errlist` (BSD)\n    * `sys_nerr` (BSD)\n    * `errno`\n  * `unistd.h`:\n    * `brk`\n    * `sbrk`\n    * `getpid`\n    * `getppid`\n    * `getuid`\n    * `geteuid`\n    * `getgid`\n    * `getegid`\n  * `stdlib.h`:\n    * `calloc`\n    * `malloc`\n    * `free`\n    * `realloc`\n    * `getenv`\n    * `putenv`\n    * `unsetenv`\n    * `clearenv`\n  * `time.h`:\n    * `time`\n  * `sys/time.h`:\n    * `gettimeofday`\n    * `settimeofday`\n  * `sys/resource.h` / `bits/resource.h`:\n    * `getrusage`\n  * `sys/mman.h`:\n    * `mmap`\n    * `munmap`\n  * `string.h`:\n    * `bzero`\n    * `memset`\n    * `memcpy`\n    * `memcmp`\n    * `memchr`\n    * `memrchr`\n    * `strcpy`\n    * `strncpy`\n    * `strlen`\n    * `index`\n    * `rindex`\n    * `strchr`\n    * `strrchr`\n    * `strstr`\n    * `strerror`\n  * `stdio.h`:\n    * `stdin`\n    * `stdout`\n    * `stderr`\n    * `fopen`\n    * `fdopen`\n    * `freopen`\n    * `fseek`\n    * `ftell`\n    * `rewind`\n    * `fread`\n    * `fwrite`\n    * `fgetc`\n    * `fgets`\n    * `fputc`\n    * `fputs`\n    * `fflush`\n    * `fclose`\n    * `clearerr`\n    * `feof`\n    * `ferror`\n    * `fileno`\n    * `perror`\n  * `netdb.h`:\n    * `getnameinfo`\n  * `ifaddrs.h`:\n    * `getifaddrs`\n    * `freeifaddrs`\n\n## Requirements\n\n* [ffi] ~\u003e 1.0\n\n## Install\n\n```shell\n$ gem install ffi-libc\n```\n\n### gemspec\n\n```ruby\ngem.add_dependency 'ffi-libc', '~\u003e 0.1'\n```\n\n### Gemfile\n\n```ruby\ngem 'ffi-libc', '~\u003e 0.1'\n```\n\n## License\n\nCopyright (c) 2010-2021 Hal Brodigan\n\nSee {file:LICENSE.txt} for license information.\n\n[ffi]: https://github.com/ffi/ffi#readme\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostmodern%2Fffi-libc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostmodern%2Fffi-libc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostmodern%2Fffi-libc/lists"}