5 releases
0.1.4 | Nov 21, 2024 |
---|---|
0.1.3 | Nov 21, 2024 |
0.1.2 | Nov 6, 2024 |
0.1.1 | Nov 6, 2024 |
0.1.0 | Nov 6, 2024 |
#480 in Procedural macros
298 downloads per month
3KB
async_refactor
A library for automated async code refactoring in Rust.
Features
- Extract async functions from code snippets.
- Convert synchronous functions to async.
Installation
To use async_refactor
, add the following to your Cargo.toml
:
[dependencies]
async_refactor = "0.1.0"
Usage
use async_refactor::async_refactor;
fn main() {
let code = "let x = 5;";
let extracted_async = async_refactor::extract_async_function(code, "my_async_func");
println!("{}", extracted_async);
}
License
This project is licensed under the MIT License
Running the Project
- Build the project:
cargo build
Run the tests:
cargo test
Author
bensatlantik
Dependencies
~1.5MB
~37K SLoC