Skip to content

Commit 5f6a590

Browse files
committed
build: disable kawa default features on non x86_64
1 parent d9366a7 commit 5f6a590

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

e2e/src/mock/sync_backend.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl Backend {
4848
let timeout = Duration::from_millis(100);
4949
let timeout = libc::timeval {
5050
tv_sec: 0,
51-
tv_usec: timeout.subsec_micros().into(),
51+
tv_usec: timeout.subsec_micros().try_into().unwrap_or(0),
5252
};
5353
let listener = unsafe {
5454
let fd = listener.into_raw_fd();

lib/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,16 @@ serial_test = "^3.1.1"
6565
tiny_http = "^0.12.0"
6666

6767
[features]
68-
default = ["simd"]
68+
default = []
6969
logs-debug = []
7070
logs-trace = []
7171
simd = ["kawa/simd"]
7272
splice = []
7373
tolerant-http1-parser = ["kawa/tolerant-parsing"]
7474
unstable = []
7575

76+
[target.'cfg(target_arch = "x86_64")'.features]
77+
default = ["simd"]
78+
7679
[badges]
7780
travis-ci = { repository = "sozu-proxy/sozu" }

lib/README.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,3 @@ to force that connection to close if too many of those are lingering.
2626
- `lib/src/{http|https|tcp}.rs`: proxies for HTTP, HTTPS and TCP
2727
- `lib/src/server.rs`: the main event loop shared by all proxies
2828
- `lib/src/socket.rs`: abstraction over normal sockets
29-
30-
## Build with or without SIMD
31-
32-
SIMD stands for Single Instruction Multiple Data, and is used within the Kawa
33-
dependency to accelerate parsing.
34-
35-
Kawa implements SIMD with the SSE instruction set, which is specific to intel.
36-
If you wish to use Sōzu on another architecture (MacOS for instance), you
37-
can disable this feature by doing:
38-
39-
```
40-
cargo build --no-default-features
41-
```

0 commit comments

Comments
 (0)