Expand description
SMB2/3 file-sharing server with pluggable storage backends.
See docs/superpowers/specs/2026-04-27-rust-smb-server-design.md for the
v1 design. The public API is small on purpose:
use smb_server::{SmbServer, Share, Access, ShareBackend};
SmbServer::builder()
.listen("0.0.0.0:4445".parse()?)
.user("alice", "password")
.share(Share::new("home", backend).user("alice", Access::ReadWrite))
.build()?
.serve()
.await?;Modules§
Structs§
- Config
Handle - DirEntry
- One entry of a directory listing.
- File
Info - Filesystem-style metadata for a single file or directory.
- Local
FsBackend - Local-filesystem backend, sandboxed at a single root directory.
- Open
Options - Options passed to
ShareBackend::open. v1 keeps this tight on purpose; extra knobs become methods later if a backend genuinely needs them. - Share
- One share definition, attached to a single backend.
- SmbServer
- A built but not-yet-running SMB server.
Enums§
- Access
- Access level granted to a user on a share, or to anonymous on a public share.
- Identity
- Identity recovered from a successful (or anonymous) authentication.
- Open
Intent - Translated SMB CREATE intent — the small set of cases v1 cares about.
- Share
Mode
Traits§
- Handle
- A live open file or directory handle.
- Share
Backend - Pluggable storage backend mounted as a share.