Files
Zach Kelling 9513b3697f Import the Rust D-Chain and F-Chain
These were in luxfi/compute, a private repo whose licence is the same
BSD-3-Clause as luxfi/node's. Nothing here needed protecting, and keeping
it private broke the public Rust chain builds that reference it.

Sibling paths lose a level: the chains sat three deep in compute and sit
one deep here. The conformance generator loses a replace naming an
absolute path on one machine, and takes luxfi/chains from the proxy.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-10 21:36:01 -07:00

25 lines
1.2 KiB
Rust

// SPDX-License-Identifier: BSD-3-Clause-Eco
// Copyright (C) 2019-2026, Lux Industries Inc. All rights reserved.
//! Re-emit the loader path `libluxcrypto` was resolved at.
//!
//! This chain authenticates a payer with ML-DSA-65, which comes from
//! `libluxcrypto` by way of `lux-pq`. `cargo:rustc-link-arg` reaches only the
//! binaries of the crate that emitted it, so the rpath `lux-pq`'s own ABI crate
//! set does not reach this crate's binaries — the conformance evaluator and the
//! test binaries link and then cannot load without this.
//!
//! `links` metadata does reach here. `DEP_LUXPQ_LIB_DIR` is `lux-pq` passing on
//! what the ABI crate resolved, so the directory is found exactly once, down
//! there, and repeated here rather than searched for a second time. Nothing is
//! emitted when the variable is absent: the library may already be on the
//! system loader path, and inventing a directory would only be a second place
//! to look.
fn main() {
if let Some(dir) = std::env::var_os("DEP_LUXPQ_LIB_DIR") {
println!("cargo:rustc-link-arg=-Wl,-rpath,{}", dir.to_string_lossy());
}
println!("cargo:rerun-if-env-changed=DEP_LUXPQ_LIB_DIR");
}