Skip to content
Open
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5241122
native_module: put ~/.cargo/bin on the auto-build PATH when cargo is …
jeff-hykin Aug 30, 2026
112c9d5
Revert "native_module: put ~/.cargo/bin on the auto-build PATH when c…
jeff-hykin Aug 30, 2026
0d216be
native modules: build the rust workspace crates through the repo flake
jeff-hykin Aug 30, 2026
4cd942a
Merge remote-tracking branch 'origin/main' into _flake_work
jeff-hykin Aug 31, 2026
6ab3467
native modules: keep build_command a literal for the publish gate
jeff-hykin Aug 31, 2026
7a4f671
native modules: drop the build_command comments
jeff-hykin Aug 31, 2026
e4eb3f8
Point rust nix shells at a tiny toolchain flake
jeff-hykin Aug 31, 2026
12c5ae2
Build the rust native modules with a nix derivation
jeff-hykin Aug 31, 2026
ac844e9
Merge remote-tracking branch 'origin/main' into jeff/fix/native_build…
jeff-hykin Aug 31, 2026
6d274a2
Update the workspace cargoHash for main's Cargo.lock bump
jeff-hykin Sep 1, 2026
8a9dc1a
Let each native module declare its own build inputs
jeff-hykin Sep 1, 2026
d08156f
Find the native module deps.nix files instead of listing them
jeff-hykin Sep 1, 2026
d06824e
Vendor the rust workspace from Cargo.lock instead of an aggregate hash
jeff-hykin Sep 1, 2026
7d19b37
Revert "Vendor the rust workspace from Cargo.lock instead of an aggre…
jeff-hykin Sep 1, 2026
5def8fd
Record why cargoLock.lockFile cannot replace the aggregate hash
jeff-hykin Sep 1, 2026
7ea8f45
Merge remote-tracking branch 'origin/main' into jeff/fix/native_build…
jeff-hykin Sep 1, 2026
701453c
Re-paste cargoHash for the Cargo.lock main brought in
jeff-hykin Sep 1, 2026
8b4e3fa
Build native modules with crate2nix instead of one cargoHash
jeff-hykin Sep 1, 2026
c70d595
Build the example native modules too
jeff-hykin Sep 1, 2026
3f6653f
Stop committing crate-hashes.json
jeff-hykin Sep 1, 2026
776cb45
Pin cargo, not just crate2nix, when regenerating Cargo.nix
jeff-hykin Sep 1, 2026
0e1d204
Describe crate-config.nix as the placeholder it actually is
jeff-hykin Sep 1, 2026
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
9 changes: 8 additions & 1 deletion dimos/core/native_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class MyCppModule(NativeModule):
import json
import os
from pathlib import Path
import shutil
import signal
import subprocess
import sys
Expand Down Expand Up @@ -480,11 +481,17 @@ def _maybe_build(self) -> None:
build_command=self.config.build_command,
)
build_start = time.perf_counter()
env = {**os.environ, **self.config.extra_env}
# Non-interactive shells (ssh commands, systemd) miss the rustup PATH entry, so
# cargo build commands die with exit 127 there.
cargo_dir = Path.home() / ".cargo" / "bin"
Comment thread
jeff-hykin marked this conversation as resolved.
Outdated
if shutil.which("cargo") is None and (cargo_dir / "cargo").exists():
env["PATH"] = f"{cargo_dir}{os.pathsep}{env.get('PATH', '')}"
proc = subprocess.Popen(
self.config.build_command,
shell=True,
cwd=self.config.cwd,
env={**os.environ, **self.config.extra_env},
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
)
Expand Down
Loading