You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Pre-flight check failed: mount path '{}' does not exist. Pass --mount-path relative to the repository root ({}) or run from the workspace root described in {}.",
1227
+
if relative_mount_path.is_empty(){
1228
+
"."
1229
+
} else {
1230
+
relative_mount_path
1231
+
},
1232
+
repo_root,
1233
+
VERIFIED_BUILDS_DOC_URL
1234
+
);
1235
+
1236
+
let manifest_path = mount_path_buf.join("Cargo.toml");
1237
+
ensure!(
1238
+
manifest_path.exists(),
1239
+
"Pre-flight check failed: missing Cargo.toml at {}. Ensure --mount-path points at your program workspace per {}.",
1240
+
manifest_path.display(),
1241
+
VERIFIED_BUILDS_DOC_URL
1242
+
);
1243
+
1244
+
let lock_path = mount_path_buf.join("Cargo.lock");
1245
+
ensure!(
1246
+
lock_path.exists(),
1247
+
"Pre-flight check failed: missing Cargo.lock at {}. Run `cargo generate-lockfile` in the workspace root (see {}).",
1248
+
lock_path.display(),
1249
+
VERIFIED_BUILDS_DOC_URL
1250
+
);
1251
+
1252
+
let manifest = Manifest::from_path(&manifest_path)?;
1253
+
let lib = manifest.lib.as_ref().ok_or_else(|| {
1254
+
anyhow!(
1255
+
"Pre-flight check failed: `[lib]` section not found in {}. Configure it as documented in {}.",
1256
+
manifest_path.display(),
1257
+
VERIFIED_BUILDS_DOC_URL
1258
+
)
1259
+
})?;
1260
+
1261
+
let configured_name = lib.name.as_ref().ok_or_else(|| {
1262
+
anyhow!(
1263
+
"Pre-flight check failed: `[lib] name` missing in {}. Set it per {}.",
1264
+
manifest_path.display(),
1265
+
VERIFIED_BUILDS_DOC_URL
1266
+
)
1267
+
})?;
1268
+
1269
+
ensure!(
1270
+
configured_name == library_name,
1271
+
"Pre-flight check failed: `[lib] name = \"{configured_name}\"` but the CLI resolved `{library_name}`. Update --library-name or your Cargo.toml."
1272
+
);
1273
+
1274
+
if lib.crate_type.is_empty(){
1275
+
println!(
1276
+
"Warning: `[lib] crate-type` is not set in {}. Add `cdylib` per {}.",
1277
+
manifest_path.display(),
1278
+
VERIFIED_BUILDS_DOC_URL
1279
+
);
1280
+
}else{
1281
+
ensure!(
1282
+
lib.crate_type.iter().any(|t| t == "cdylib"),
1283
+
"Pre-flight check failed: `[lib] crate-type` must include \"cdylib\" so Solana produces a deployable .so (see {}).",
0 commit comments