{"id":26282049,"url":"https://github.com/ethanuppal/llvm-pass-skeleton-rs","last_synced_at":"2025-05-07T07:34:12.720Z","repository":{"id":281726081,"uuid":"946221430","full_name":"ethanuppal/llvm-pass-skeleton-rs","owner":"ethanuppal","description":"example LLVM pass but in Rust 🦀","archived":false,"fork":false,"pushed_at":"2025-03-12T10:08:01.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T07:41:34.007Z","etag":null,"topics":["llvm","tutorial"],"latest_commit_sha":null,"homepage":"https://www.ethanuppal.com/blog/3-12-35-llvm-pass-in-rust.html","language":"Rust","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/ethanuppal.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":"2025-03-10T19:59:00.000Z","updated_at":"2025-03-17T04:57:44.000Z","dependencies_parsed_at":"2025-03-14T16:19:44.722Z","dependency_job_id":null,"html_url":"https://github.com/ethanuppal/llvm-pass-skeleton-rs","commit_stats":null,"previous_names":["ethanuppal/llvm-pass-skeleton","ethanuppal/llvm-pass-skeleton-rs"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanuppal%2Fllvm-pass-skeleton-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanuppal%2Fllvm-pass-skeleton-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanuppal%2Fllvm-pass-skeleton-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanuppal%2Fllvm-pass-skeleton-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethanuppal","download_url":"https://codeload.github.com/ethanuppal/llvm-pass-skeleton-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252834025,"owners_count":21811299,"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":["llvm","tutorial"],"created_at":"2025-03-14T16:19:49.506Z","updated_at":"2025-05-07T07:34:12.696Z","avatar_url":"https://github.com/ethanuppal.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"A completely useless LLVM pass. It's for LLVM 18. This is the Rust version of\n[sampsyo/llvm-pass-skeleton](https://github.com/sampsyo/llvm-pass-skeleton).\n\nSee the `mutate` branch for a slightly less skeletal example.\n\n1. Build:\n```shell\nexport LLVM_SYS_180_PREFIX=$(/bin/sh prefix.sh)\ncargo build || (cargo clean \u0026\u0026 cargo build)\n```\n\n2. Generate IR (replace `test.c` with any other C/C++ file you want to test):\n```\n$LLVM_SYS_180_PREFIX/bin/clang -S -emit-llvm -o out.ll test.c\n```\n\n3. Run:\n   - **macOS**:\n     ```shell\n     $LLVM_SYS_180_PREFIX/bin/opt --load-pass-plugin=\"target/debug/libskeleton_pass.dylib\" --passes=skeleton-pass -disable-output out.ll\n     ```\n   - **Linux**:\n     ```shell\n     $LLVM_SYS_180_PREFIX/bin/opt --load-pass-plugin=\"target/debug/libskeleton_pass.so\" --passes=skeleton-pass -disable-output out.ll\n     ```\n\nIt can be useful to put these commands in a `Makefile`, `Justfile`, or shell\nscript.\n\nThis pass is verified under continuous integration to work on macOS and Linux.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanuppal%2Fllvm-pass-skeleton-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethanuppal%2Fllvm-pass-skeleton-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanuppal%2Fllvm-pass-skeleton-rs/lists"}