You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clean re-exports from lib.rs: users write `use smb2::{SmbClient, Tree}`
instead of `use smb2::client::{SmbClient, Tree}`.
SmbClient convenience methods: 11 methods (list_directory, read_file,
write_file, delete_file, stat, rename, create_directory, etc.) that
delegate to Tree — users call `client.list_directory(&share, "path")`
instead of `tree.list_directory(client.connection_mut(), "path")`.
README updated with actual API examples that match the code. Quick
start, pipeline API, and API overview all use real types and methods.
Four runnable examples: list_shares, list_directory, read_file,
write_file. All compile and use the high-level SmbClient API.
Module-level docs on internal modules (msg, pack, crypto, auth, rpc,
transport, types) point users to SmbClient instead.
Crate-level docs with quick start example and module overview.
519 unit tests + 12 integration tests, zero clippy warnings.
Copy file name to clipboardExpand all lines: README.md
+82-45Lines changed: 82 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,19 +27,16 @@ I built this because I needed fast SMB access for [Cmdr](https://github.com/vdav
27
27
- Credit-window-based flow control (the server tells us how fast to go)
28
28
- SMB 3.x signing, encryption, and LZ4 compression
29
29
- Share enumeration (list shares on a server)
30
-
- Directory change notifications (watch for file changes)
31
-
- Auto-reconnect with durable handles (survives Wi-Fi drops)
32
-
- Server-side copy
33
30
34
31
## What it doesn't do (yet)
35
32
36
33
If you need any of these, check the [`smb`](https://crates.io/crates/smb) crate which supports them:
37
34
38
-
-**Kerberos authentication**— NTLM only for now. Kerberos is needed for Active Directory environments that disable NTLM. Most home NAS setups (Synology, QNAP, Pi) use NTLM.
39
-
-**DFS path resolution**— returns `Error::DfsReferralRequired` with the path so you can handle it yourself. Full automatic DFS follow-through is planned for post-1.0.
40
-
-**Multi-channel**— multiple TCP connections to the same server for higher throughput. Planned for post-1.0.
41
-
-**QUIC transport**— SMB over QUIC for Azure Files and Windows Server 2022+ over the internet
-**Kerberos authentication**-- NTLM only for now. Kerberos is needed for Active Directory environments that disable NTLM. Most home NAS setups (Synology, QNAP, Pi) use NTLM.
36
+
-**DFS path resolution**-- returns `Error::DfsReferralRequired` with the path so you can handle it yourself. Full automatic DFS follow-through is planned for post-1.0.
37
+
-**Multi-channel**-- multiple TCP connections to the same server for higher throughput. Planned for post-1.0.
38
+
-**QUIC transport**-- SMB over QUIC for Azure Files and Windows Server 2022+ over the internet
The pipeline is the core feature. It lets you push requests from anywhere, at any time, and results stream back as they complete. You don't need to know the total count upfront.
87
+
The pipeline is the core feature. It lets you batch multiple operations and execute them together:
-`tx.request(Op)` — push an operation (from any task)
137
-
-`rx.next()` — receive the next completed result
166
+
-`Pipeline::new(conn, &share)` -- create a pipeline
167
+
-`pipeline.execute(ops)` -- run a batch of operations
168
+
169
+
### Low-level API
170
+
171
+
For advanced use cases, the underlying types are available:
138
172
139
-
The pipeline handles credit management, chunking, compounding, and reordering internally. Multiple operations fly over the wire concurrently, bounded by the server's credit grants.
-`NegotiatedParams` -- protocol parameters from negotiate
140
177
141
178
## Performance
142
179
@@ -169,10 +206,10 @@ The [`smb`](https://crates.io/crates/smb) crate is the most complete Rust SMB2 o
169
206
170
207
But for the common case (connect to a NAS, move files around), `smb2` is a better fit:
171
208
172
-
-**Pipelined I/O**—`smb` sends one request at a time, making downloads ~10x slower
173
-
-**Auto-reconnect with durable handles**— survives Wi-Fi drops without restarting transfers
174
-
-**Comprehensive test suite**—`smb` has almost no tests
175
-
-**MIT OR Apache-2.0**—`smb` is MIT-only
209
+
-**Pipelined I/O**--`smb` sends one request at a time, making downloads ~10x slower
210
+
-**Auto-reconnect with durable handles**-- survives Wi-Fi drops without restarting transfers
211
+
-**Comprehensive test suite**--`smb` has almost no tests
212
+
-**MIT OR Apache-2.0**--`smb` is MIT-only
176
213
177
214
I initially considered forking `smb`, but the architecture didn't support pipelining well, and adding it would have been a near-complete rewrite anyway.
0 commit comments