diff --git a/bin/src/main.rs b/bin/src/main.rs index bd45f2a10..80b0ceef1 100644 --- a/bin/src/main.rs +++ b/bin/src/main.rs @@ -172,7 +172,7 @@ fn set_workers_affinity(workers: &Vec) { /// 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) {} +fn set_workers_affinity(_: &Vec) {} /// Set a specific process to run onto a specific CPU core #[cfg(target_os = "linux")] diff --git a/e2e/src/mock/sync_backend.rs b/e2e/src/mock/sync_backend.rs index b97d58384..1ffaa3e11 100644 --- a/e2e/src/mock/sync_backend.rs +++ b/e2e/src/mock/sync_backend.rs @@ -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(); diff --git a/lib/Cargo.toml b/lib/Cargo.toml index d38e2a3d5..917153ae2 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -60,13 +60,16 @@ serial_test = "^3.1.1" tiny_http = "^0.12.0" [features] -default = ["simd"] +default = [] logs-debug = [] logs-trace = [] -simd = ["kawa/simd"] +simd = ['kawa/simd'] splice = [] tolerant-http1-parser = ["kawa/tolerant-parsing"] unstable = [] +[target.'cfg(target_arch = "x86_64")'.features] +default = ["simd"] + [badges] travis-ci = { repository = "sozu-proxy/sozu" } diff --git a/lib/README.md b/lib/README.md index b57ff0719..39573cb84 100644 --- a/lib/README.md +++ b/lib/README.md @@ -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 -``` \ No newline at end of file