mirror of
https://github.com/neodyland/sbv2-api.git
synced 2026-01-08 07:22:56 +00:00
17 lines
405 B
Rust
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(())
|
|
}
|