nac3/nac3embedded/src/lib.rs

15 lines
298 B
Rust
Raw Normal View History

2020-12-18 10:09:35 +08:00
use pyo3::prelude::*;
use pyo3::wrap_pyfunction;
#[pyfunction]
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
Ok((a + b).to_string())
}
#[pymodule]
fn nac3embedded(py: Python, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
Ok(())
}