aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/main.rs
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2024-06-05 04:06:00 +0800
committer简律纯 <i@jyunko.cn>2024-06-05 04:06:00 +0800
commit09413f06949b421a1c5b0cc05d70d84b184d3397 (patch)
tree7b74bdafac7fb420d73137683209ba7d46acdda2 /src/main.rs
parent28a7b2ecd90e7e67427682a99b8616e13042b4ab (diff)
downloadHydroRollCore-09413f06949b421a1c5b0cc05d70d84b184d3397.tar.gz
HydroRollCore-09413f06949b421a1c5b0cc05d70d84b184d3397.zip
feat(rust): wrap_pyfunction "process_rule_pack" in libcore module
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..a855efc
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,13 @@
+use lib::process_rule_pack;
+
+fn main() {
+ let args: Vec<String> = std::env::args().collect();
+ if args.len() < 2 {
+ eprintln!("Usage: {} <rule_pack>", args[0]);
+ std::process::exit(1);
+ }
+ match process_rule_pack(&args[1]) {
+ Ok(result) => println!("Result: {}", result),
+ Err(e) => eprintln!("Error: {}", e),
+ }
+} \ No newline at end of file