Skip to content

Commit fcb900c

Browse files
committed
feat: little update to readme and complex example
1 parent 4481722 commit fcb900c

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/target
22
.vscode
3-
.env
3+
.env
4+
.DS_Store

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
`auto-rust` is an experimental project that aims to automatically generate Rust code with LLM (Large Language Models) during compilation, utilizing procedural macros.
44

5+
<p align="center">
6+
<img width="640" src="public/auto_rust_example.png">
7+
</p>
8+
59
## ⚠️ Warning
610

711
Please note that Auto-Rust is currently under development and is not yet suitable for production use. While you are welcome to try it out and provide feedback, we caution that it may have an incomplete implementation and may not function as intended.
@@ -13,6 +17,12 @@ Please note that Auto-Rust is currently under development and is not yet suitabl
1317
auto-rust = "0.1.0"
1418
```
1519

20+
You need to create a .env file in the root of your project with the following content:
21+
22+
```bash
23+
OPENAI_API_KEY=<your-openai-api-key>
24+
```
25+
1626
## Example
1727

1828
```rust

examples/complex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use auto_rust::auto_implement;
22

33
#[auto_implement]
4-
#[doc = "This function calculates if the input is a valid email address without use regex."]
4+
#[doc = "This function checks if a string is an email without regex."]
55
fn is_email(input: String) -> bool {
66
todo!()
77
}
88

99
fn main() {
10-
let result = is_email("bregyminsky.cc".to_string());
10+
let result = is_email("bregy@minsky.cc".to_string());
1111
println!("result: {}", result);
1212
}

public/auto_rust_example.png

281 KB
Loading

0 commit comments

Comments
 (0)