-
-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Faster UDP/IO on Apple platforms
This uses Apple's private sendmsg_x and recvmsg_x system calls for multi-packet UDP I/O.
- Loading branch information
1 parent
41850c8
commit de8f280
Showing
5 changed files
with
239 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use cfg_aliases::cfg_aliases; | ||
|
||
fn main() { | ||
// Setup cfg aliases | ||
cfg_aliases! { | ||
// Platforms | ||
apple: { | ||
any( | ||
target_os = "macos", | ||
target_os = "ios", | ||
target_os = "tvos", | ||
target_os = "visionos" | ||
) | ||
}, | ||
bsd: { | ||
any( | ||
target_os = "freebsd", | ||
target_os = "openbsd", | ||
target_os = "netbsd" | ||
) | ||
}, | ||
// Convenience aliases | ||
apple_fast: { all(apple, feature = "fast-apple-datapath") }, | ||
apple_slow: { all(apple, not(feature = "fast-apple-datapath")) }, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.