Repository navigation
JuliaLibWrapping-v0.3.0
·
5 commits
to main
since this release
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.pyon every build._facade.pyis now
a hand-editable starter, written only when it does not already exist; it
star-imports_generatedand copies its__all__.__init__.pyre-exports
from_facade, includingfrom ._facade import __all__, so a hand-written
_facade.pymust define__all__. Building into an output directory that
already holds a_facade.pygenerated 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
@apientry points are now valid C identifiers (this comes
from JLWInterop v0.3): characters C does not allow become_, so
@api scale!(...)exportsMod_scalerather thanMod_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, orstandard_build(...; matlab_package),
emits one.mfaçade per@apideclaration in a+packagedirectory, a C
MEX gateway that convertsmxArrays to and from the carriers, and a
build_mex.mscript. Generating the files needs no MATLAB installation;
compiling the gateway does. - Tuple returns. An
@apideclaration may return aTupleof two or more
supported types. Python receives atuple, 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 astandard_buildkeyword)
makes the generated wrappers convert array arguments to the carrier's dtype
and memory layout (np.asfortranarrayfor rank two and higher,
np.ascontiguousarrayfor vectors). The default,false, keeps rejecting
mismatched arrays.@apiaccepts amutates = (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:
- Tuple returns (#83) (@el-oso)
- MATLAB target: façades and a MEX gateway (#90) (@el-oso)
- Split the Python façade into generated and hand-written modules (#91) (@timholy)
- Bump actions/checkout from 4 to 7 (#95) (@dependabot[bot])
- Bump matlab-actions/run-command from 2 to 3 (#96) (@dependabot[bot])
- Bump actions/upload-artifact from 4 to 7 (#97) (@dependabot[bot])
- Bump julia-actions/cache from 2 to 3 (#98) (@dependabot[bot])
- Bump matlab-actions/setup-matlab from 2 to 3 (#99) (@dependabot[bot])
- Require v0.3 in examples and docs environments (#103) (@timholy)
Closed issues:
- Proposed discourse announcement (#88)