You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
293 B
13 lines
293 B
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 monotone(py: Python, m: &PyModule) -> PyResult<()> {
|
|
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
|
|
Ok(())
|
|
}
|