### Rust Shmipc Hello World Client Example Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md A basic client implementation for the Shmipc Hello World example. Demonstrates how to initiate communication with a Shmipc server. ```rust use shmipc::client::Client; fn main() { let mut client = Client::new("hello_world").unwrap(); client.send(b"hello").unwrap(); let resp = client.recv().unwrap(); println!("Received: {:?}", resp); } ``` -------------------------------- ### Rust Shmipc Hello World Server Example Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md A basic server implementation for the Shmipc Hello World example. Demonstrates how to set up a Shmipc server to receive and respond to messages. ```rust use shmipc::server::Server; fn main() { let mut server = Server::new("hello_world").unwrap(); let req = server.recv().unwrap(); println!("Received: {:?}", req); server.send(b"world").unwrap(); } ``` -------------------------------- ### Performance Comparison: Shmipc vs. Unix Domain Socket (64 Bytes) Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md Compares the ping-pong communication performance between Shmipc and Unix Domain Socket for 64-byte packages. Demonstrates Shmipc's lower latency. ```text benchmark_parallel_ping_pong_by_shmipc_64b time: [1.0227 µs 1.0662 µs 1.1158 µs] benchmark_parallel_ping_pong_by_uds_64b time: [2.4879 µs 2.6609 µs 2.8643 µs] ``` -------------------------------- ### Performance Comparison: Shmipc vs. Unix Domain Socket (4096 Bytes) Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md Compares the ping-pong communication performance between Shmipc and Unix Domain Socket for 4096-byte packages. Shmipc demonstrates significantly better performance. ```text benchmark_parallel_ping_pong_by_shmipc_4096b time: [988.93 ns 1.0183 µs 1.0495 µs] benchmark_parallel_ping_pong_by_uds_4096b time: [3.4969 µs 3.5927 µs 3.6835 µs] ``` -------------------------------- ### Performance Comparison: Shmipc vs. Unix Domain Socket (512 Bytes) Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md Compares the ping-pong communication performance between Shmipc and Unix Domain Socket for 512-byte packages. Shmipc shows a performance advantage. ```text benchmark_parallel_ping_pong_by_shmipc_512b time: [973.36 ns 1.0128 µs 1.0572 µs] benchmark_parallel_ping_pong_by_uds_512b time: [2.3158 µs 2.4003 µs 2.4921 µs] ``` -------------------------------- ### Performance Comparison: Shmipc vs. Unix Domain Socket (65536 Bytes) Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md Compares the ping-pong communication performance between Shmipc and Unix Domain Socket for 65536-byte packages. Shmipc shows a significant performance gain. ```text benchmark_parallel_ping_pong_by_shmipc_65536b time: [1.1807 µs 1.2538 µs 1.3238 µs] benchmark_parallel_ping_pong_by_uds_65536b time: [15.082 µs 15.419 µs 15.802 µs] ``` -------------------------------- ### Performance Comparison: Shmipc vs. Unix Domain Socket (16384 Bytes) Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md Compares the ping-pong communication performance between Shmipc and Unix Domain Socket for 16384-byte packages. Shmipc shows a substantial performance improvement. ```text benchmark_parallel_ping_pong_by_shmipc_16384b time: [1.1775 µs 1.2264 µs 1.2806 µs] benchmark_parallel_ping_pong_by_uds_16384b time: [5.3147 µs 5.8754 µs 6.5797 µs] ``` -------------------------------- ### Performance Comparison: Shmipc vs. Unix Domain Socket (524288 Bytes) Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md Compares the ping-pong communication performance between Shmipc and Unix Domain Socket for 524288-byte packages. Shmipc shows a significant performance improvement. ```text benchmark_parallel_ping_pong_by_shmipc_524288b time: [1.1722 µs 1.2599 µs 1.3426 µs] benchmark_parallel_ping_pong_by_uds_524288b time: [146.55 µs 150.90 µs 155.72 µs] ``` -------------------------------- ### Performance Comparison: Shmipc vs. Unix Domain Socket (1024 Bytes) Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md Compares the ping-pong communication performance between Shmipc and Unix Domain Socket for 1024-byte packages. Shmipc maintains a performance lead. ```text benchmark_parallel_ping_pong_by_shmipc_1024b time: [1.0084 µs 1.0509 µs 1.0996 µs] benchmark_parallel_ping_pong_by_uds_1024b time: [2.3272 µs 2.4259 µs 2.5353 µs] ``` -------------------------------- ### Performance Comparison: Shmipc vs. Unix Domain Socket (4194304 Bytes) Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md Compares the ping-pong communication performance between Shmipc and Unix Domain Socket for 4194304-byte packages. Shmipc shows a substantial performance improvement. ```text benchmark_parallel_ping_pong_by_shmipc_4194304b time: [4.7158 µs 4.8180 µs 4.9205 µs] benchmark_parallel_ping_pong_by_uds_4194304b time: [2.1126 ms 2.3210 ms 2.5974 ms] ``` -------------------------------- ### Performance Comparison: Shmipc vs. Unix Domain Socket (262144 Bytes) Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md Compares the ping-pong communication performance between Shmipc and Unix Domain Socket for 262144-byte packages. Shmipc demonstrates superior performance. ```text benchmark_parallel_ping_pong_by_shmipc_262144b time: [1.1137 µs 1.1673 µs 1.2253 µs] benchmark_parallel_ping_pong_by_uds_262144b time: [68.750 µs 70.805 µs 73.121 µs] ``` -------------------------------- ### Performance Comparison: Shmipc vs. Unix Domain Socket (32768 Bytes) Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md Compares the ping-pong communication performance between Shmipc and Unix Domain Socket for 32768-byte packages. Shmipc maintains its performance advantage. ```text benchmark_parallel_ping_pong_by_shmipc_32768b time: [1.1225 µs 1.1844 µs 1.2498 µs] benchmark_parallel_ping_pong_by_uds_32768b time: [6.9058 µs 7.0930 µs 7.3091 µs] ``` -------------------------------- ### Performance Comparison: Shmipc vs. Unix Domain Socket (1048576 Bytes) Source: https://github.com/cloudwego/shmipc-rs/blob/main/README.md Compares the ping-pong communication performance between Shmipc and Unix Domain Socket for 1048576-byte packages. Shmipc maintains a performance advantage. ```text benchmark_parallel_ping_pong_by_shmipc_1048576b time: [2.3027 µs 2.3872 µs 2.4821 µs] benchmark_parallel_ping_pong_by_uds_1048576b time: [341.92 µs 354.70 µs 368.29 µs] ``` -------------------------------- ### Push Changes to GitHub Source: https://github.com/cloudwego/shmipc-rs/blob/main/CONTRIBUTING.md After committing your changes, push the new branch to your forked GitHub repository. This makes your changes available for a pull request. ```bash git push origin my-fix-branch ``` -------------------------------- ### Create a New Git Branch Source: https://github.com/cloudwego/shmipc-rs/blob/main/CONTRIBUTING.md When working on a fix or feature, create a new git branch from the 'develop' branch. This helps keep changes organized and separate. ```bash git checkout -b my-fix-branch develop ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.