Skip to content

Commit 57bd3da

Browse files
committed
Add autonomy_in_rust_for_python
1 parent 39880f8 commit 57bd3da

File tree

8 files changed

+267
-0
lines changed

8 files changed

+267
-0
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ indent_size = 2
1717
# Make requires tab for indentation.
1818
[Makefile]
1919
indent_style = tab
20+
21+
[*.lock]
22+
indent_style = unset
23+
indent_size = unset

source/python/Cargo.lock

Lines changed: 171 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/python/Cargo.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "autonomy_in_rust_for_python"
3+
version = "0.1.0"
4+
edition = "2024"
5+
license = "Apache-2.0"
6+
7+
[lib]
8+
name = "autonomy"
9+
crate-type = ["cdylib"]
10+
doc = false
11+
12+
[dependencies]
13+
pyo3 = { version = "0.24.1", features = ["abi3-py312", "experimental-async"] }
14+
15+
[features]
16+
default = []

source/python/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
default: build
2+
3+
build:
4+
uv run --active maturin develop
5+
6+
clean:
7+
rm -rf target
8+
rm -rf python/autonomy/*.abi3.so

source/python/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# autonomy

source/python/pyproject.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[project]
2+
name = "autonomy"
3+
version = "0.1.0"
4+
requires-python = ">=3.12"
5+
classifiers = [
6+
"Programming Language :: Python :: 3",
7+
"Programming Language :: Rust",
8+
"License :: OSI Approved :: Apache Software License",
9+
]
10+
dependencies = []
11+
12+
[build-system]
13+
requires = ["maturin>=1.9,<2.0"]
14+
build-backend = "maturin"
15+
16+
[tool.maturin]
17+
features = ["pyo3/extension-module"]
18+
python-source = "python"
19+
module-name = "autonomy.autonomy_in_rust_for_python"
20+
21+
[dependency-groups]
22+
dev = ["maturin>=1.9.2"]

source/python/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
use pyo3::prelude::*;
2+
3+
#[pymodule]
4+
#[pyo3(name = "autonomy_in_rust_for_python")]
5+
fn autonomy_in_rust_for_python(_module: &Bound<'_, PyModule>) -> PyResult<()> {
6+
Ok(())
7+
}

source/python/uv.lock

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)