Skip to content

JLWInterop-v0.2.0

Choose a tag to compare

@github-actions github-actions released this 31 Aug 11:59
· 16 commits to main since this release
1bb2b11

JLWInterop JLWInterop-v0.2.0

Diff since JLWInterop-v0.1.0

Breaking changes

  • Carriers now encode ownership in their type. CArray{T,N} becomes
    CArray{owned,T,N} and CString becomes CString{owned}, where owned is
    :owned or :borrowed; the aliases follow as CVector{owned,T} and
    CMatrix{owned,T}. An entry point written f(v::CVector{Float64}) is now
    f(v::CVector{:borrowed,Float64}). Any other value for the parameter throws
    an ArgumentError. A target reads "release this" or "do not release this"
    off the signature alone.
  • Carrier lengths and dimensions are Int64, previously Int32:
    CArray.dims::NTuple{N,Int64} and CString.length::Int64. This changes the
    struct layout, so a library and the bindings generated for it must both be
    rebuilt against v0.2.
  • CArray is now a DenseArray{T,N} rather than an AbstractArray{T,N}, and
    supports pointer, Base.unsafe_convert, Base.elsize, and aliasing
    queries. Code that defined its own pointer or strided methods for CArray
    may now conflict with the ones defined here.

New features

  • New carriers: CStrArray{owned} (a read-only AbstractVector of
    CString{owned}), CDict{owned,V} for string-keyed scalar dictionaries,
    COpt{T} for optional scalars, and JLWResult{C} pairing a JLWStatus with
    a value.
  • @api declares a call signature as a boundary entry point. It generates the
    Base.@ccallable wrapper, converts arguments and results through the
    carrier_type / carrier_return_type / to_carrier / from_carrier
    extension points, reports failures as JLWResult/JLWStatus, and records
    the declaration for the metadata sidecar that JuliaLibWrapping reads when it
    generates a binding façade. Base.Enum argument, keyword, and return types
    are supported.
  • @export_release_entrypoints exports the jlw_free and jlw_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-copying CArray{:borrowed}(A) for
    DenseArray storage.
  • 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 @api wrappers 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:

  • Two JLW libraries in one process: runtime sharing and isolation (#28)
  • Ship a reusable GitHub Actions workflow for downstream wrapped-library builds (#37)