Unify CVector/CMatrix as CArray{T,N} aliases#41
Merged
Merged
Conversation
Introduces `CArray{T,N} <: AbstractArray{T,N}` with
`dims::NTuple{N,Int32}`; `data::Ptr{T}` as the canonical N-D buffer
descriptor for crossing a `@ccallable` boundary, and keeps the familiar
names as type aliases (`const CVector{T} = CArray{T,1}`,
`const CMatrix{T} = CArray{T,2}`), mirroring Julia's own
`Vector{T} = Array{T,1}` relationship. This extends the JLWInterop
vocabulary to arbitrary rank and exposes higher-D buffers to binding
targets (numpy, Fortran-iso_c, plain C) that already speak them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Julia's bundled `share/julia/juliac/juliac.jl` is being removed upstream (per Gabriel on Slack), so the in-tree script the `:script` backend wrapped no longer has a future. JuliaC.jl already covers everything we need; remove the dead branch. Specifically: - `src/build.jl`: drop `:script` from the `backend` kwarg, the bundle/script incompatibility check, the `julia::Cmd` kwarg (only used by `:script`), and the `_locate_juliac_script` / `_build_library_script` helpers. `backend = :auto` and `backend = :juliac` remain as synonyms so the call surface stays open for additional future backends. - `test/test_build_library.jl`: drop the `backend = :script` arm of the end-to-end test, and the bundle-incompatible-with-script test case. - `docs/src/concepts.md`: drop the sentence about opting into the in-tree script. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #41 +/- ##
==========================================
+ Coverage 94.78% 95.01% +0.22%
==========================================
Files 5 5
Lines 901 822 -79
==========================================
- Hits 854 781 -73
+ Misses 47 41 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Introduces
CArray{T,N} <: AbstractArray{T,N}withdims::NTuple{N,Int32};data::Ptr{T}as the canonical N-D buffer descriptor for crossing a@ccallableboundary, and keeps the familiar names as type aliases (const CVector{T} = CArray{T,1},const CMatrix{T} = CArray{T,2}), mirroring Julia's ownVector{T} = Array{T,1}relationship. This extends the JLWInterop vocabulary to arbitrary rank and exposes higher-D buffers to binding targets (numpy, Fortran-iso_c, plain C) that already speak them.This is queued behind #31 and can't be merged until that is.