{"id":13720361,"url":"https://github.com/aya-rs/aya-template","last_synced_at":"2025-05-07T12:31:11.474Z","repository":{"id":38241838,"uuid":"392741237","full_name":"aya-rs/aya-template","owner":"aya-rs","description":"A cargo-generate template for Rust eBPF Projects using Aya","archived":false,"fork":false,"pushed_at":"2025-04-24T10:33:25.000Z","size":186,"stargazers_count":96,"open_issues_count":2,"forks_count":44,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-24T11:33:44.595Z","etag":null,"topics":["cargo-generate","ebpf","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aya-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"zenodo":null}},"created_at":"2021-08-04T15:34:28.000Z","updated_at":"2025-04-24T10:33:27.000Z","dependencies_parsed_at":"2024-05-21T21:44:55.730Z","dependency_job_id":"5752045b-335b-41d5-bbaf-acba7afa337e","html_url":"https://github.com/aya-rs/aya-template","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/aya-rs%2Faya-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aya-rs%2Faya-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aya-rs%2Faya-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aya-rs%2Faya-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aya-rs","download_url":"https://codeload.github.com/aya-rs/aya-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252876370,"owners_count":21818170,"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":["cargo-generate","ebpf","rust"],"created_at":"2024-08-03T01:01:02.940Z","updated_at":"2025-05-07T12:31:11.466Z","avatar_url":"https://github.com/aya-rs.png","language":"Rust","funding_links":[],"categories":["eBPF Workflow: Tools and Utilities","eBPF 工作流：工具和实用程序","Rust","Reference Documentation"],"sub_categories":["Aya"],"readme":"# {{project-name}}\n\n## Prerequisites\n\n1. stable rust toolchains: `rustup toolchain install stable`\n1. nightly rust toolchains: `rustup toolchain install nightly --component rust-src`\n1. (if cross-compiling) rustup target: `rustup target add ${ARCH}-unknown-linux-musl`\n1. (if cross-compiling) LLVM: (e.g.) `brew install llvm` (on macOS)\n1. (if cross-compiling) C toolchain: (e.g.) [`brew install filosottile/musl-cross/musl-cross`](https://github.com/FiloSottile/homebrew-musl-cross) (on macOS)\n1. bpf-linker: `cargo install bpf-linker` (`--no-default-features` on macOS)\n\n## Build \u0026 Run\n\nUse `cargo build`, `cargo check`, etc. as normal. Run your program with:\n\n```shell\ncargo run --release --config 'target.\"cfg(all())\".runner=\"sudo -E\"'\n```\n\nCargo build scripts are used to automatically build the eBPF correctly and include it in the\nprogram.\n\n## Cross-compiling on macOS\n\nCross compilation should work on both Intel and Apple Silicon Macs.\n\n```shell\nCC=${ARCH}-linux-musl-gcc cargo build --package {{project-name}} --release \\\n  --target=${ARCH}-unknown-linux-musl \\\n  --config=target.${ARCH}-unknown-linux-musl.linker=\\\"${ARCH}-linux-musl-gcc\\\"\n```\nThe cross-compiled program `target/${ARCH}-unknown-linux-musl/release/{{project-name}}` can be\ncopied to a Linux server or VM and run there.\n\n## License\n\nWith the exception of eBPF code, {{project-name}} is distributed under the terms\nof either the [MIT license] or the [Apache License] (version 2.0), at your\noption.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\n### eBPF\n\nAll eBPF code is distributed under either the terms of the\n[GNU General Public License, Version 2] or the [MIT license], at your\noption.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this project by you, as defined in the GPL-2 license, shall be\ndual licensed as above, without any additional terms or conditions.\n\n[Apache license]: LICENSE-APACHE\n[MIT license]: LICENSE-MIT\n[GNU General Public License, Version 2]: LICENSE-GPL2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faya-rs%2Faya-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faya-rs%2Faya-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faya-rs%2Faya-template/lists"}