Skip to content

Package icebug + algo extension, test GDS_PAGE_RANK on all platforms - #2

Merged
adsharma merged 3 commits into
mainfrom
icebug-gds-packaging
Oct 2, 2026
Merged

adsharma merged 3 commits into
mainfrom
icebug-gds-packaging

Conversation

@adsharma

@adsharma adsharma commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Bundles the icebug prebuilt (libnetworkit 13.2) and the Ladybug algo extension with the app — same approach as bugscope-tauri's icebug packaging — so PageRank etc. run as Cypher UDF/GDS functions.

Packaging

  • scripts/download_icebug.sh: platform prebuilt → ./icebug/
  • .cargo/config.toml: ICEBUG_DIR + rpaths for dist/dev/.app layouts (RPATH-not-RUNPATH on Linux so transitive arrow/omp resolve)
  • build.rs: -rdynamic for LOAD EXTENSION (ELF only; breaks Apple linking), icebug presence check, Windows networkit_state link
  • scripts/build_algo_extension.sh: cmake build of LadybugDB/extensions algo (pinned SHA) against the ladybug tag matching the lbug crate + the shared icebug prebuilt
  • scripts/stage_macos_bundle.sh: Frameworks staging + @rpath rewrite (incl. the dlopen'd extension)

Runtime

  • Every connection auto-loads the bundled extension (BUGSCOPE_ALGO_EXTENSION override); missing bundle degrades gracefully
  • backend::graphr_page_rank: in-process icebug PageRank cross-check
  • icebug =13.2.0 behind default icebug-analytics feature; arrow 55→56 to match

Tests

  • tests/gds_page_rank.rs ports GDSPageRankStar (exact ranks, sum-to-1, scan-fallback equality) and GDSPageRankStaleProjection from algo/test/test_files/gds_page_rank.test; skips without the bundle
  • Verified passing on macOS/arm64 (extension built, ICEBUG_ENABLED=ON)
  • CI: Arrow/OpenMP per OS (brew / apt-llvm+arrow / vcpkg), build extension, run the GDS test on macOS + Linux + Windows, bundle native libs into every release archive

Watch items for first CI run: Windows has no upstream precedent for building the algo extension (MSVC+vcpkg arrow path is extrapolated), and the Linux libomp-20 soname assumption is unverified.

Ship PageRank (and other GDS functions) as Cypher UDFs by bundling
the icebug 13.2 prebuilt and the Ladybug algo extension with the app:

- scripts/download_icebug.sh: fetch platform prebuilt into ./icebug/
- scripts/download-liblbug.sh: fetch shared liblbug (algo extension
  dlopens it; static liblbug.a gets dead-stripped so LOAD EXTENSION
  fails with missing GDSFunction symbols)
- .cargo/config.toml: ICEBUG_DIR + rpaths covering dist, dev, .app,
  and --target triple-dir test binary layouts
- build.rs: -rdynamic for LOAD EXTENSION (ELF), icebug presence
  check, Windows networkit_state link
- Cargo: icebug 13.2 behind default icebug-analytics feature,
  arrow 55->56 to match; tempfile dev-dep for the new test
- src/backend.rs: auto-LOAD the bundled algo extension per connection
  (ExtensionManager is per-Database; BUGSCOPE_ALGO_EXTENSION
  override) + in-process graphr_page_rank cross-check
- scripts/vendor_arrow.sh + stage_macos_bundle.sh: vendor libarrow/
  libomp next to libnetworkit so the downloaded extension's
  @rpath/libarrow resolves; bundle dylib/.so/.dll in every archive
- tests/gds_page_rank.rs: INSTALL/LOAD the prebuilt algo extension
  and assert GDS_PAGE_RANK works (skips only when offline)
- README: document the new analytics path; .gitignore the locally
  built extension binary (dev artifact, not shipped)
- Download icebug prebuilt + shared liblbug in CI and release jobs
- Vendor arrow/openmp runtimes next to libnetworkit (Unix) so the
  INSTALL'd algo extension resolves @rpath/libarrow
- Add Test GDS_PAGE_RANK step (cargo test --lib --test gds_page_rank)
  with LD_LIBRARY_PATH on Unix and icebug/lib + liblbug + vcpkg bin
  on PATH for Windows
- Bundle icebug shared libs + algo extension into every release
  archive (macOS .app via stage_macos_bundle.sh, Linux tarball with
  best-effort libomp/libarrow vendoring, Windows zip with DLLs +
  vcpkg arrow DLLs)
- Linux/macOS deps: LLVM libomp + Apache Arrow repos, cmake,
  libarrow-dev/libomp-20-dev, brew apache-arrow
- Windows: vcpkg manifest (arrow, pkgconf), lukka/run-vcpkg setup
  with pinned commit, NuGet GitHub Packages binary caching,
  PKG_CONFIG_PATH/CMAKE_PREFIX_PATH/CXXFLAGS env for the icebug
  crate's pkg-config probe
- Bound apt mirror stalls on Linux: wget --timeout/--tries,
  Acquire timeouts + retries, timeout-minutes on dep steps
- Authenticate vcpkg NuGet with classic PAT (VCPKG_NUGET_PAT) instead
  of GITHUB_TOKEN: repo-scoped token 403s pushing new packages to the
  org feed so the binary cache never populated
- Put vcpkg pkgconf on PATH for the icebug crate's pkg-config probe
  (convert the whole PATH with cygpath -p so later pwsh steps keep a
  resolvable Windows-form PATH)
- Add icebug/lib/networkit to PATH for the Windows GDS test
  (networkit_state.dll lives in that subdir on the win prebuilt)
@adsharma
adsharma force-pushed the icebug-gds-packaging branch from c050224 to 3619bfa Compare October 2, 2026 02:46
@adsharma
adsharma merged commit 25ab2aa into main Oct 2, 2026
5 checks passed
@adsharma
adsharma deleted the icebug-gds-packaging branch October 2, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant