| Crates.io | biosvg |
| lib.rs | biosvg |
| version | 0.1.8 |
| created_at | 2023-08-28 14:42:10.680316+00 |
| updated_at | 2025-04-04 19:58:04.833267+00 |
| description | Captcha based on SVG. |
| homepage | https://github.com/Reverier-Xu/biosvg |
| repository | https://github.com/Reverier-Xu/biosvg |
| max_upload_size | |
| id | 957034 |
| size | 69,205 |
Captcha based on SVG.
cargo add biosvg
let (answer, svg) = BiosvgBuilder::new()
.length(4)
.difficulty(6)
.colors(vec![
"#0078D6".to_string(),
"#aa3333".to_string(),
"#f08012".to_string(),
"#33aa00".to_string(),
"#aa33aa".to_string(),
])
.build()
.unwrap();
println!("answer: {}", answer);
println!("svg: {}", svg);