Complete migration to Rust implementation

- Migrate optimization from optimize.sh to src/optimization/
- Remove all Python files (analytics/, server/, hooks/, pyproject.toml)
- Add optimization module: optimizer.rs, parser.rs, mod.rs
- Implement all missing MCP tool handlers (35 total tools)
- Add handle_patch_set_file handler
- Clean up orphan files: .venv/, __pycache__, test files
- Move test_rcp_server.sh to tests/integration_test.sh
- Add Rust integration tests in tests/integration_tests.rs
- Fix all compiler warnings with #[allow(dead_code)]
- Update test fixtures and structure
This commit is contained in:
Devid HW
2026-04-18 15:57:28 +07:00
parent a3b046c68f
commit 331b7fbb73
29 changed files with 1405 additions and 5401 deletions
+3 -2
View File
@@ -30,6 +30,7 @@ pub struct BacktestParams {
pub skip_compile: bool,
pub skip_clean: bool,
pub skip_analyze: bool,
#[allow(dead_code)]
pub deep_analyze: bool,
pub shutdown: bool,
pub kill_existing: bool,
@@ -250,7 +251,7 @@ start terminal64.exe /config:"C:\Program Files\MetaTrader 5\backtest_config.ini"
let bat_path = wine_prefix.join("drive_c").join("_mt5mcp_run.bat");
fs::write(&bat_path, bat_content)?;
let cmd = format!("cmd.exe /c 'C:\\_mt5mcp_run.bat'");
let _cmd = format!("cmd.exe /c 'C:\\_mt5mcp_run.bat'");
if params.shutdown {
let output = Command::new("timeout")
@@ -346,7 +347,7 @@ start terminal64.exe /config:"C:\Program Files\MetaTrader 5\backtest_config.ini"
}
async fn kill_mt5(&self) -> Result<()> {
let output = Command::new("pkill")
let _output = Command::new("pkill")
.args(&["-TERM", "-f", "terminal64\\.exe"])
.output()?;
+6
View File
@@ -1,6 +1,7 @@
use anyhow::Result;
use std::path::PathBuf;
#[allow(dead_code)]
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Stage {
Compile,
@@ -11,6 +12,7 @@ pub enum Stage {
Done,
}
#[allow(dead_code)]
impl Stage {
pub fn as_str(&self) -> &'static str {
match self {
@@ -35,8 +37,10 @@ impl Stage {
}
}
#[allow(dead_code)]
pub struct StageExecutor;
#[allow(dead_code)]
impl StageExecutor {
pub fn new() -> Self {
Self
@@ -74,12 +78,14 @@ impl StageExecutor {
}
}
#[allow(dead_code)]
pub struct StageResult {
pub success: bool,
pub message: String,
pub output: Option<PathBuf>,
}
#[allow(dead_code)]
impl StageResult {
pub fn success() -> Self {
Self {