Skip to main content

smolder_tools/
lib.rs

1//! High-level tools and integrations built on top of Smolder primitives.
2//!
3//! The published package name is `smolder`, while the Rust library crate name
4//! remains `smolder_tools`.
5//!
6//! It owns ergonomic SMB file APIs, remote execution, and CLI integrations. It
7//! depends on the `smolder-smb-core` package for SMB/RPC primitives rather than
8//! extending the core crate with tool-specific behavior.
9//!
10//! # Feature Flags
11//!
12//! The main optional feature is:
13//!
14//! - `kerberos`: enables Kerberos-capable high-level workflows and re-exports
15//!   the Kerberos auth types from `smolder-smb-core`
16//!
17//! This crate is the right entry point when you want:
18//!
19//! - a higher-level SMB client builder and share/file API
20//! - DFS-aware path handling and reconnect helpers
21//! - operator workflows such as `smbexec` and `psexec`
22//! - the standalone Smolder CLI binaries plus the `smolder` compatibility wrapper
23//!
24//! Lower-level protocol and transport pieces remain in the `smolder-smb-core`
25//! and `smolder-proto` packages.
26//!
27//! The most common public types are re-exported in [`prelude`].
28//!
29//! # Start here
30//!
31//! The fastest supported entry points are:
32//!
33//! - `cargo run -p smolder --example file_roundtrip`
34//! - `cargo run -p smolder --features kerberos --example kerberos_share_list`
35//! - `cargo run -p smolder --example interactive_psexec`
36//!
37//! Supporting project docs:
38//!
39//! - [docs/guide/examples.md](/Users/cmagana/Projects/smolder/docs/guide/examples.md)
40//! - [docs/guide/cookbook.md](/Users/cmagana/Projects/smolder/docs/guide/cookbook.md)
41//! - [docs/reference/support-policy.md](/Users/cmagana/Projects/smolder/docs/reference/support-policy.md)
42//! - [docs/reference/versioning-policy.md](/Users/cmagana/Projects/smolder/docs/reference/versioning-policy.md)
43//!
44//! Copyright (c) 2025 M00NLIG7
45
46#![cfg_attr(docsrs, feature(doc_cfg))]
47#![forbid(unsafe_code)]
48#![warn(missing_docs)]
49
50pub mod fs;
51pub mod reconnect;
52pub mod remote_exec;
53pub mod cli;
54pub mod prelude {
55    //! Common types and traits
56
57    pub use crate::fs::{
58        Lease, LeaseRequest, OpenOptions, RemoteFile, Share, SmbClient, SmbClientBuilder,
59        SmbDirectoryEntry, SmbMetadata,
60    };
61    pub use crate::reconnect::ShareReconnectPlan;
62    pub use crate::remote_exec::{
63        ExecMode, ExecRequest, ExecResult, InteractiveReader, InteractiveSession, InteractiveStdin,
64        InteractiveWaiter, RemoteExecBuilder, RemoteExecClient,
65    };
66    pub use smolder_core::prelude::{
67        DurableHandle, DurableOpenOptions, NtlmCredentials, ResilientHandle,
68    };
69    #[cfg(feature = "kerberos")]
70    #[cfg_attr(docsrs, doc(cfg(feature = "kerberos")))]
71    pub use smolder_core::prelude::{
72        KerberosBackendKind, KerberosCredentialSourceKind, KerberosCredentials, KerberosTarget,
73    };
74}