aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/lib.rs
blob: ac54f62d018f33edb9290bc40fb166105767e183 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
use pyo3::prelude::*;

#[pyfunction]
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
    Ok((a + b).to_string())
}

#[pymodule]
fn hydro_roll(_py: Python, m: &PyModule) -> PyResult<()> {
    m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
    Ok(())
}