examples: bazel-rust-proc — rules_rust proc-macro aquery-drive coverage
Created by pmeunier on Aug 5, 2026, 1:50 PM
State:
E364JSJDNWSTDZQ6ISJIH6HMO75COIS4IOXQZMD6DCSFJYY6HRYACelpe-sched: L3-cache-aware core packing (sysfs, zero C dep)
Created by pmeunier on Aug 5, 2026, 1:39 PM
State:
LXJOMGRVM7B2MKEHSPYI35LA4OTN3RCJMOFRVEMHNUCJF7PKSIDACexamples/bazel-rust: runnable rules_rust rust_binary proving aquery-drive over the rustc toolchain (146-symlink sysroot + process_wrapper + dynamic rustc libs)
Created by pmeunier on Aug 5, 2026, 1:17 PM
State:
KR3HYG73PMZJHVY5HVYTOCL4E575VDQFTQH2NM4Y4JNB3FXH3WMQCbazel aquery-drive: export LD_LIBRARY_PATH for an action's shared-lib inputs (rustc needs librustc_driver.so/libLLVM.so from its staged toolchain)
Created by pmeunier on Aug 5, 2026, 1:15 PM
State:
LFPYKIT7MIBT6D2MWBSEMDF77REAV2ZLNIPOKDG6YVTPPDOLIFEACexamples/bazel-go: runnable rules_go go_binary proving aquery-drive over a new toolchain (GoStdlib tree + in-graph builder)
Created by pmeunier on Aug 5, 2026, 1:04 PM
State:
RLAXQLPK5VSSFRPDIHYQTOGQSMPPKBGZUNQEP2G5JEQI4BYAKFPQCbazel replay_script: trailing unit param to clear unerasable-optional warning
Created by pmeunier on Aug 5, 2026, 10:49 AM
State:
XGWPBW66XZB7IG3SERSN6QZ5HSTLDDT4S3FAX7QQOZWUSFX27YYACbazel aquery-drive: stage the workspace source tree as the execroot base (multi-file C++ headers)
Created by pmeunier on Aug 5, 2026, 10:38 AM
State:
SP2MDZG7DAJ4YPLPOWGY7QDEADSFLIXTUSHRDDYIUZOV6ZFAEAQQCexamples/bazel-sh: runnable sh_binary proving aquery-drive runfiles end-to-end
Created by pmeunier on Aug 5, 2026, 8:43 AM
State:
QJ4J3GD4ZU73EDGVQLGH2AHGIHKUWDH534L3CASG7MLYIDIHKK3QCbazel aquery: binary-level runfiles wiring (collect set + regenerate manifest + runnable derivation)
Created by pmeunier on Aug 5, 2026, 8:30 AM
State:
HD76NDUDSCM3FY4XPO7ZIXNNXW6LI6VRK6EPCADR44ZOYAHIK3VQCelpe frontend: Bazel aquery-drive runfiles — regenerate the manifest from the graph (pure core). regenerate_runfiles_manifest rewrites a Bazel runfiles MANIFEST so column 2 (Bazel's absolute host execroot/workspace path, meaningless in Elpe's store) points at the persistent store path Elpe staged each runfile to, while keeping column 1 (the authoritative rlocation the binary looks up) verbatim. Join is by suffix: Bazel's host path always ends with the artifact's exec path, matched against the supplied exec-path->store map (longest '/'-bounded suffix wins); unresolved lines are dropped (dangling worse than absent). Unit-tested against the REAL bazel_aquery_runfiles.pb manifest (sh_binary+data): source + generated + _repo_mapping runfiles rewritten to store paths, boundary-anchored join keeps _repo_mapping distinct from app, no host path leaks. Wiring into a binary-level runfiles derivation (collect the Middleman's runfile set, resolve store paths, lay down MANIFEST) + live proof is the next step.
Created by pmeunier on Aug 5, 2026, 8:18 AM
State:
C3XPKDTFJZPBKQXKTLAWUUJW7DZVX64GOSQVW424PZIXLYLEZJJACelpe frontend: Bazel aquery-drive runfiles — symlink-family materialization + real-dump fixture. Symlink/ExecutableSymlink/SolibSymlink carry no content field (their target IS the single input), so action_body now materializes the output as cp -aL of the staged input (dereferenced real file, harvests+runs like Bazel's symlink) instead of the empty-file fallback; dispatched by mnemonic (the honest signal for Bazel-internal plumbing, where shape is ambiguous vs Middleman/SymlinkTree). action_body gains ~input_execs (threaded from build_phase). Real bazel 7 'aquery deps(//:app)' dump for a sh_binary+data committed as bazel_aquery_runfiles.pb (ppx_blob), pinning the trimmed vendored proto stays wire-compatible for runfiles plumbing and that ExecutableSymlink reaches the cp -aL branch. Runfiles-tree/manifest modeling (absolute-host-path rewrite) is a separate design-gated increment.
Created by pmeunier on Aug 5, 2026, 8:04 AM
State:
YNCIWWAYW4RTMAPGM3H5G7ERET3CMYRTAGW2EQP3HHIG4MLIBS3QCelpe frontend: Bazel aquery-drive tree artifacts — is_tree index (Artifact.is_tree_artifact) + artifact_is_tree/action_outputs_full accessors; replay_script ~outputs now (exec, is_tree) pairs, pre-creating a tree output's directory itself (not just its parent) so declare_directory actions can fill it, cp -a harvests the whole subtree. Unit tests: is_tree round-trips through the real codec, tree vs plain output pre-creation.
Created by pmeunier on Aug 5, 2026, 7:48 AM
State:
3RLPSR3TMSBXVATGPPDFAB3GN62INSZAGY3ZXCNKGYRCZEDZXQOACexamples/sbom-ci: Nix-free SBOM validation harness (elpe-provisioned jsonschema + syft)
Created by pmeunier on Aug 5, 2026, 7:37 AM
State:
SZ5PUWP6YYC3FKTJFOMBVK7QWOGB7FT7EHZFOGFWBNV3LHFHQ46QCelpe: Bazel aquery-drive beyond genrules — cc_binary proven end-to-end (runs). New: (1) action_body dispatches on action shape not mnemonic — SpawnAction runs argv; FileWrite writes file_contents; TemplateExpand substitutes template_content; UnresolvedSymlink ln -sfn — replay_script takes ~body. (2) --include_file_write_contents so FileWrite param/manifest contents are in the proto. (3) ~toolchain provisions compilers/linkers in BOTH aquery (Bazel's cc auto-config detects them) and every replay (baked argv[0] store paths resolve). (4) ~override_repos threads --override_repository so vendored rules_cc/bazel_skylib resolve without a GitHub http_archive; plus minimal /etc/resolv.conf+nsswitch so the remaining hash-pinned WORKSPACE-suffix rules (rules_python/java) fetch at planning time (replay stays hermetic). (5) aquery writes the proto to $DESTDIR/aquery.pb (analyse reads it there) — survives a cache hit, unlike stdout which does not re-stream. (6) LIBRARY_PATH gains every toolchain lib dir incl. the gcc version dir (libstdc++.so) — Elpe keeps inputs as distinct store paths, not a merged /usr. (7) output_derivation selects the deliverable by output basename (a cc_binary's 'hello', not its stripped/dwp leaves). examples/bazel-cc: cc_binary compiled+linked as native derivations via the container's own gcc-14; the ELF runs ('hello from bazel cc via elpe').
Created by pmeunier on Aug 5, 2026, 7:32 AM
State:
UD64UKU63NIP2WTHPNPBBUP3IS57NITIOIXAD2HS7CGQ34SRBA2ACeval-vm.md: increment 12 (5b-ii) landed — THE BIG PROOF. The unmodified real derivation.ml runs inside the sandbox VM over the host-prim transport; a real Derivation RPC round-trips against the live backend. Status header updated. Remaining: 5c (add_path/local_src/locks -> host prims, drop h2), CLI to Rust.
Created by pmeunier on Aug 5, 2026, 7:31 AM
State:
OK2DBBIVU7PIALUTUU6MXBOJKJG7UNIBKBNDCANQ6RNZWMQN7ZMACeval-vm increment 12 (port step 5b-ii): THE REAL derivation.ml runs inside the sandbox VM. The demo bytecode now compiles the actual elpe/lib/derivation.ml (h2-free since inc 11) + platform.ml straight from the source tree (no copy/drift) alongside the VM plumbing; Vm_backend installs the host-prim transport (backend_call/backend_stream) into Derivation's backend_unary_raw/backend_stream_raw refs. test.ml calls the UNMODIFIED Derivation.derivation to run a real Derivation RPC over host prims. Vm_prelude.backend_stream's ~f is now string->unit Lwt.t (matches the real grpc_call_streaming handler; the sync DSL handlers resolve immediately). build.rs adds hex+ppx_string packages. Verified in scratch: the real derivation.ml closure compiles AND links against the curated prim set (no denied prim).
Created by pmeunier on Aug 5, 2026, 7:29 AM
State:
AQ6XAUZIHQDCXFYCYS7F257CSHBWDLEPLXEHHH26K6QVVTVHVQEQCelfedit: refuse un-relocatable ELFs cleanly instead of panicking (vDSO). update_section_allocate now returns UnsupportedLayout when the PT_LOAD alignment is sub-page (no mmap-friendly relocation, no writable tail) rather than tripping assert_eq!(off%4096, vaddr%4096); update() propagates it and elpe's patch_elf/patch_result_elf skip the file. Add vdso fixture+regression test, an ELF corpus_stress example, and make machoedit scan.rs edit a temp copy (never the input, covers read-only files, avoids framework-seal false positives)
Created by pmeunier on Aug 5, 2026, 7:24 AM
State:
IWQS4WHXI5CKYF7DXHP5ETVVLFCGJNE7UD3PZSYK34WM4DMVKNXACseed: publish sha256 of the first reproducibly self-built nix-free elpe backend (f960f4ee, roadmap §6)
Created by pmeunier on Aug 5, 2026, 4:18 AM
State:
V3O2MVQRMUTJ5BVHGSK4T2WYBD3UTXADQTZDRMVS64NGEXOQER7ACeval-vm.md: increment 11 (5b-i) landed — derivation.ml decoupled from h2/grpc (native transport moved to Backend_native, linked native-only), now VM-linkable. Next 5b-ii: compile derivation.ml into the VM + host-prim transport installer + run a real Derivation in the sandbox.
Created by pmeunier on Aug 5, 2026, 7:20 AM
State:
P7FXXY2JHHQVFBHFC4L7STG7TFPCLCFCVAY6GRV6EO4JTW7QAL3ACelpe frontend increment 11 (port step 5b): decouple derivation.ml from h2/grpc-lwt so it's VM-linkable. Move the native h2 transport (native_unary/native_stream/connect_native + the live connection handle) out to a new Backend_native module, linked ONLY in the native elpe_bin — never the curated VM image (whose bytecode may reference no socket prim). derivation.ml is now h2/grpc/unix-FREE: grpc_call_* talk only to the raw byte refs; backend_conn is a unit 'connected' flag (real h2 handle lives in Backend_native.native_conn, read by the not-yet-ported add_path in elpe.ml); the return tuple's status slot is now unit (callers already discard it) so grpc-lwt no longer leaks in. connection param stays a vestigial unit token -> ZERO churn in lock.ml and all call sites. elpe.ml re-exports connect_native so elpe_bin is unchanged. dune build green; native path structurally identical (native_* byte-for-byte, just relocated).
Created by pmeunier on Aug 5, 2026, 7:18 AM
State:
2VDUXLITB3VNCSEMNJACE6QJPQ7HRJXCVRV3IAZRMV666A3K7OWACelpe: Bazel aquery-in-container proven end-to-end (Cargo parity). Closes the external/ gap: class aquery exports Bazel's managed external/ tree (output_base/external — @bazel_tools etc., where genrule-setup.sh lives; the execroot symlink farm is only materialised for executed actions) into $DESTDIR, and action_replay stages source inputs under external/ from that export (is_external_exec) instead of the user workspace. Also: action_replay provisions bash and symlinks Bazel's baked /bin/bash genrule shell; replay_script pre-creates each output's parent dir in the execroot. examples/bazel now runs offline via .bazelrc --noenable_bzlmod + empty WORKSPACE (a genrule needs only the embedded @bazel_tools, zero network); MODULE.bazel dropped (vestigial once bzlmod is off). Proven live against :50051: aquery->proto->2 native derivations->execroot replay->final artifact 'HELLO BAZEL\nHELLO BAZEL' (uppercased doubled in.txt), external/ input from the aquery export, generated out.txt from the producer derivation, /bin/bash resolved to the container bash.
Created by pmeunier on Aug 5, 2026, 6:49 AM
State:
CCIAHN6QKU2CNS7NM6YO5RWKM5AP6KNUNL4SQVDV3LGRIYFGTETQC