-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
53 lines (47 loc) · 1.93 KB
/
Cargo.toml
File metadata and controls
53 lines (47 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[package]
name = "rhwp-python"
version = "0.6.1"
edition = "2021"
# ^ rust-version 미명시 — 상위 rhwp crate 정책(stable Rust, MSRV unclaimed) 준수.
# PyO3 0.28 이 Rust 1.83+ 요구하지만, 이는 README 에 문서로 안내
license = "MIT"
description = "PyO3 Python bindings for rhwp — HWP/HWPX parser and renderer"
repository = "https://github.com/DanMeon/rhwp-python"
readme = "README.md"
publish = false
# * sdist 포함 파일 제어 (pydantic-core 패턴)
# 주의:
# - 반드시 [package] 내부에 둘 것. [workspace] 이후에 두면 workspace.include 로 잘못 파싱됨
# - LICENSE 는 신규 리포 루트에 보유 → sdist 에 포함 (maturin license-files 설정과 중복 안 됨)
include = [
"/pyproject.toml",
"/README.md",
"/LICENSE",
"/src",
"/python/rhwp",
"/tests",
"!__pycache__",
"!*.so",
"!*.pyd",
]
# * 자기 자신을 독립 workspace root 로 선언
# submodule 의 external/rhwp Cargo.toml 이 [workspace] 를 추가해도 이 crate 가 자동 편입되지 않도록 안전장치
[workspace]
[lib]
name = "_rhwp"
crate-type = ["cdylib", "rlib"]
# * extension-module 을 default features 에서 분리한다 — wheel 빌드 시에만 활성화
# cargo test 는 default 로 비활성 → libpython 링크 시도 회피 → Rust unit test 실행 가능
# ([PyO3 FAQ](https://pyo3.rs/main/faq#i-cant-run-cargo-test) 권장 패턴).
# maturin 은 [tool.maturin] features 에서 명시적으로 ["extension-module"] 활성화하므로 wheel 영향 0.
[features]
extension-module = ["pyo3/extension-module"]
[dependencies]
pyo3 = { version = "0.28", features = ["abi3-py310"] }
# ^ native-skia: 상류 SkiaLayerRenderer (PR #599 PNG 게이트웨이) 활성화.
# skia-safe binary-cache 가 빌드 시점 약 30 MB pre-built binary 다운로드.
rhwp = { path = "external/rhwp", features = ["native-skia"] }
[profile.release]
lto = "fat"
codegen-units = 1
strip = true