GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tmthecoder/smb: Rust-based SMB message reader & writer

BranchesTags
Open more actions menu

Latest commit

 

History

220 Commits
220 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.idea
.idea
 
 
smb-core
smb-core
 
 
smb-derive
smb-derive
 
 
smb
smb
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
README.md
README.md
 
 

Repository files navigation

smb

A Rust implementation of the Server Message Block (SMB) Protocol Versions 2 and 3, built from the ground up following the official Microsoft specification.

Workspace

Crate Description
smb Protocol types, async server, networking, authentication, and cryptography
smb-core Core traits (SMBFromBytes, SMBToBytes, SMBByteSize) and error types
smb-derive Procedural derive macros for wire-format serialization/deserialization

Building

Requires Rust 1.85+ (edition 2024).

# Library check
cargo check --workspace --features server

# Build the server binary
cargo build -p smb_reader --features server,anyhow

# Build with tracing enabled
cargo build -p smb_reader --features server,tracing,anyhow

Running

# Default port (50122)
cargo run -p smb_reader --features server,anyhow

# Custom port
SMB_PORT=4450 cargo run -p smb_reader --features server,anyhow

# With tracing (default level: info, override with RUST_LOG)
RUST_LOG=debug cargo run -p smb_reader --features server,tracing,anyhow

The server listens on 127.0.0.1:<port> and exposes a filesystem share (test) and an IPC share.

Testing

# Unit tests
cargo test --lib --features server

# Integration tests (message serialization round-trips)
cargo test --test message --features server,anyhow

# Integration tests with smbclient (requires smbclient installed)
cargo test --test smbclient --features server,anyhow -- --ignored

CI

GitHub Actions runs on every push:

Workflow What it does
check.yml cargo check + cargo clippy -- -D warnings
unit-tests.yml cargo test --lib --features server
integration-tests.yml Message round-trip tests + smbclient integration tests
docs.yml cargo doc --workspace --features server --no-deps

Feature Flags

Defined in the smb crate:

Feature Effect
server Enables async server (implies async)
async Enables tokio runtime
tracing Opt-in distributed tracing via the tracing crate
logging Enables tracing + log crate compatibility bridge
anyhow Required for the spin_server_up binary

Specification

This implementation follows the MS-SMB2 specification. Related specs:

  • MS-NLMP — NTLM authentication
  • MS-SPNG — SPNEGO negotiation

About

Rust-based SMB message reader & writer

Resources

Readme
Activity

Stars

4 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.