Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix osx build #1136

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ fn set_workers_affinity(workers: &Vec<WorkerSession>) {
/// Can bind multiple processes to a CPU core if there are more processes
/// than CPU cores. Only works on Linux.
#[cfg(not(target_os = "linux"))]
fn set_workers_affinity(_: &Vec<Worker>) {}
fn set_workers_affinity(_: &Vec<WorkerSession>) {}

/// Set a specific process to run onto a specific CPU core
#[cfg(target_os = "linux")]
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/mock/sync_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl Backend {
let timeout = Duration::from_millis(100);
let timeout = libc::timeval {
tv_sec: 0,
tv_usec: timeout.subsec_micros().into(),
tv_usec: timeout.subsec_micros().try_into().unwrap_or(0),
};
let listener = unsafe {
let fd = listener.into_raw_fd();
Expand Down
10 changes: 7 additions & 3 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ hdrhistogram = "^7.5.4"
hex = "^0.4.3"
hpack = "^0.3.0"
idna = "^1.0.2"
kawa = { version = "^0.6.6", default-features = false }
libc = "^0.2.155"
memchr = "^2.7.2"
mio = { version = "^1.0.0", features = ["os-poll", "os-ext", "net"] }
Expand All @@ -59,13 +58,18 @@ serial_test = "^3.1.1"
tiny_http = "^0.12.0"

[features]
default = ["simd"]
default = []
logs-debug = []
logs-trace = []
simd = ["kawa/simd"]
splice = []
tolerant-http1-parser = ["kawa/tolerant-parsing"]
unstable = []

[target.'cfg(not(target_feature = "sse4.2"))'.dependencies]
kawa = { version = "^0.6.6" }

[target.'cfg(target_feature = "sse4.2")'.dependencies]
kawa = { version = "^0.6.6", default-features = false }

[badges]
travis-ci = { repository = "sozu-proxy/sozu" }
13 changes: 0 additions & 13 deletions lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,3 @@ to force that connection to close if too many of those are lingering.
- `lib/src/{http|https|tcp}.rs`: proxies for HTTP, HTTPS and TCP
- `lib/src/server.rs`: the main event loop shared by all proxies
- `lib/src/socket.rs`: abstraction over normal sockets

## Build with or without SIMD

SIMD stands for Single Instruction Multiple Data, and is used within the Kawa
dependency to accelerate parsing.

Kawa implements SIMD with the SSE instruction set, which is specific to intel.
If you wish to use Sōzu on another architecture (MacOS for instance), you
can disable this feature by doing:

```
cargo build --no-default-features
```