Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v7
with:
name: wheels
name: wheels-linux
path: dist

windows:
Expand All @@ -27,11 +27,11 @@ jobs:
- uses: messense/maturin-action@v1
with:
command: build
args: --release --no-sdist -o dist
args: --release -o dist
- name: Upload wheels
uses: actions/upload-artifact@v7
with:
name: wheels
name: wheels-windows
path: dist

macos:
Expand All @@ -41,11 +41,11 @@ jobs:
- uses: messense/maturin-action@v1
with:
command: build
args: --release --no-sdist -o dist --universal2
args: --release -o dist --target universal2-apple-darwin
- name: Upload wheels
uses: actions/upload-artifact@v7
with:
name: wheels
name: wheels-macos
path: dist

release:
Expand All @@ -56,7 +56,8 @@ jobs:
steps:
- uses: actions/download-artifact@v8
with:
name: wheels
pattern: wheels-*
merge-multiple: true
- name: Publish to PyPI
uses: messense/maturin-action@v1
env:
Expand Down
133 changes: 133 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["maturin>=0.12,<0.13"]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"

[project]
Expand Down
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use pyo3::prelude::*;

/// Formats the sum of two numbers as string.
Expand All @@ -9,7 +8,7 @@ fn sum_as_string(a: usize, b: usize) -> PyResult<String> {

/// A Python module implemented in Rust.
#[pymodule]
fn rust_python_extension(_py: Python, m: &PyModule) -> PyResult<()> {
fn rust_python_extension(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
Ok(())
}
}
Loading