{"id":22096669,"url":"https://github.com/libmir/mir-linux-kernel","last_synced_at":"2025-08-22T11:44:16.348Z","repository":{"id":146907837,"uuid":"109099894","full_name":"libmir/mir-linux-kernel","owner":"libmir","description":"Linux kernel headers","archived":false,"fork":false,"pushed_at":"2021-10-22T04:32:17.000Z","size":144,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-09T23:31:07.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libmir.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-01T07:19:38.000Z","updated_at":"2025-02-19T09:10:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d27065c-b79f-4564-b590-cae56a99bd45","html_url":"https://github.com/libmir/mir-linux-kernel","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/libmir/mir-linux-kernel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libmir%2Fmir-linux-kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libmir%2Fmir-linux-kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libmir%2Fmir-linux-kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libmir%2Fmir-linux-kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libmir","download_url":"https://codeload.github.com/libmir/mir-linux-kernel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libmir%2Fmir-linux-kernel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271632766,"owners_count":24793744,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-01T04:12:05.019Z","updated_at":"2025-08-22T11:44:16.258Z","avatar_url":"https://github.com/libmir.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mir-linux-kernel\nLinux kernel headers\n\n#### Motivating Example\nLinux 3.17 added the `getrandom` syscall. Using it instead of `/dev/[u]?random` was a win. But we didn't think about all of the architectures that people might try building our library on, and soon we got a report from a user that our latest and greatest release was failing to compile on Raspberry Pi.\n\n#### Example Usage\n```d\nimport mir.linux._asm.unistd: NR_getrandom;\n\n/*\n*   If the GRND_NONBLOCK flag is set, then\n*   getrandom() does not block in these cases, but instead\n*   immediately returns -1 with errno set to EAGAIN.\n*/\nprivate ptrdiff_t genRandomImplSysNonBlocking()(scope void* ptr, size_t len) @nogc nothrow @system\n{\n    return syscall(NR_getrandom, cast(size_t) ptr, len, GRND_NONBLOCK);\n}\n\n```\n\n#### Notes\nCurrently we have syscall numbers for:\n\n* x86\n* AMD64 / x86-64\n* ARM\n* ARM64 / AArch64\n* PPC\n* PPC64\n* IA64\n* MIPS O32\n* MIPS N32\n* MIPS64\n* SPARC\n* SPARC64\n* S390\n* SystemZ\n* HP PA-RISC, 32-bit\n* HP PA-RISC, 64-bit\n* SuperH\n* Alpha\n* RISC-V 32-bit\n* RISC-V 64-bit\n\nThis compares favorably to the [list of architectures](https://wiki.dlang.org/Compilers) supported by the various D compilers, but currently our test suite only has x86 and x86-64 machines in it which is how we got into this mess in the first place. Caveat lector. We'll try to fix problems as we discover them and the set of files included may grow as we need more things.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibmir%2Fmir-linux-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibmir%2Fmir-linux-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibmir%2Fmir-linux-kernel/lists"}