Skip to content

Commit

Permalink
build: disable kawa default features on non x86_64
Browse files Browse the repository at this point in the history
  • Loading branch information
anonkey committed Dec 30, 2024
1 parent d9366a7 commit 5f6a590
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
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
5 changes: 4 additions & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,16 @@ 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(target_arch = "x86_64")'.features]
default = ["simd"]

[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
```

0 comments on commit 5f6a590

Please sign in to comment.