From ca3e091826385766a9c0d20c33d3af6f83b471cb Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Tue, 25 Jun 2024 20:57:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=B7=B1=E8=B0=83=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E7=9A=84=E5=8C=85=E5=8F=AF=E8=BF=98=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- miner/Cargo.toml | 4 ++++ miner/src/xp_eval.rs | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 miner/src/xp_eval.rs 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}") +}