Files
sbv2-api/sbv2_bindings/src/lib.rs
tuna2134 1de700147a hmm
2024-09-10 12:27:41 +00:00

17 lines
405 B
Rust

use pyo3::prelude::*;
mod sbv2;
/// Formats the sum of two numbers as string.
#[pyfunction]
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
Ok((a + b).to_string())
}
/// A Python module implemented in Rust.
#[pymodule]
fn sbv2_bindings(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
m.add_class::<sbv2::TTSModel>()?;
Ok(())
}