mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
Our history is just-every's with author emails rewritten, so the graphs are
disjoint and git finds no merge base. Supplied one by hand: d1f1f51a41, the
just-every commit matching our Oct-2025 fork point (22 files apart). 9618
upstream commits, 7004 files, +1.81M/-159k, 37 conflicts.
Resolution:
- Upstream code where our side was the Oct-2025 prototype of a feature they
have since reimplemented 3-5x larger (agent_runs, browser_sessions,
history_cell/{agent,browser}, the vt100 harness and its snapshots).
- Upstream's config.rs module split (builder/defaults/sources/validation)
kept; zen5-coder and the provider-follows-model rule re-applied on top.
- Ours where the file IS the identity: README, package.json, postinstall,
release notes pipeline, integration-zed.
- Hybrid where upstream improved a file we had branded: updates.rs (their
release-repo migration, our hanzoai/dev), release.yml (their fail-fast npm
auth check, our package name), chatwidget.rs (their turn handling, our
HANZO_USER_KEY hint), exec human output (their 237 lines, our banner).
Superseded and dropped deliberately: our resume_command_name() coder-alias
hack — upstream's derive_resume_command_name() reads the invocation basename
generically, which yields "dev" for us.
LLM.md now records the real topology and the sync point; AGENTS.md and
CLAUDE.md are symlinks to it again. Single parent on purpose: adopting
jecode/main as a second parent would re-import 13,742 commits carrying the
upstream author emails a prior rewrite deliberately removed.
Version 0.2.188 -> 0.2.189.
Co-authored-by: Hanzo Dev <[email protected]>
75 lines
2.3 KiB
Diff
75 lines
2.3 KiB
Diff
# What: make `rusty_v8` accept Bazel-provided archives and bindings for the
|
|
# windows-gnullvm experiment.
|
|
# Scope: `rusty_v8` build.rs only; no V8 source or Bazel rule changes.
|
|
|
|
--- a/build.rs
|
|
+++ b/build.rs
|
|
@@ -543,10 +543,15 @@
|
|
}
|
|
|
|
fn static_lib_name(suffix: &str) -> String {
|
|
- let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
|
- if target_os == "windows" {
|
|
+ let target = env::var("TARGET").unwrap();
|
|
+ let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
|
+ if target.contains("windows-gnullvm") {
|
|
+ // rustc looks for GNU-style archive names when bundling `-lstatic` on the
|
|
+ // gnullvm targets, even though the prebuilt release is a COFF `.lib`.
|
|
+ format!("librusty_v8{suffix}.a")
|
|
+ } else if target_os == "windows" {
|
|
format!("rusty_v8{suffix}.lib")
|
|
} else {
|
|
format!("librusty_v8{suffix}.a")
|
|
}
|
|
}
|
|
@@ -577,7 +577,23 @@
|
|
path
|
|
}
|
|
|
|
+fn out_dir_abs() -> PathBuf {
|
|
+ let cwd = env::current_dir().unwrap();
|
|
+
|
|
+ // target/debug/build/rusty_v8-d9e5a424d4f96994/out/
|
|
+ let out_dir = env::var_os("OUT_DIR").expect(
|
|
+ "The 'OUT_DIR' environment is not set (it should be something like \
|
|
+ 'target/debug/rusty_v8-{hash}').",
|
|
+ );
|
|
+
|
|
+ cwd.join(out_dir)
|
|
+}
|
|
+
|
|
fn static_lib_dir() -> PathBuf {
|
|
+ if env::var_os("RUSTY_V8_ARCHIVE").is_some() {
|
|
+ return out_dir_abs().join("gn_out").join("obj");
|
|
+ }
|
|
+
|
|
build_dir().join("gn_out").join("obj")
|
|
}
|
|
|
|
@@ -794,22 +810,23 @@
|
|
}
|
|
|
|
fn print_link_flags() {
|
|
+ let target = env::var("TARGET").unwrap();
|
|
println!("cargo:rustc-link-lib=static=rusty_v8");
|
|
let should_dyn_link_libcxx = env::var("CARGO_FEATURE_USE_CUSTOM_LIBCXX")
|
|
.is_err()
|
|
+ || (target.contains("apple") && env::var("RUSTY_V8_ARCHIVE").is_ok())
|
|
|| env::var("GN_ARGS").is_ok_and(|gn_args| {
|
|
gn_args
|
|
.split_whitespace()
|
|
.any(|ba| ba == "use_custom_libcxx=false")
|
|
});
|
|
|
|
if should_dyn_link_libcxx {
|
|
// Based on https://github.com/alexcrichton/cc-rs/blob/fba7feded71ee4f63cfe885673ead6d7b4f2f454/src/lib.rs#L2462
|
|
if let Ok(stdlib) = env::var("CXXSTDLIB") {
|
|
if !stdlib.is_empty() {
|
|
println!("cargo:rustc-link-lib=dylib={stdlib}");
|
|
}
|
|
} else {
|
|
- let target = env::var("TARGET").unwrap();
|
|
if target.contains("msvc") {
|
|
// nothing to link to
|
|
} else if target.contains("apple")
|