{"id":14991141,"url":"https://github.com/cr0a3/rllvm","last_synced_at":"2025-04-12T03:30:21.945Z","repository":{"id":239063609,"uuid":"798303385","full_name":"Cr0a3/rllvm","owner":"Cr0a3","description":"LLVM alternative in Rust","archived":false,"fork":false,"pushed_at":"2024-05-20T09:55:18.000Z","size":131,"stargazers_count":16,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T12:53:23.657Z","etag":null,"topics":["codegen","codegenlib","llvm","x64"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cr0a3.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":"2024-05-09T14:05:54.000Z","updated_at":"2025-03-29T16:59:49.000Z","dependencies_parsed_at":"2024-05-19T12:43:42.858Z","dependency_job_id":"1571e0fc-4617-4fa4-96fc-6dbc15744bf6","html_url":"https://github.com/Cr0a3/rllvm","commit_stats":null,"previous_names":["toni-graphics/rllvm","cr0a3/rllvm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cr0a3%2Frllvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cr0a3%2Frllvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cr0a3%2Frllvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cr0a3%2Frllvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cr0a3","download_url":"https://codeload.github.com/Cr0a3/rllvm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248512418,"owners_count":21116598,"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":["codegen","codegenlib","llvm","x64"],"created_at":"2024-09-24T14:21:34.077Z","updated_at":"2025-04-12T03:30:21.925Z","avatar_url":"https://github.com/Cr0a3.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RLLVM\n\n![Languages](https://img.shields.io/github/languages/top/Toni-Graphics/rllvm?logo=rust)\n![GitHub Repo stars](https://img.shields.io/github/stars/Toni-Graphics/rllvm?style=flat)\n![GitHub License](https://img.shields.io/github/license/Toni-Graphics/rllvm)\n![Dynamic TOML Badge](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2FToni-Graphics%2Frllvm%2Fmain%2FCargo.toml\u0026query=%24.package.version\u0026label=version)\n\nLLVM alternativ\n\n## Example\n\n```rust\nuse std::error::Error;\nuse rllvm::prelude::*;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn Error\u003e\u003e{\n    let mut contxt = Context::new( Triple::host() )?;\n    let func = contxt.add_function(\"add\", vec![Type::u32, Type::u32], Type::u32);\n    let asm = func.asm_func()?;\n\n    let x = asm.arg(0).unwrap();\n    let y = asm.arg(1).unwrap();\n\n    func.ir.push( Return::new(*(x + y) ) );\n\n\n    unsafe {\n        let mut func: JitFunction\u003cunsafe extern \"C\" fn(u32, u32) -\u003e u32\u003e = contxt.get_jit_function(\"add\")?;\n        let out = func.call(5, 5);\n\n        println!(\"main() -\u003e {}\", out);\n    }\n\n    Ok(())\n}\n```\n\n## ToDo\n\nHere is a bit of ToDo for my libary:\n\n## v0.1.2\n\n- [x] Starting high level ir struct\n  - [x] Use traits `impl Compiler for Ir::Add\u003cVar, Int\u003e` so i can overload the enum variants\n  - [x] Make it compilable\n  - [ ] Implement `mov`, `add`, `sub`, `mul`, `div` | `ints`, `floats`\n    - [ ] mov\n    - [x] add\n    - [x] sub\n    - [x] mul\n    - [ ] div\n    - [x] ints\n    - [ ] floats\n  - [x] Starting high level ir builder\n    - [x] via traits\n\n## v0.1.3\n\n- [x] Implement `args` to the high level ir\n- [x] Add option (in `context`) to compile to object file\n- [ ] Naming convention\n  - [x] generate\n  - [ ] parse\n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcr0a3%2Frllvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcr0a3%2Frllvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcr0a3%2Frllvm/lists"}