Skip to content

fix+feat+docs: PR batch #46 #34 #47 — build.rs fix, Nix flake, Swagger UI#52

Merged
chrishayuk merged 6 commits into
mainfrom
prs
May 7, 2026
Merged

fix+feat+docs: PR batch #46 #34 #47 — build.rs fix, Nix flake, Swagger UI#52
chrishayuk merged 6 commits into
mainfrom
prs

Conversation

@chrishayuk
Copy link
Copy Markdown
Owner

Summary

Not included

Test plan

  • cargo check --workspace clean on macOS

randomizedcoder and others added 6 commits April 24, 2026 16:05
…l catalog

Add reproducible Nix packaging for larql:

- flake.nix orchestrator importing modular files from nix/
- package.nix: Rust derivation with cargoHash, system protoc via patch
- shell.nix: dev shell with Rust tools, Python/maturin, debuggers
- container.nix: OCI images for larql-server and larql CLI (Linux)
- models.nix: 8-model HuggingFace catalog (SmolLM2, Qwen, TinyLlama,
  StableLM, Phi-3.5, Gemma 4 E2B/E4B) fetched as fixed-output derivations
- demo.nix: per-model walk demos and interactive REPL targets
- Patches: remove protobuf-src (use nixpkgs protoc), disable default
  metal feature (macOS-only), add cfg guard to bench_cmd.rs
- README.md: install guide, remote usage from GitHub, model docs
- Commit Cargo.lock (required by buildRustPackage)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mple initializers

The Virtual Experts merge (PR #45) left `main` unable to build:

1. `crates/larql-vindex/src/extract/build.rs` was deleted but `extract/mod.rs`
   still declares `pub mod build;` and re-exports `build_vindex` /
   `build_vindex_resume`, which are still called from `larql-cli`,
   `larql-lql`, the vindex tests, and the `demo_features` example. The
   roadmap (vindex M8) plans to split this file into `build/{mod,...}.rs`,
   but that refactor was never finished. Restore the file from `d3a8bc6^`
   so the workspace compiles again; the planned split can land separately.

2. New required fields had been added to several public structs but a
   number of test fixtures and examples were not updated, so
   `cargo build --features metal` and `cargo test --workspace` failed
   with E0063 / E0308:

   - `FullPipelineLayer.ffn_is_remote` — added to 6 `larql-compute`
     examples (`compare_decode`, `compare_formats`, `compare_ollama`,
     `compare_pipeline`, `demo_architecture`, `diag_decode_pipeline`).
   - `LoadVindexOptions.moe_remote` — added to `bench_expert_server` and
     `openai_demo` examples.
   - `LoadedModel.{unit_filter, moe_remote}` plus the
     `metal-experts`-conditional `metal_backend` / `moe_scratches` /
     `metal_ffn_layer_bufs` fields, and the `weights` field's new
     `OnceLock<RwLock<ModelWeights>>` wrapper — fixed in
     `tests/common/mod.rs`, `tests/test_expert_endpoint.rs`,
     `tests/test_http_full_routes.rs`, `tests/test_unit_band_utils.rs`,
     `tests/test_unit_state.rs`.
   - `VindexConfig.{fp4, ffn_layout}` and `ModelWeights.skipped_tensors`
     in `tests/test_expert_endpoint.rs`.
   - `MoeLayerWeights.expert_data_format` plus per-expert byte-slice
     layout (`Vec<&[u8]>` instead of a single `&[u8]`) in the same test's
     `local_output` helper.

Result: workspace builds clean with `--features metal`, and 3,481 tests
run (the remaining failures are runtime numerical-correctness issues in
Metal kernels — unrelated to this commit, and the reason this branch
exists).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@chrishayuk chrishayuk merged commit b9bc5a5 into main May 7, 2026
4 checks passed
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.

4 participants