Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/lint-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ jobs:
uv run --no-project --with "pyyaml==6.0.3" python3 - <<'PY'
import subprocess, sys, yaml
# Entries that never need the test matrix. Documentation is built by docs-build.yml.
NO_TEST_RUN = {".gitignore", "AGENTS.md", "CLAUDE.md", "README.md", "docs", "mkdocs.yml"}
# native-wheel (native-preview branch) is built and parity-tested by native-preview.yml, not by the bindings matrix.
NO_TEST_RUN = {".gitignore", "AGENTS.md", "CLAUDE.md", "README.md", "docs", "mkdocs.yml", "native-wheel"}
WORKFLOWS = ["test-python-bindings.yml", "test-python-examples.yml"]
files = subprocess.check_output(["git", "ls-files", "bindings/python"], text=True).split("\n")
entries = {f.split("/")[2] for f in files if f.count("/") >= 2}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/native-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# push of a tag native-v<version> build + test + publish to PyPI (trusted publishing, environment pypi-native)
# push to branch native-preview build + test only (dry run; also what a dispatch does)
# push to branch native-platforms the same dry run, for the multi-platform work
# push to branch native-inline the same dry run, for the jvector force-inline hints
# workflow_dispatch build + test only; never publishes (the publish job needs a native-v* tag ref).
# GitHub offers a dispatch only for a workflow file on the default branch, and this file is
# deliberately not on main, so the branch push is the way to dry-run it from native-preview.
Expand All @@ -26,6 +27,7 @@ on:
- native-preview
- native-platforms
- native-windows
- native-inline
tags:
- "native-v*"
workflow_dispatch:
Expand Down
1 change: 1 addition & 0 deletions bindings/python/docs/development/build-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ uv run pytest
- **Engine and glue**: the image links the engine's Maven Central release jars (`ARCADEDB_ENGINE_VERSION`), never a local SNAPSHOT. The bindings and Java glue come from the branch (`SOURCE_COMMIT` in `_build_info.py`).
- **Licences**: Apache-2.0 for ArcadeDB and the bindings. The image also contains GraalVM CE and OpenJDK classes (GPLv2 with the Classpath Exception, which permits this linking). The wheel ships `LICENSE`, `NOTICE`, `THIRD_PARTY_NOTICES.md` and the GraalVM texts in `*.dist-info/licenses/`. Oracle GraalVM (GFTC) is not used. `THIRD_PARTY_NOTICES.md` is generated by `native-wheel/gen_notices.py` from the `native-image -cp` line in `<lib-dir>/build.log` (written by `preview-build.sh`): licence names from each jar's pom, notice texts verbatim from the jars, the engine tag, the GraalVM home and `native-wheel/notice-texts/` (licence texts that are in no jar: ANTLR, JTS, Highway, jvector's NOTICE). `build_wheel.py` runs it with `--check` and fails when the committed file differs (`--skip-notices-check` to bypass). Regenerate after a classpath or engine change: `python native-wheel/gen_notices.py --build-log <lib-dir>/build.log --engine <ver> --graalvm-home <GraalVM CE home> --out native-wheel/THIRD_PARTY_NOTICES.md`; its "Licence review" section lists what a maintainer must decide. Before a non-preview release: resolve that list and have the GPL source-offer wording reviewed.
- **No Studio**: the native image has no `arcadedb-studio` jar and no Studio web assets, because Studio bundles ApexCharts, which has been under a Community/Commercial licence (not Apache-2.0 compatible) since 5.1.0. `GET /` returns the server's built-in "Studio is not bundled" page (`GetDynamicContentHandler`, a missing `static/index.html` is not a startup error), other static paths return 404, and `/api/v1`, Bolt, Postgres, Redis, GraphQL and MCP are unchanged. Use the ArcadeDB Docker image for Studio. `gen_notices.py` refuses a classpath that contains the Studio jar.
- **Scalar distance inlining**: the image uses jvector's scalar provider (`-H:-VectorAPISupport`), whose one-line getter `ArrayVectorFloat.length` otherwise stays a call and took 31% of the profile samples; `native-spike/src/main/resources/META-INF/native-image/org.humemai/arcadedb-native-lib/native-image.properties` force-inlines the scalar distance path with `-H:PriorityForceInline` (untimed profile, 50k x 128-d graph build 94.2 s to 76.1 s; timed numbers pending), and `preview-build.sh` fails the build when the option is not picked up.
- **Open**: there is no cross-compile in CE, so every platform builds on its own runner type; Linux x86-64, Linux arm64 and macOS arm64 gate a release, the Windows leg is optional in CI until green (`REQUIRED_PLATFORMS`); `-H:-VectorAPISupport` works around a CE crash in `PanamaVectorUtilSupport.dotProductPreferred` (retest on newer CE); the README has no performance numbers until `ab.py` results exist.

Local build (the image through `.notes/bench/tools/quiet_build.sh`, about 13 GB):
Expand Down
6 changes: 5 additions & 1 deletion native-spike/scripts/preview-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ if [ "$EXT" = dll ]; then
dependency:build-classpath -Dmdep.outputFile=target/runtime.cp >> "$OUT/build.log" 2>&1
echo "native-image -cp native-spike/target/arcadedb-native-lib-0.0.1.jar;$(tr -d '\r\n' < native-spike/target/runtime.cp) --shared" >> "$OUT/build.log"
fi
# the jvector force-inline filters (native-image.properties in the glue jar) must be picked up: the build output lists the option and its origin (Windows prints the path with backslashes)
grep -a -E -q 'PriorityForceInline. \(origin\(s\): .META-INF.native-image.org\.humemai.arcadedb-native-lib.native-image\.properties' "$OUT/build.log" \
|| { echo "-H:PriorityForceInline from native-image.properties is not in the build output: the jvector force-inline hints were not applied" >&2; exit 1; }
INLINE_LOG="PriorityForceInline picked up from native-image.properties ($(grep -a -c 'PriorityForceInline' "$OUT/build.log") log lines)"
cp "native-spike/target/$LIBFILE" "$OUT/"
LIBS=("$OUT/$LIBFILE")
# Highway (jvector's native provider), found next to libarcadedb.so by the image (ARCADEDB_NATIVE_LIBDIR); Linux x86-64 only: the other
Expand All @@ -46,4 +50,4 @@ if [ "$EXT" = so ] && [ "$(uname -m)" = x86_64 ]; then
LIBS+=("$OUT/libjvector-x86_64.so")
fi
sha256 "${LIBS[@]}" > "$OUT/sha256.txt"
echo "preview image done: engine $ENGINE; march $MARCH; $(grep -a 'Finished generating' "$OUT/build.log")" | tee "$OUT/build.done"
echo "preview image done: engine $ENGINE; march $MARCH; $INLINE_LOG; $(grep -a 'Finished generating' "$OUT/build.log")" | tee "$OUT/build.done"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Force-inline the scalar distance path of jvector 4.0.2 (the provider every native image uses: -H:-VectorAPISupport, see
# oracle/graal#14751). Measured with untimed profiles on the baseline image (-march=compatibility), 50k x 128-d L2 graph: ArrayVectorFloat.length,
# a one-line getter, stayed a call and took 31% of the samples; with these filters it takes 0%, the graph build went from 94.2 s to 76.1 s
# and a search from 1.07 ms to 0.89 ms. The dotProduct and cosine entries are the same scalar counterparts for DOT_PRODUCT and COSINE
# indexes (not profiled; the same getters sit in their loops). A filter without a signature matches every overload. This file is read from
# the glue jar on the image build classpath; preview-build.sh fails the build when the log does not show the option as picked up.
Args = -H:PriorityForceInline=io.github.jbellis.jvector.vector.ArrayVectorFloat.length,io.github.jbellis.jvector.vector.ArrayVectorFloat.get,io.github.jbellis.jvector.vector.VectorUtil.squareL2Distance,io.github.jbellis.jvector.vector.VectorUtil.dotProduct,io.github.jbellis.jvector.vector.VectorUtil.cosine,io.github.jbellis.jvector.vector.DefaultVectorUtilSupport.squareDistance,io.github.jbellis.jvector.vector.DefaultVectorUtilSupport.squareDistanceUnrolled,io.github.jbellis.jvector.vector.DefaultVectorUtilSupport.dotProduct,io.github.jbellis.jvector.vector.DefaultVectorUtilSupport.cosine
Loading