Spaces:
Sleeping
Sleeping
Download sample_rust/src/lib.rs from sreepathi-ravikumar/fastprogram: direct link, hf CLI and curl.
- Browser
- Download file 287 Bytes
-
https://huggingface.co/spaces/sreepathi-ravikumar/fastprogram/resolve/main/sample_rust/src/lib.rs
- Command line
-
hf download hf://spaces/sreepathi-ravikumar/fastprogram/sample_rust/src/lib.rs
-
curl -L -o lib.rs https://huggingface.co/spaces/sreepathi-ravikumar/fastprogram/resolve/main/sample_rust/src/lib.rs
287 Bytes
| use pyo3::prelude::*; | |
| fn hello(name: &str) -> PyResult<String> { | |
| Ok(format!("Hello, {}! Welcome from Rust 🦀", name)) | |
| } | |
| fn sample_rust(_py: Python, m: &PyModule) -> PyResult<()> { | |
| m.add_function(wrap_pyfunction!(hello, m)?)?; | |
| Ok(()) | |
| } |