Skip to content

Commit

Permalink
feat: .
Browse files Browse the repository at this point in the history
  • Loading branch information
HHongSeungWoo committed Dec 27, 2023
1 parent ee8abe5 commit d6d9e4d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
use pyo3::prelude::*;
use ulid::{Ulid};

/// Formats the sum of two numbers as string.
#[pyfunction]
fn test() -> PyResult<String> {
#[pyo3(name="ulid")]
fn get_ulid() -> PyResult<String> {
Ok(Ulid::new().to_string())
}

/// A Python module implemented in Rust.
#[pymodule]
fn pkpy(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(test, m)?)?;
m.add_function(wrap_pyfunction!(get_ulid, m)?)?;
Ok(())
}

0 comments on commit d6d9e4d

Please sign in to comment.