Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maekawatoshiki/vicis
Manipulate LLVM-IR in Pure Rust
https://github.com/maekawatoshiki/vicis
compiler llvm rust
Last synced: 4 days ago
JSON representation
Manipulate LLVM-IR in Pure Rust
- Host: GitHub
- URL: https://github.com/maekawatoshiki/vicis
- Owner: maekawatoshiki
- License: mit
- Created: 2020-12-17T06:03:18.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-30T13:37:24.000Z (over 2 years ago)
- Last Synced: 2024-12-15T22:09:57.571Z (11 days ago)
- Topics: compiler, llvm, rust
- Language: Rust
- Homepage:
- Size: 1.17 MB
- Stars: 214
- Watchers: 9
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vicis
[![CI](https://github.com/maekawatoshiki/vicis/workflows/Rust/badge.svg)](https://github.com/maekawatoshiki/vicis/actions/workflows/rust.yml)
[![codecov](https://codecov.io/gh/maekawatoshiki/vicis/branch/master/graph/badge.svg)](https://codecov.io/gh/maekawatoshiki/vicis)
[![discussions](https://img.shields.io/static/v1?logo=github&style=flat&color=blueviolet&message=Discussions&label=GitHub)](https://github.com/maekawatoshiki/vicis/discussions)
[![](http://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)Manipulate LLVM IR in pure Rust (without LLVM).
Feel free to create issues and pull requests!
# Requirements
- Vicis itself is not depending on llvm
- However, I sometimes use llvm 13 for testing. (e.g. parsing the llvm-ir clang-13 emitted by vicis)# Examples
- Parse and dump `*.ll` file
```sh
cargo run --example parse FILE.ll
```- Interpret `*.ll` file
```
cargo run --example interpreter FILE.ll # --release
```- [Iterate over instructions](./core/examples/iterate.rs)
- [Compile LLVM IR into machine code](./codegen/examples/example_x86_64.rs)
- The example illustrates the way for x86_64, but it's easy to do the same thing for aarch64 (although aarch64 backend is still heavily under development.)