Skip to main content

Crate smb_server

Crate smb_server 

Source
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§

ntstatus
NTSTATUS constants used by SMB2 handlers.
wire

Structs§

ConfigHandle
DirEntry
One entry of a directory listing.
FileInfo
Filesystem-style metadata for a single file or directory.
LocalFsBackend
Local-filesystem backend, sandboxed at a single root directory.
OpenOptions
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.
OpenIntent
Translated SMB CREATE intent — the small set of cases v1 cares about.
ShareMode

Traits§

Handle
A live open file or directory handle.
ShareBackend
Pluggable storage backend mounted as a share.