Crates.io | qroc |
lib.rs | qroc |
version | 0.1.0 |
source | src |
created_at | 2024-02-18 16:44:25.919341 |
updated_at | 2024-02-18 16:44:25.919341 |
description | Perl for procedural macros |
homepage | |
repository | https://gitea.jellypro.xyz/jude/qroc |
max_upload_size | |
id | 1144207 |
size | 4,297 |
Perl for procedural macros
Qroc allows you to write Perl directly into procedural macros. For instance,
fn main() {
println!("{}", add(1, 2));
}
#[perl {
$_ =~ s/populate/a + b/g;
}]
fn add(a: isize, b: isize) -> isize {
populate
}
...will compile to...
fn main() {
println!("{}", add(1, 2));
}
fn add(a: isize, b: isize) -> isize {
a + b
}
This package should be carefully considered before use. The cognitive dissonance of writing Perl alongside Rust is probably too much for even the greatest 10xer to handle. Also, this is blatant developer-environment RCE etc. as a feature. Hence, this package is perfectly safe in SOC2-compliant environments.
No effort made.
No effort made. Probably won't work on non-UNIX systems.