diff options
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,15 +1,16 @@ use pyo3::prelude::*; +use pyo3::wrap_pyfunction; -/// Formats the sum of two numbers as string. #[pyfunction] -fn sum_as_string(a: usize, b: usize) -> PyResult<String> { - Ok((a + b).to_string()) +fn process_rule_pack(rule_pack: &str) -> PyResult<String> { + // 处理规则包的逻辑 + Ok(format!("Processed rule pack: {}", rule_pack)) } /// A Python module implemented in Rust. #[pymodule] #[pyo3(name = "libcore")] -fn corelib(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_function(wrap_pyfunction!(sum_as_string, m)?)?; +fn libcore(_py: Python, m: &PyModule) -> PyResult<()> { + m.add_function(wrap_pyfunction!(process_rule_pack, m)?)?; Ok(()) }
\ No newline at end of file |
