{"id":15735135,"url":"https://github.com/antonioberna/roma","last_synced_at":"2026-02-27T12:12:48.760Z","repository":{"id":257478064,"uuid":"858394021","full_name":"AntonioBerna/roma","owner":"AntonioBerna","description":"Runtime Optimization and Memory Analysis","archived":false,"fork":false,"pushed_at":"2025-01-25T21:14:56.000Z","size":280,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T18:57:14.517Z","etag":null,"topics":["assembly","c","cpp","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-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntonioBerna.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-09-16T20:19:09.000Z","updated_at":"2025-01-31T12:13:03.000Z","dependencies_parsed_at":"2024-10-25T00:15:35.355Z","dependency_job_id":"1873ae8b-d4de-4dd4-a3a4-6780877b21a5","html_url":"https://github.com/AntonioBerna/roma","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"c079d8b0d40ee03c896c10d5b3ed95a0e137a536"},"previous_names":["antonioberna/roma"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioBerna%2Froma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioBerna%2Froma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioBerna%2Froma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioBerna%2Froma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntonioBerna","download_url":"https://codeload.github.com/AntonioBerna/roma/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243357652,"owners_count":20277988,"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":["assembly","c","cpp","rust"],"created_at":"2024-10-04T01:09:47.999Z","updated_at":"2026-02-27T12:12:46.469Z","avatar_url":"https://github.com/AntonioBerna.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\".github/imgs/roma-removebg.png\" width=\"250\"\u003e\n    \u003cbr\u003e\n    \u003cstrong\u003eRuntime Optimization and Memory Analysis\u003c/strong\u003e\n\u003c/p\u003e\n\n# roma\n\n![GitHub License](https://img.shields.io/github/license/AntonioBerna/roma)\n![GitHub Created At](https://img.shields.io/github/created-at/antonioberna/roma)\n\n```\n ____           ___                  __  __           _\n|  _ \\         / _ \\                |  \\/  |         / \\ \n| |_) |       | | | |               | |\\/| |        / _ \\ \n|  _ \u003c        | |_| |               | |  | |       / ___ \\\n|_| \\_\\untime  \\___/ptimization and |_|  |_|emory /_/   \\_\\nalysis\n```\n\n\u003e [!TIP]\n\u003e Would you like to create these custom texts using `figlet`? For more information click [here](https://github.com/AntonioBerna/maximus.git).\n\n\u003e [!WARNING]\n\u003e This repository is unfinished. Keep your expectations low.\n\n\u003e [!WARNING]\n\u003e At the moment there is only support for the `C` language but in the future I plan to add support for `Assembly`, and `C++` as well.\n\n## Activity\n\n\u003cimg src=\"https://repobeats.axiom.co/api/embed/0d58ecee9de031a6ccc14b5bf32d4c7fd390982e.svg\" width=\"100%\" /\u003e\n\n## Why `roma`?\n\nI know what you're thinking: why create a software to compile `C` (or `Assembly`, and `C++`) code if `Makefile` or `CMakeLists.txt` already exist? The answer is simple and now I will explain my reasoning with a simple example.\n\nImagine you have many small projects as shown below:\n\n```\n.\n├── 01\n│   ├── Makefile\n│   └── main.c\n├── 02\n│   ├── Makefile\n│   └── main.c\n├── 03\n│   ├── Makefile\n│   └── main.c\n\n...\n```\n\nEach individual project consists of a `main.c` file and a `Makefile`. Of course each project has a different purpose so it is normal that the `C` code of each individual `main.c` is different, but this does not apply to `Makefiles` which tend to be copied and pasted from one project to the next.\n\nBy the way, if for project number `x` I modified the `Makefile` to optimize something, then I have to copy and paste for all the other projects, generating lots of uncontrolled `Makefiles`.\n\nIt is for this very reason that I came up with the idea of ​​creating `roma`, an all-in-one software written in `Rust` that allows me to compile the `C` (or `Assembly` and `C++`) code.\n\nAs will become clearer later, it is possible to compile the examples in the `examples/` directory arranged as follows:\n\n```\n.\n├── Cargo.lock\n├── Cargo.toml\n├── examples\n│   └── C\n│       ├── complex-hello\n│       │   ├── include\n│       │   │   └── log.h\n│       │   └── src\n│       │       ├── log.c\n│       │       └── main.c\n│       ├── print-args\n│       │   └── main.c\n│       └── simple-hello\n│           └── main.c\n├── legacy-python-version\n│   ├── install.sh\n│   ├── README.md\n│   ├── requirements.txt\n│   └── roma.py\n├── LICENSE\n├── README.md\n└── src\n    └── main.rs\n```\n\n\u003e [!NOTE]\n\u003e Of course, depending on your needs you can also use `roma` inside an `x` project, for example inside a `client-server` application to compile the client and the server separately using the same script and not having two separate `Makefiles` or `CMakeLists.txt`.\n\n## Download \u0026 Installation\n\nFirst of all, you have to clone the repository using the following command:\n\n```\ngit clone https://github.com/AntonioBerna/roma.git\n```\n\nsubsequently, using the command `cd roma/` you will be able to access the `roma/` directory.\n\nNow you can install the program in your system with the following command:\n\n```\ncargo install --path .\n```\n\n\u003e [!NOTE]\n\u003e I recommend installing the software inside the system so that it can be invoked from any point of your computer.\n\n## Uninstall\n\nIf you want uninstall the software you can use the command:\n\n```\ncargo uninstall roma\n```\n\nwhich will remove the software from the system.\n\n## Usage\n\nAfter the installation, you can run the program with the following command:\n\n```\nroma --help\n```\n\nwhich will give us the following output:\n\n```\nRuntime Optimization and Memory Analysis\n\nUsage: roma [OPTIONS] --language \u003cLANGUAGE\u003e --action \u003cACTION\u003e \u003cPROJECT_DIR\u003e\n\nArguments:\n  \u003cPROJECT_DIR\u003e  Path to the project directory\n\nOptions:\n  -l, --language \u003cLANGUAGE\u003e              Programming language [possible values: c, asm, cpp]\n  -a, --action \u003cACTION\u003e                  Action to perform [possible values: build, valgrind, clean]\n      --compiler \u003cCOMPILER\u003e              Compiler to use\n      --target \u003cTARGET\u003e                  Target name\n      --target-options \u003cTARGET_OPTIONS\u003e  Target options for valgrind [default: ]\n  -h, --help                             Print help\n  -V, --version                          Print version\n```\n\n## Examples\n\n### simple-hello\n\nConsider the project `examples/C/simple-hello/`. Inside this project there is only one `main.c` file, so let's specify the project path as an option of `roma` and then specify that it is a project created in `C` and that we want to build it to generate the ELF file:\n\n```\nroma --language c --action build examples/C/simple-hello/\n```\n\nthe output of this command is as follows:\n\n```\nBuild completed. Run with ./examples/C/simple-hello/bin/simple-hello/\n```\n\nthen using the command `./examples/C/simple-hello/bin/simple-hello/` we run the ELF file obtaining:\n\n```\nHello, World!\n```\n\n\u003e [!NOTE]\n\u003e Since the `--target` option was not specified, the ELF file took the name of the project directory.\n\nSo let's try using `valgrind` using the following command:\n\n```\nroma --language c --action valgrind examples/C/simple-hello/\n```\n\nin order to obtain:\n\n```\nBuild completed. Run with ./examples/C/simple-hello/bin/simple-hello\nHello, World!\nValgrind completed. Check ./examples/C/simple-hello/log/valgrind.txt\n```\n\n\u003e [!NOTE]\n\u003e Using the command `cat ./examples/C/simple-hello/log/valgrind.txt` you can view the output of `valgrind` to see if the code reports any vulnerabilities.\n\nFinally using the command:\n\n```\nroma --language c --action clean examples/C/simple-hello/\n```\n\nin order to obtain:\n\n```\nClean completed.\n```\n\n\u003e [!NOTE]\n\u003e The interesting thing about the `roma` project is that it can automatically understand the structure of the `C` code and therefore \"knows\" where to get the source files. Typically, `C` projects are divided into the `src/` and `include/` directories and it is for this reason that if we try to execute the commands already seen previously with the example `examples/C/complex-hello/` we get the same result.\n\n### print-args\n\nConsider the project `examples/C/print-args/`. This example is to understand the use of the `--compiler`, `--target` and `--target-options` options. In particular, using the following command:\n\n```\nroma --language c --action valgrind --compiler clang --target pippo --target-options \"pluto paperino\" examples/C/print-args/\n```\n\nyou get the following output:\n\n```\nBuild completed. Run with ./examples/C/print-args/bin/pippo\nNumber of arguments: 3\nProgram name: examples/C/print-args/bin/pippo\nArguments:\n  1: pluto\n  2: paperino\nValgrind completed. Check ./examples/C/print-args/log/valgrind.txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonioberna%2Froma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonioberna%2Froma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonioberna%2Froma/lists"}