Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use indexmap::IndexMap;
use memoize::memoize;
use serde_json::Value;
use std::collections::HashMap;
use std::env::consts::DLL_SUFFIX;
use std::io::{BufRead, BufReader, Write};
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
Expand Down Expand Up @@ -328,7 +329,7 @@ impl CargoBuildExterns {
.find(|f| f.ends_with(".rmeta"))
.or_else(|| files.iter().find(|f| f.ends_with(".rlib")))
.or_else(|| files.iter().find(|f| f.ends_with(".cdylib")))
.or_else(|| files.iter().find(|f| f.ends_with(".so")))
.or_else(|| files.iter().find(|f| f.ends_with(DLL_SUFFIX)))
.unwrap_or(&files[0])
.to_string();
let dep = DependentLibrary {
Expand Down
8 changes: 5 additions & 3 deletions src/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use cargo_metadata::MetadataCommand;
use colored::Colorize;
use indexmap::IndexMap;
use std::collections::HashSet;
use std::env::consts::{DLL_PREFIX, DLL_SUFFIX};
use std::path::{Path, PathBuf};
use std::process::Command;

Expand Down Expand Up @@ -111,15 +112,16 @@ fn generate_single_target_doc(

// Add extern dependencies for verus_builtin_macros (proc-macro -> host triple)
let builtin_macros_path =
verus_target_dir.join(format!("verus_builtin_macros{}", verus::DYN_LIB));
verus_target_dir.join(format!("{DLL_PREFIX}verus_builtin_macros{DLL_SUFFIX}"));
cmd.arg("--extern").arg(format!(
"verus_builtin_macros={}",
builtin_macros_path.display()
));

// Add extern dependencies for verus_state_machines_macros
let state_machine_macros_path =
verus_target_dir.join(format!("verus_state_machines_macros{}", verus::DYN_LIB));
let state_machine_macros_path = verus_target_dir.join(format!(
"{DLL_PREFIX}verus_state_machines_macros{DLL_SUFFIX}"
));
cmd.arg("--extern").arg(format!(
"verus_state_machines_macros={}",
state_machine_macros_path.display()
Expand Down
7 changes: 0 additions & 7 deletions src/verus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ pub const Z3_HINT: &str = "tools/verus/source";

pub const VERUSFMT_BIN: &str = "verusfmt";

#[cfg(target_os = "windows")]
pub const DYN_LIB: &str = ".dll";
#[cfg(target_os = "linux")]
pub const DYN_LIB: &str = ".so";
#[cfg(target_os = "macos")]
pub const DYN_LIB: &str = ".dylib";

pub const RUSTDOC_BIN: &str = "rustdoc";

pub const VERUSDOC_BIN: &str = "verusdoc";
Expand Down
Loading