Respect CARGO_TARGET_DIR in native build script (#1441)

This commit is contained in:
Alan Alwakeel 2026-03-19 17:28:44 -04:00 committed by GitHub
parent f196309295
commit 3764cc615a

View file

@ -44,7 +44,11 @@ try {
}
// Locate the built library
const targetDir = path.join(nativeRoot, "target", profile);
const cargoTargetRoot = process.env.CARGO_TARGET_DIR
? path.resolve(process.env.CARGO_TARGET_DIR)
: path.join(nativeRoot, "target");
const targetDir = path.join(cargoTargetRoot, profile);
const platformTag = `${process.platform}-${process.arch}`;
const libraryNames = {