| Crates.io | rem-utils |
| lib.rs | rem-utils |
| version | 0.1.6 |
| created_at | 2023-04-25 10:07:07.044188+00 |
| updated_at | 2025-03-05 13:52:52.537462+00 |
| description | Utilities for Rusty Extraction Maestro |
| homepage | |
| repository | https://github.com/RuleBrittonica/rem-utils.git |
| max_upload_size | |
| id | 848335 |
| size | 98,747 |
<<<<<<< HEAD
rem-utils is a utilities library for the Rusty Extraction Maestro (REM) toolchain.
It is used as a reference for the following crates:
- rem-controller
- rem-borrower
- rem-repairer
- rem-constraint
It requires internal access to the rust toolchain, using
#![feature(rustc_private)].
The rust-toolchain.toml file specifies the rest of the build dependecies, and is shared across all of the REM toolchain.
As a minimum you should have:
- rust-src
- rust-dev
- llvm-tools-preview
It is currently configured to run on the nightly-2024-08-28 build of rust,
however, other nightly builds may also work.
You can install these components by running:
```bash
rustup component add --toolchain nightly-2024-08-28 rust-src rustc-dev llvm-tools-preview
```
=======
rem-utils is a utilities library for the Rusty Extraction Maestro (REM) toolchain.
It is used as a reference for the following crates:
- rem-controller
- rem-borrower
- rem-repairer
- rem-constraint
As of version 0.1.4, this library is no longer dependent on rustc!
The rust-toolchain.toml file specifies the rest of the build dependecies, and is shared across all of the REM toolchain.
As a minimum you should have:
- rust-src
- rust-dev
- llvm-tools-preview
It is currently configured to run on the nightly-2024-08-28 build of rust,
however, other nightly builds may also work.
You can install these components by running:
rustup component add --toolchain nightly-2024-08-28 rust-src rustc-dev llvm-tools-preview
Compilation Utilities
compile_file(file_name: &str, args: &Vec<&str>) -> Command: Compiles a Rust file using rustc with optional arguments.Formatting Utilities
fmt_file(file_name: &str, args: &Vec<&str>) -> Command: Formats a Rust file using rustfmt with optional arguments.Linting Utilities
lint_file(file_name: &str, args: &Vec<&str>) -> Command: Lints a Rust file using cargo clippy with optional arguments.Project Checking and Building
check_project(manifest_path: &str, cargo_args: &Vec<&str>) -> Command: Checks the Rust project for errors using cargo check, with customizable arguments.build_project(manifest_path: &str, cargo_args: &Vec<&str>) -> Command: Builds the Rust project using cargo build, with customizable arguments.Code Analysis
find_caller(file_name: &str, caller_name: &str, callee_name: &str, callee_body_only: bool) -> (bool, String, String): Finds a function call within the specified file and retrieves the caller and callee function definitions.Source Formatting
format_source(src: &str) -> String: Formats Rust source code using rustfmt.a1b7036e19119c62935e9f7ecc72ecee3c33a837