forked from M-Labs/nac3
15 lines
298 B
Rust
15 lines
298 B
Rust
|
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(())
|
||
|
}
|