{"id":19140833,"url":"https://github.com/lymkwi/rust-foxes-module","last_synced_at":"2025-05-06T23:17:13.104Z","repository":{"id":78242560,"uuid":"544647304","full_name":"Lymkwi/rust-foxes-module","owner":"Lymkwi","description":"A Linux Kernel module written in Rust that creates a device which outputs foxes 🦊","archived":false,"fork":false,"pushed_at":"2024-09-04T18:33:48.000Z","size":40,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T23:17:07.206Z","etag":null,"topics":["linux-module","linux-rust","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lymkwi.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":"2022-10-03T01:08:28.000Z","updated_at":"2024-11-12T13:45:41.000Z","dependencies_parsed_at":"2024-09-06T03:13:39.560Z","dependency_job_id":null,"html_url":"https://github.com/Lymkwi/rust-foxes-module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lymkwi%2Frust-foxes-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lymkwi%2Frust-foxes-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lymkwi%2Frust-foxes-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lymkwi%2Frust-foxes-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lymkwi","download_url":"https://codeload.github.com/Lymkwi/rust-foxes-module/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252782835,"owners_count":21803410,"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":["linux-module","linux-rust","rust"],"created_at":"2024-11-09T07:18:58.541Z","updated_at":"2025-05-06T23:17:13.085Z","avatar_url":"https://github.com/Lymkwi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust 'Foxes' out-of-tree module\n\nThis basic module creates a single virtual device called `/dev/foxes` that continuously outputs the Unicode fox emoji when read. 🦊\n\nIt is originally based on the [Rust for Linux out-of-tree-module template](https://github.com/Rust-for-Linux/rust-out-of-tree-module/) and [JackOS' Rust for Kernel development tutorial](https://www.jackos.io/rust-kernel/rust-for-linux.html).\n\n## Adding the Necessary Abstractions\n\nBecause the `rust` branch is no longer maintained on RFL's tree, the abstractions this driver relied on are not yet present.\n\nIn order to add them, apply [`missing-abstractions.patch`](./missing-abstractions.patch) over RFL's `rust-next`.\n\nIt is very likely that the patch will not apply, especially as further abstractions are added.\n\n## Build Instructions After Update\n\nAll warnings and considerations from the Rust for Linux foudation's repository apply here. For the sake of efficacy, here are the instructions to build this module on a kernel with Rust support:\n\n```sh\n$ make KDIR=.../linux-with-rust-support LLVM=1\nmake -C .../linux-with-rust-support M=$PWD\nmake[1]: Entering directory '.../linux-with-rust-support'\n  RUSTC [M] .../rust-foxes-module/rust_foxes.o\n  MODPOST .../rust-foxes-module/Module.symvers\n  CC [M]  .../rust-foxes-module/rust_foxes.mod.o\n  LD [M]  .../rust-foxes-module/rust_foxes.ko\nmake[1]: Leaving directory '.../linux-with-rust-support'\n```\n\n## Changelog\n\n- 2024-09-04\n  - Update abstraction patch for split rust helpers\n  - Update abstraction patch to use `kernel::uaccess` in place of legacy `kernel::user_ptr`\n  - Update `kernel::file` abstractions consequently\n  - Up-to-date with `rust-next`\n  - Fixed a bug where having a block size below 4 incorrectly decreased the remaining fox count even if a fox could not be entirely written\n  - Add a global count of foxes, the module has to be unloaded and reloaded for it to be reset\n  - Turn the diff file into a proper patch of the abstraction commit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flymkwi%2Frust-foxes-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flymkwi%2Frust-foxes-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flymkwi%2Frust-foxes-module/lists"}