Repository navigation
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rrect GIL SAFETY note
- Rename pyo3_glue::DLPackVersion -> DLPackVariant (all references updated) so that
downstream crates glob-importing both modules don't see an ambiguous DLPackVersion.
The C-ABI ffi::DLPackVersion {major, minor} is spec-mandated and unchanged.
- Fix backwards SAFETY comments in capsule_destructor_legacy/_versioned: Python calls
these WITH the GIL already held; re-acquiring it would deadlock.
- Add doc note on data_ptr() that first element is at data_ptr() + byte_offset().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…afe/pyo3 on top - Add Cargo workspace with dlpack-sys sub-crate - dlpack-sys: bindgen generates FFI types from vendor/dlpack/dlpack.h using ModuleConsts enum style - Replace hand-written src/ffi.rs with `pub use dlpack_sys::*;` re-export - Adapt src/safe.rs to use DLDeviceType::kDLCPU/kDLCUDA and DLDataTypeCode::kDL* constants (cast to u8) - Bump version to 0.3.0 in both crates - CI: add libclang-dev install step to all jobs - Disable doctests in dlpack-sys (bindgen doc comments contain C++ code blocks) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add stable public const aliases in src/ffi.rs that map to bindgen values with the correct struct field types, so consumers like kornia-py can use K_DL_CPU (u32), K_DL_UINT/FLOAT/INT/BOOL (u8), and DLPACK_FLAG_BITMASK_READ_ONLY/IS_COPIED (u64) without depending on bindgen-generated names (DLDeviceType::kDLCPU, etc.).
…nd feature (no libclang for default build/release) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…GIL drop); v0.3.2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The crates.io name `dlpack-sys` is owned by an unrelated crate (ehsanmok), so the sys crate can't be published under it — which blocks publishing `dlpack-rs` (and therefore any downstream crate, e.g. kornia-tensor, that must resolve a versioned dep instead of a git dep). Rename the sys crate to `dlpack-rs-sys` (free on crates.io; owned once published) so `dlpack-rs` — already owned by us on crates.io — can ship with a real version dependency. `dlpack-rs` keeps its name. Only src/ffi.rs referenced the sys crate (path `dlpack_sys::` -> `dlpack_rs_sys::`). Both crates bumped 0.3.2 -> 0.3.3. No API change. Builds default + pyo3; ABI layout test passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
Superseded by the inline approach (#8) — no sys crate to publish. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks publishing
dlpack-rsto crates.io (needed so kornia-rs can depend on a versioned crate instead of a git tag).Why: the crates.io name
dlpack-sysis owned by an unrelated crate, so the sys crate can't publish under it. Rename todlpack-rs-sys(free).dlpack-rskeeps its name (owned by us on crates.io).Change: rename sys crate + dir, update the single consumer (
src/ffi.rs), bump both to 0.3.3. No API change. Builds default +pyo3; ABI test passes.After merge — publish (owner):
🤖 Generated with Claude Code