diff --git a/miner/Cargo.toml b/miner/Cargo.toml index fa14344..84b68ee 100644 --- a/miner/Cargo.toml +++ b/miner/Cargo.toml @@ -28,3 +28,7 @@ windows-sys = { version = "*", features = [ [features] default = ["simd"] simd = [] + +[[bin]] +name = "xp2" +path = "./src/xp_eval.rs" diff --git a/miner/src/xp_eval.rs b/miner/src/xp_eval.rs new file mode 100644 index 0000000..1038437 --- /dev/null +++ b/miner/src/xp_eval.rs @@ -0,0 +1,22 @@ +#![feature(portable_simd)] +#![feature(slice_swap_unchecked)] +#![allow(internal_features)] +#![feature(core_intrinsics)] +mod evaluate; +mod name; + +use std::env; + +use evaluate::NamerEvaluater; + +fn main() { + // 获取 cli 参数 + let arg = env::args().nth(1).expect("need a name to evaluate"); + let mut name = name::Namer::new(&arg).expect("your name have some thing wrong"); + name.update_skill(); + + let xu = evaluate::xuping::XuPing2_0_1015::evaluate(&name); + let xd = evaluate::xuping::XuPing2_0_1015_QD::evaluate(&name); + + println!("{xu}\n{xd}") +}