Skip to content

Commit 5abf8d4

Browse files
committed
update readme and changlog
1 parent bed08b8 commit 5abf8d4

File tree

2 files changed

+102
-3
lines changed

2 files changed

+102
-3
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.2.0] - 2025-06-29
10+
11+
### Added
12+
13+
- Added AsyncRead/AsyncWrite support for Tag and Stream (requires `utils` feature flag)
14+
- Added `connect_addr_vec` function to Worker
15+
16+
### Changed
17+
18+
- Updated to UCX 1.18 with latest API compatibility
19+
- Updated multiple dependency versions
20+
- Migrated to Rust 2021 edition
21+
22+
### Fixed
23+
24+
- Fixed various bugs and issues
25+
926
## [0.1.1] - 2022-09-01
1027

1128
### Changed

README.md

Lines changed: 85 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,94 @@
44
[![Docs](https://docs.rs/async-ucx/badge.svg)](https://docs.rs/async-ucx)
55
[![CI](https://github.com/madsys-dev/async-ucx/workflows/CI/badge.svg?branch=main)](https://github.com/madsys-dev/async-ucx/actions)
66

7-
Async Rust UCX bindings.
7+
Async Rust UCX bindings providing high-performance networking capabilities for distributed systems and HPC applications.
8+
9+
## Features
10+
11+
- **Asynchronous UCP Operations**: Full async/await support for UCX operations
12+
- **Multiple Communication Models**: Support for RMA, Stream, Tag, and Active Message APIs
13+
- **High Performance**: Optimized for low-latency, high-throughput communication
14+
- **Tokio Integration**: Seamless integration with Tokio async runtime
15+
- **Comprehensive Examples**: Ready-to-use examples for various UCX patterns
816

917
## Optional features
1018

11-
- `event`: Enable UCP wakeup mechanism.
12-
- `am`: Enable UCP Active Message API.
19+
- `event`: Enable UCP wakeup mechanism for event-driven applications
20+
- `am`: Enable UCP Active Message API for flexible message handling
21+
- `util`: Enable additional utility functions for UCX integration
22+
23+
## Quick Start
24+
25+
Add to your `Cargo.toml`:
26+
27+
```toml
28+
[dependencies]
29+
async-ucx = "0.2"
30+
tokio = { version = "1.0", features = ["rt", "net"] }
31+
```
32+
33+
Basic usage example:
34+
35+
```rust
36+
use async_ucx::ucp::*;
37+
use std::mem::MaybeUninit;
38+
use std::net::SocketAddr;
39+
40+
#[tokio::main(flavor = "current_thread")]
41+
async fn main() -> Result<(), Box<dyn std::error::Error>> {
42+
// Create UCP contexts and workers
43+
let context1 = Context::new()?;
44+
let worker1 = context1.create_worker()?;
45+
let context2 = Context::new()?;
46+
let worker2 = context2.create_worker()?;
47+
48+
// Start polling for both workers
49+
tokio::task::spawn_local(worker1.clone().polling());
50+
tokio::task::spawn_local(worker2.clone().polling());
51+
52+
// Create listener on worker1
53+
let mut listener = worker1
54+
.create_listener("0.0.0.0:0".parse().unwrap())?;
55+
let listen_port = listener.socket_addr()?.port();
56+
57+
// Connect worker2 to worker1
58+
let mut addr: SocketAddr = "127.0.0.1:0".parse().unwrap();
59+
addr.set_port(listen_port);
60+
61+
let (endpoint1, endpoint2) = tokio::join!(
62+
async {
63+
let conn1 = listener.next().await;
64+
worker1.accept(conn1).await.unwrap()
65+
},
66+
async { worker2.connect_socket(addr).await.unwrap() },
67+
);
68+
69+
// Send and receive tag message
70+
tokio::join!(
71+
async {
72+
let msg = b"Hello UCX!";
73+
endpoint2.tag_send(1, msg).await.unwrap();
74+
println!("Message sent");
75+
},
76+
async {
77+
let mut buf = vec![MaybeUninit::<u8>::uninit(); 10];
78+
worker1.tag_recv(1, &mut buf).await.unwrap();
79+
println!("Message received");
80+
}
81+
);
82+
83+
Ok(())
84+
}
85+
```
86+
87+
## Examples
88+
89+
Check the `examples/` directory for comprehensive examples:
90+
- `rma.rs`: Remote Memory Access operations
91+
- `stream.rs`: Stream-based communication
92+
- `tag.rs`: Tag-based message matching
93+
- `bench.rs`: Performance benchmarking
94+
- `bench-multi-thread.rs`: Multi-threaded benchmarking
1395

1496
## License
1597

0 commit comments

Comments
 (0)