Expand description
Protocol and transport primitives for Smolder.
The published package name is smolder-smb-core, while the Rust library
crate name remains smolder_core.
§Feature Flags
The supported cargo features are:
kerberos: stable public Kerberos API plus the current password-backed backendkerberos-sspi: backend-only flag for the current password-backed Kerberos implementationkerberos-gssapi: Unix ticket-cache and keytab backend using system GSS/Kerberos librariesquic: feature-gated SMB over QUIC transport primitives
The default build enables none of these features and stays the most
static-friendly profile. kerberos-gssapi is intentionally independent from
kerberos-sspi, so enabling Unix GSS credential-store support does not also
pull in the SSPI backend.
It owns SMB auth/session state, request dispatch, and transport logic.
High-level SMB file facades, execution flows, and other operator workflows
belong in the smolder package, not this crate.
This crate is the reusable library layer for:
- SMB negotiate, session setup, signing, and encryption
- NTLM/SPNEGO authentication primitives, with optional Kerberos support
- Tree/file operations, compound dispatch, and credit-aware request flow
- DFS referral helpers
- Named-pipe and DCE/RPC transport on top of SMB
- Durable/reconnect and resiliency primitives
The most common imports are re-exported in prelude.
§Usage model
Use smolder_core when you want typed SMB/RPC client primitives or the new
embedded-client facade in facade. If you want operator-facing workflows
such as smbexec and psexec, use the smolder package instead.
§Start here
The fastest supported entry points are:
cargo run -p smolder-smb-core --example client_session_connectcargo run -p smolder-smb-core --example client_share_listcargo run -p smolder-smb-core --example client_file_roundtripcargo run -p smolder-smb-core --example ntlm_tree_connectcargo run -p smolder-smb-core --example named_pipe_rpc_bindcargo run -p smolder-smb-core --features kerberos --example kerberos_tree_connectcargo run -p smolder-smb-core --features quic --example client_quic_session_connect
Supporting project docs:
- https://github.com/M00NLIG7/smolder/blob/main/docs/guide/examples.md
- https://github.com/M00NLIG7/smolder/blob/main/docs/guide/cookbook.md
- https://github.com/M00NLIG7/smolder/blob/main/docs/reference/support-policy.md
- https://github.com/M00NLIG7/smolder/blob/main/docs/reference/versioning-policy.md
§Public API Tiers
The intended entry points for most consumers are:
facade::Clientandfacade::ClientBuilderfor embedded client usagefacade::Session,facade::Share,facade::File, andfacade::OpenOptionsfor authenticated-session, share, and file flowsclient::Connectionplus its typestate markers for negotiate, session, tree, and file operationspipe::SmbSessionConfig,pipe::connect_tree, andpipe::NamedPipeforIPC$and named-pipe transportrpc::PipeRpcClientfor reusable DCE/RPC over SMB named pipesauthcredential/authenticator types anderror::CoreErrortransport::SmbTransportortransport::Transportwhen embedding the client over a custom transport
Lower-level signing, preauth, and raw crypto helpers remain available for expert users, but they are not the recommended starting surface. The repo’s API audit notes are in https://github.com/M00NLIG7/smolder/blob/main/docs/reference/smolder-core-api.md.
Copyright (c) 2025 M00NLIG7
Modules§
- auth
- Authentication providers and protocol helpers.
- client
- Typestate SMB client built on top of wire-level packet codecs.
- compression
- SMB 3.1.1 compression helpers.
- crypto
- SMB cryptographic key-derivation helpers.
- dfs
- DFS-aware UNC parsing and referral resolution helpers.
- error
- Errors returned by the core client/session layer.
- facade
- High-level embedded client facade built on top of the typestate SMB client.
- lsarpc
- Typed
lsarpcDCE/RPC helpers built on top of named pipes. - pipe
- Reusable IPC$ and named-pipe primitives built on top of the typestate client.
- prelude
- Curated imports for the intended
smolder_coreentry points. - rpc
- Reusable DCE/RPC transport primitives built on top of named pipes.
- samr
- Typed
samrDCE/RPC helpers built on top of named pipes. - srvsvc
- Typed
srvsvcDCE/RPC helpers built on top of named pipes. - transport
- Async transports used by the SMB client.