5 releases
0.1.5 | Sep 19, 2024 |
---|---|
0.1.4 | Sep 3, 2024 |
0.1.3 | Aug 30, 2024 |
0.1.1 | May 17, 2023 |
0.1.0 | Apr 25, 2023 |
#109 in Procedural macros
Used in 5 crates
88KB
2K
SLoC
rem-utils
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
Requirements
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.
Installation
You can install these components by running:
rustup component add --toolchain nightly-2024-08-28 rust-src rustc-dev llvm-tools-preview
Function Exports
-
Compilation Utilities
compile_file(file_name: &str, args: &Vec<&str>) -> Command
: Compiles a Rust file usingrustc
with optional arguments.
-
Formatting Utilities
fmt_file(file_name: &str, args: &Vec<&str>) -> Command
: Formats a Rust file usingrustfmt
with optional arguments.
-
Linting Utilities
lint_file(file_name: &str, args: &Vec<&str>) -> Command
: Lints a Rust file usingcargo clippy
with optional arguments.
-
Project Checking and Building
check_project(manifest_path: &str, cargo_args: &Vec<&str>) -> Command
: Checks the Rust project for errors usingcargo check
, with customizable arguments.build_project(manifest_path: &str, cargo_args: &Vec<&str>) -> Command
: Builds the Rust project usingcargo 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 usingrustfmt
.
Dependencies
~3–10MB
~110K SLoC