{"id":27291070,"url":"https://github.com/avivnaaman/smb-rs","last_synced_at":"2025-04-11T21:56:02.712Z","repository":{"id":275340678,"uuid":"902943660","full_name":"AvivNaaman/smb-rs","owner":"AvivNaaman","description":"smb-rs: SMB2 client in rust","archived":false,"fork":false,"pushed_at":"2025-04-11T16:41:25.000Z","size":740,"stargazers_count":15,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T21:55:57.575Z","etag":null,"topics":["file-sharing","linux","macos","rust","smb","smb-rs","smb2","smb3","windows"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AvivNaaman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-13T15:37:06.000Z","updated_at":"2025-04-04T09:26:12.000Z","dependencies_parsed_at":"2025-02-01T20:27:25.379Z","dependency_job_id":"32930072-052d-4759-8be7-c7b5c0d38d0e","html_url":"https://github.com/AvivNaaman/smb-rs","commit_stats":null,"previous_names":["avivnaaman/smb-rs"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvivNaaman%2Fsmb-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvivNaaman%2Fsmb-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvivNaaman%2Fsmb-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvivNaaman%2Fsmb-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AvivNaaman","download_url":"https://codeload.github.com/AvivNaaman/smb-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487729,"owners_count":21112188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-sharing","linux","macos","rust","smb","smb-rs","smb2","smb3","windows"],"created_at":"2025-04-11T21:56:01.969Z","updated_at":"2025-04-11T21:56:02.700Z","avatar_url":"https://github.com/AvivNaaman.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smb-rs: The SMB2 Client in Rust\n\n[![Build](https://github.com/AvivNaaman/smb-rs/actions/workflows/build.yml/badge.svg)](https://github.com/AvivNaaman/smb-rs/actions/workflows/build.yml)\n[![Crates.io](https://img.shields.io/crates/v/smb)](https://crates.io/crates/smb)\n[![Docs.rs](https://docs.rs/smb/badge.svg)](https://docs.rs/smb)\n\nThis project is the first rust implementation of [SMB2 \u0026 3](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/5606ad47-5ee0-437a-817e-70c366052962) client -- the protocol that powers Windows file sharing and remote services. The project is designed to be a library, but also includes a CLI tool for basic operations.\n\nWhile most current implementations are mostly bindings to C libraries (such as libsmb2, samba, or windows' own libraries), this project is a full implementation in Rust, with no dependencies on C libraries!\n\n## Getting started\nRunning the project is as simple as:\n```sh\ncargo run -- --help\n```\nCheck out the `info` and the `copy` sub-commands for more information.\n\nFor advanced usage, and crate usage, see the [Advanced Usage](#advanced-usage) section.\n## Features\n### General\n- ✅ SMB 2.X \u0026 3.X support.\n- ✅ Full file operations support.\n- ✅ Async + Multi-threaded + Single-threaded backends.\n- ✅ Support for all file operations.\n- ✅ Compression + Encryption support.\n- ✅ Windows, Linux \u0026 MacOS support.\n- ✅ CLI tool for basic operations.\n\nYou are welcome to see the project's roadmap in the [GitHub Project](https://github.com/users/AvivNaaman/projects/2).\n### Dialect Support\n| Dialect | Supported | Notes |\n| ------- | --------- | ----- |\n| 3.1.1   | ✅         |       |\n| 3.0.2   | ✅         |       |\n| 3.0     | ✅         |       |\n| 2.1     | ✅         |       |\n| 2.0.2   | ✅         |       |\n\n### Algorithm Support\n| Type            | Algorithm    |     | Feature Name           |\n| --------------- | ------------ | --- | ---------------------- |\n| **Signing**     | *            |     | `sign`                 |\n| Signing         | HMAC_SHA256  | ✅   | `sign_hmac`            |\n| Signing         | AES-128-GCM  | ✅   | `sign_gmac`            |\n| Signing         | AES-128-CCM  | ✅   | `sign_cmac`            |\n| **Encryption**  | *            |     | `encrypt`              |\n| Encryption      | AES-128-CCM  | ✅   | `encrypt_aes128ccm`    |\n| Encryption      | AES-128-GCM  | ✅   | `encrypt_aes128gcm`    |\n| Encryption      | AES-256-CCM  | ✅   | `encrypt_aes256ccm`    |\n| Encryption      | AES-256-GCM  | ✅   | `encrypt_aes256gcm`    |\n| **Compression** | *            |     | `compress`             |\n| Compression     | LZ4          | ✅   | `compress_lz4`         |\n| Compression     | Pattern_V1   | 🟡   | `compress_pattern_v1`* |\n| Compression     | LZNT1        | ❌   |                        |\n| Compression     | LZ77         | ❌   |                        |\n| Compression     | LZ77+Huffman | ❌   |                        |\n\n\u003e [!NOTE] \n\u003e Some of SMB's suported compression algorithms are missing, since no proper crates are available for them.\n\n## Advanced Usage\n### Using the library\nCheck out the `Connection` struct, exported from the `smb` crate, to initiate a connection to an SMB server:\n```rust\nuse smb::Connection;\nlet connection = Connection::build(Default::default());\nconnection.connect(\"10.0.0.1:445\").await?;\nlet session = connection.authenticate(\u0026\"user\", \"password\".to_string()).await?;\nlet tree = session.tree_connect(\"share\").await?;\nlet file = tree.create(\"file.txt\", ...).await?;\n```\n\n### Switch Threading model\nThe project supports async, multi-threaded, and single-threaded backends. The `async` backend is the default one, but you can enable the other backends by using the following features:\n- `async`: Enables the async backend (default)\n- `single_threaded`: Enables the single-threaded backend. *Must disable default features.*\n- `multi_threaded`: Enables the multi-threaded backend. *Must disable default features.*\n\nFor example, to enable the multi-threaded backend, you can run:\n```sh\ncargo run --no-default-feature --features \"multi_threaded,sign,encrypt,compress\" -- --help\n```\nIf you're using the crate, you can enable the features in your `Cargo.toml` file:\n```toml\n[dependencies]\nsmb = { version = \"0.1\", features = [\"multi_threaded\", \"sign\", ...], no-default-features = true }\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favivnaaman%2Fsmb-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favivnaaman%2Fsmb-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favivnaaman%2Fsmb-rs/lists"}