Skip to content

Commit

Permalink
dependencies bump
Browse files Browse the repository at this point in the history
  • Loading branch information
wanda-phi committed May 17, 2024
1 parent 2eb577c commit fd66648
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 26 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ indexmap = { version = "2", features = ["serde"] }
ndarray = { version = "0.15", features = ["serde"] }
enum-map = { version = "2.4", features = ["serde"] }
bitvec = { version = "1.0", features = ["serde"] }
itertools = "0.12"
itertools = "0.13"
rand = { version = "0.8", features = ["small_rng"] }
nix = { version = "0.28", features = ["fs"] }
rustix = { version = "0.38", features = ["fs", "pipe"] }
tempfile = "3.0"
toml = "0.8"
zstd = "0.13"
Expand All @@ -139,7 +139,7 @@ arrayref = "0.3.6"
bimap = "0.6"
std-semaphore = "0.1"
which = "6"
derivative = "2.2"
derive-where = "1.2"

[profile.dev]
opt-level = 2
Expand Down
2 changes: 1 addition & 1 deletion prjcombine_hammer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ bimap.workspace = true
rand.workspace = true
std-semaphore.workspace = true
itertools.workspace = true
derivative.workspace = true
derive-where.workspace = true

[lints]
workspace = true
18 changes: 3 additions & 15 deletions prjcombine_hammer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use bitvec::vec::BitVec;
use core::fmt::Debug;
use core::hash::Hash;
use derivative::Derivative;
use derive_where::derive_where;
use unnamed_entity::{entity_id, EntityVec};
use std::collections::{hash_map::Entry, HashMap, HashSet};

Expand Down Expand Up @@ -40,27 +40,15 @@ pub trait Backend: Debug + Sync {
) -> bool;
}

#[derive(Derivative)]
#[derivative(
Debug(bound = ""),
Clone(bound = ""),
Eq(bound = ""),
PartialEq(bound = "")
)]
#[derive_where(Debug, Clone, PartialEq, Eq)]
pub enum BatchValue<B: Backend> {
Base(B::Value),
BaseAny(HashSet<B::Value>),
Fuzzer(BatchFuzzerId, B::Value, B::Value),
FuzzerMulti(BatchFuzzerId, B::MultiValue),
}

#[derive(Derivative)]
#[derivative(
Debug(bound = ""),
Clone(bound = ""),
Eq(bound = ""),
PartialEq(bound = "")
)]
#[derive_where(Debug, Clone, PartialEq, Eq)]
pub enum FuzzerValue<B: Backend> {
Base(B::Value),
BaseAny(HashSet<B::Value>),
Expand Down
2 changes: 1 addition & 1 deletion prjcombine_toolchain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version.workspace = true
edition.workspace = true

[dependencies]
nix.workspace = true
rustix.workspace = true
serde.workspace = true
tempfile.workspace = true
toml.workspace = true
Expand Down
10 changes: 4 additions & 6 deletions prjcombine_toolchain/src/toolreader.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use crate::toolchain::Toolchain;
use nix::fcntl::{fcntl, FcntlArg};
use nix::sys::stat::Mode;
use nix::unistd::mkfifo;
use rustix::fs::{mknodat, FileType, Mode, CWD};
use rustix::pipe::fcntl_setpipe_size;
use std::fs::{write, File};
use std::io::{self, BufReader, Read};
use std::os::unix::io::AsRawFd;
use std::process::{Child, Stdio};
use tempfile::TempDir;

Expand All @@ -29,7 +27,7 @@ impl ToolchainReader {
write(path, v)?;
}
let path = dir.path().join(fifo_name);
mkfifo(&path, Mode::S_IRUSR | Mode::S_IWUSR)?;
mknodat(CWD, &path, FileType::Fifo, Mode::RUSR | Mode::WUSR, 0)?;
let mut cmd = tc.command(cmd);
cmd.current_dir(dir.path().as_os_str());
cmd.stdin(Stdio::null());
Expand All @@ -43,7 +41,7 @@ impl ToolchainReader {
}
let child = cmd.spawn()?;
let fifo = File::open(path)?;
let _ = fcntl(fifo.as_raw_fd(), FcntlArg::F_SETPIPE_SZ(1 << 20));
let _ = fcntl_setpipe_size(&fifo, 1 << 20);
Ok(BufReader::new(ToolchainReader {
fifo: Some(fifo),
_dir: dir,
Expand Down

0 comments on commit fd66648

Please sign in to comment.