Skip to content

Releases

JuliaLibWrapping-v0.3.3

Choose a tag to compare

@github-actions github-actions released this 03 Nov 13:01
67e8b0b

JuliaLibWrapping JuliaLibWrapping-v0.3.3

Diff since JuliaLibWrapping-v0.3.2

Merged pull requests:

  • Pass the MEX library path to the compiler in a header (#107) (@timholy)

JuliaLibWrapping-v0.3.2

Choose a tag to compare

@github-actions github-actions released this 03 Nov 10:47
05f7572

JuliaLibWrapping JuliaLibWrapping-v0.3.2

Diff since JuliaLibWrapping-v0.3.1

Merged pull requests:

  • Rely on the system libstdc++ in Python packages (#106) (@timholy)

JuliaLibWrapping-v0.3.1

Choose a tag to compare

@github-actions github-actions released this 03 Nov 09:01
4d48da1

JuliaLibWrapping JuliaLibWrapping-v0.3.1

Diff since JuliaLibWrapping-v0.3.0

Merged pull requests:

  • Pass @api keywords with their declared types (#104) (@timholy)
  • Measure the tuple-conversion leak test over several windows (#105) (@timholy)

JuliaLibWrapping-v0.3.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 12:53
96a5b54

JuliaLibWrapping JuliaLibWrapping-v0.3.0

Diff since JuliaLibWrapping-v0.2.0

Breaking changes

  • The Python target splits the package's public module in two. Generated
    wrappers are written to _generated.py on every build. _facade.py is now
    a hand-editable starter, written only when it does not already exist; it
    star-imports _generated and copies its __all__. __init__.py re-exports
    from _facade, including from ._facade import __all__, so a hand-written
    _facade.py must define __all__. Building into an output directory that
    already holds a _facade.py generated by v0.2 keeps that file, which then
    hides newly generated functions: delete it once to get the starter.
  • JuliaC v0.3.10 or later is required (the compat bound was 0.3.9).
  • C symbols of @api entry points are now valid C identifiers (this comes
    from JLWInterop v0.3): characters C does not allow become _, so
    @api scale!(...) exports Mod_scale rather than Mod_scale!. Two names
    that become the same symbol are rejected. Bindings that look up the old
    symbols must be regenerated.

New features

  • MATLAB target. MatlabTarget, or standard_build(...; matlab_package),
    emits one .m façade per @api declaration in a +package directory, a C
    MEX gateway that converts mxArrays to and from the carriers, and a
    build_mex.m script. Generating the files needs no MATLAB installation;
    compiling the gateway does.
  • Tuple returns. An @api declaration may return a Tuple of two or more
    supported types. Python receives a tuple, MATLAB receives multiple
    outputs ([x, n] = f(a)), and C receives a struct. Each element keeps its
    own ownership, and owning elements are released after conversion.
    Requires JLWInterop v0.3.
  • PythonTarget(...; coerce_arrays = true) (also a standard_build keyword)
    makes the generated wrappers convert array arguments to the carrier's dtype
    and memory layout (np.asfortranarray for rank two and higher,
    np.ascontiguousarray for vectors). The default, false, keeps rejecting
    mismatched arrays.
  • @api accepts a mutates = (a, ...) clause naming the array arguments the
    function writes to (from JLWInterop v0.3). The MATLAB target copies those
    arguments before the call.

Merged pull requests:

Closed issues:

  • Proposed discourse announcement (#88)

JLWInterop-v0.3.1

Choose a tag to compare

@github-actions github-actions released this 02 Nov 14:44
8768375

JLWInterop JLWInterop-v0.3.1

Diff since JLWInterop-v0.3.0

Merged pull requests:

  • Require v0.3 in examples and docs environments (#103) (@timholy)
  • Pass @api keywords with their declared types (#104) (@timholy)

JLWInterop-v0.3.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 12:12

JLWInterop JLWInterop-v0.3.0

Diff since JLWInterop-v0.2.0

Breaking changes

  • The C symbol an @api declaration exports is now a valid C identifier:
    characters C does not allow become _, runs of _ collapse, and a leading
    digit gains a _ prefix. @api scale!(...) in module Mod exports
    Mod_scale rather than Mod_scale!. Two declarations whose names map to
    the same symbol are rejected.
  • ApiEntry has a new field, mutates. The six-argument constructor is
    kept and sets it to an empty list.

New features

  • CNTuple{N,T} carries tuple returns: a struct whose field values holds
    each element's own carrier. Tuples are return-only.
  • @api accepts a trailing mutates = (a, ...) clause (or mutates = a)
    naming the array arguments the function writes to. Naming an argument the
    declaration does not take, or one that is not an array, is an error. A
    declaration whose name ends in ! and has no mutates clause warns.

Merged pull requests:

Closed issues:

  • Proposed discourse announcement (#88)

JuliaLibWrapping-v0.2.0

Choose a tag to compare

@github-actions github-actions released this 01 Sep 07:41
1bb2b11

JuliaLibWrapping JuliaLibWrapping-v0.2.0

Diff since JuliaLibWrapping-v0.1.2

Breaking changes

  • JuliaC v0.3.9 or later is required (the compat bound was 0.3.3). JuliaC
    v0.3.9 encodes Cvoid as a null type id, and the earlier encoding — a
    zero-field Nothing struct referenced by id — is no longer accepted. ABI
    JSON produced by an older JuliaC must be regenerated.
  • The descriptor model follows that encoding: MethodDesc.return_type and
    PointerDesc.pointee_type are Union{Int,Nothing}, with nothing meaning
    void and void *. Code that walks an ABIInfo must handle nothing in
    those two positions.
  • PrimitiveTypeDesc's bits, size, and alignment fields are Int,
    previously UInt.
  • Generated Python type names carry carrier ownership: CString is now
    CString_borrowed, CVector_Float32 is now CVector_borrowed_Float32, and
    so on. A hand-edited _facade.py imports these names from _lowlevel and
    must be updated. Generated structures also use 64-bit dimensions and lengths,
    matching JLWInterop v0.2, so a library and its bindings must be rebuilt
    together.
  • Carrier recognition returns target-agnostic descriptions in Julia-level terms
    and each emitter maps them to its own type names; a custom target that used
    the recognizers needs updating. Raw-pointer warnings now cover every
    Ptr{<primitive>} argument rather than only those with a numpy dtype.

New features

  • build_library writes a <libname>.jlw.json metadata sidecar for entry
    points declared with JLWInterop.@api, and returns its path as
    metadata_path. The Python façade generator uses the sidecar to emit
    keyword arguments, defaults, and docstrings.
  • The C and Python emitters support the CStrArray, CDict, COpt, and
    JLWResult carriers, converting owning returns to Python objects and
    releasing them through jlw_free / jlw_free_strings. Release entry point
    signatures are validated at build time.
  • Julia Base.Enum types are emitted as Python enum.IntEnum, with coercion
    from a member, a name, or an integer.
  • Generated ctypes structures check their size and field offsets against the
    compiled ABI metadata at import, raising if the bindings do not match the
    platform's ABI.
  • Projects whose Project.toml uses relative source paths are supported: the
    build materializes a temporary project with absolute paths when relocation
    would change their meaning.
  • The documentation is reorganized into quickstart, concepts, annotations,
    types, building, Python, architecture, and extending pages, and is deployed
    per released version.

Merged pull requests:

  • C: map Nothing to void (#6) (@fredrikekre)
  • 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)

JLWInterop-v0.2.0

Choose a tag to compare

@github-actions github-actions released this 31 Aug 11:59
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)

JuliaLibWrapping-v0.1.2

Choose a tag to compare

@github-actions github-actions released this 21 Aug 08:00
6b05379

JuliaLibWrapping JuliaLibWrapping-v0.1.2

Diff since JuliaLibWrapping-v0.1.1

Merged pull requests:

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)

JuliaLibWrapping-v0.1.1

Choose a tag to compare

@github-actions github-actions released this 14 Aug 04:58
0d34ddd

JuliaLibWrapping JuliaLibWrapping-v0.1.1

Diff since JuliaLibWrapping-v0.1.0

Merged pull requests:

  • 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)