Repository navigation
JLWInterop-v0.2.0
·
16 commits
to main
since this release
JLWInterop JLWInterop-v0.2.0
Breaking changes
- Carriers now encode ownership in their type.
CArray{T,N}becomes
CArray{owned,T,N}andCStringbecomesCString{owned}, whereownedis
:ownedor:borrowed; the aliases follow asCVector{owned,T}and
CMatrix{owned,T}. An entry point writtenf(v::CVector{Float64})is now
f(v::CVector{:borrowed,Float64}). Any other value for the parameter throws
anArgumentError. A target reads "release this" or "do not release this"
off the signature alone. - Carrier lengths and dimensions are
Int64, previouslyInt32:
CArray.dims::NTuple{N,Int64}andCString.length::Int64. This changes the
struct layout, so a library and the bindings generated for it must both be
rebuilt against v0.2. CArrayis now aDenseArray{T,N}rather than anAbstractArray{T,N}, and
supportspointer,Base.unsafe_convert,Base.elsize, and aliasing
queries. Code that defined its own pointer or strided methods forCArray
may now conflict with the ones defined here.
New features
- New carriers:
CStrArray{owned}(a read-onlyAbstractVectorof
CString{owned}),CDict{owned,V}for string-keyed scalar dictionaries,
COpt{T}for optional scalars, andJLWResult{C}pairing aJLWStatuswith
a value. @apideclares a call signature as a boundary entry point. It generates the
Base.@ccallablewrapper, converts arguments and results through the
carrier_type/carrier_return_type/to_carrier/from_carrier
extension points, reports failures asJLWResult/JLWStatus, and records
the declaration for the metadata sidecar that JuliaLibWrapping reads when it
generates a binding façade.Base.Enumargument, keyword, and return types
are supported.@export_release_entrypointsexports thejlw_freeandjlw_free_strings
entry points a foreign caller needs to release owning carriers.- Allocating constructors
CArray{:owned}(A),CString{:owned}(s), and
CStrArray{:owned}(v), and the non-copyingCArray{:borrowed}(A)for
DenseArraystorage. Base.get(o::COpt, default)reads an optional value.
Merged pull requests:
- C: map Nothing to void (#6) (@fredrikekre)
- CompatHelper: add new compat entry for Documenter at version 1 for package docs, (keep existing compat) (#49) (@github-actions[bot])
- CompatHelper: add new compat entry for JLWInterop at version 0.1 for package docs, (keep existing compat) (#51) (@github-actions[bot])
- Bump codecov/codecov-action from 6 to 7 (#53) (@dependabot[bot])
- CompatHelper: add new compat entry for JuliaLibWrapping at version 0.1 for package docs, (keep existing compat) (#54) (@github-actions[bot])
- Bump actions/checkout from 6 to 7 (#55) (@dependabot[bot])
- [compat] JSON, OrderedCollections (#56) (@timholy)
- Add cpu_target to build_library (#57) (@timholy)
- Set version in generated Python packages (#58) (@timholy)
- Add reusable wheel-build workflow for wrapped libraries (#59) (@timholy)
- Improve the text (#60) (@timholy)
- Privatize bundled libjulia by default (#61) (@timholy)
- Layer 1: CStrArray, CDict, COpt carriers + Python emitter support (#62) (@el-oso)
- Clean up the prose (#64) (@timholy)
- Run the example Python smoke tests in tests (#65) (@timholy)
- Recognizers return target-agnostic descriptions (#66) (@timholy)
- Replace 'own-out'/'borrow-in' with standard ownership terms (#67) (@timholy)
- Make CArray ownership a type parameter (#68) (@timholy)
- Bump actions/setup-python from 5 to 7 (#69) (@dependabot[bot])
- Bump actions/checkout from 4 to 7 (#70) (@dependabot[bot])
- Bump julia-actions/setup-julia from 2 to 3 (#71) (@dependabot[bot])
- Bump actions/upload-artifact from 4 to 7 (#72) (@dependabot[bot])
- Bump julia-actions/cache from 2 to 3 (#73) (@dependabot[bot])
- Layer 2: @api annotation macro and metadata sidecar (#74) (@el-oso)
- More ownership in type parameters (#77) (@timholy)
- Encode CString ownership in its type (#78) (@timholy)
- Use Int64 for carrier lengths and dimensions (#79) (@timholy)
- Support relative project source paths (#80) (@timholy)
- Harden
@apiwrappers and generated Python bindings (#81) (@timholy) - Use dense ABI array interfaces (#82) (@timholy)
- More followups (#84) (@timholy)
- Support Base.Enum types in @api declarations (#85) (@timholy)
- Deploy versioned docs for prefixed release tags (#86) (@timholy)
- Restructure documentation for v0.2 (#87) (@timholy)
Closed issues: