We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a32e3b commit e52db29Copy full SHA for e52db29
1 file changed
rust/src/lib.rs
@@ -2,17 +2,8 @@ use pyo3::prelude::*;
2
3
mod raw;
4
5
-/// Example function implemented in Rust to demonstrate PyO3 integration.
6
-#[pyfunction]
7
-fn rust_add(a: i64, b: i64) -> PyResult<i64> {
8
- Ok(a + b)
9
-}
10
-
11
-/// PyO3 module definition exposed to Python as `wily._rust`.
12
#[pymodule]
13
fn _rust(_py: Python<'_>, module: &Bound<'_, PyModule>) -> PyResult<()> {
14
- module.add_function(wrap_pyfunction!(rust_add, module)?)?;
15
raw::register(module)?;
16
- module.add("__version__", env!("CARGO_PKG_VERSION"))?;
17
Ok(())
18
}
0 commit comments