{"id":13578373,"url":"https://github.com/veeso/pavao","last_synced_at":"2025-04-04T17:04:48.463Z","repository":{"id":57697661,"uuid":"370729887","full_name":"veeso/pavao","owner":"veeso","description":"A Rust client library for SMB 🦚","archived":false,"fork":false,"pushed_at":"2025-03-20T13:49:22.000Z","size":9038,"stargazers_count":69,"open_issues_count":1,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T16:04:37.616Z","etag":null,"topics":["libsmbclient","rust","rust-lang","rust-smb","smb","smbclient"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/veeso.png","metadata":{"funding":{"github":"veeso","ko_fi":"veeso"},"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-05-25T14:53:12.000Z","updated_at":"2025-03-22T08:06:15.000Z","dependencies_parsed_at":"2024-02-11T13:27:21.453Z","dependency_job_id":"ef26ac14-1c1c-430d-a1a4-1be7323800b9","html_url":"https://github.com/veeso/pavao","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"185f855e7c97a86f76ad1a2cd2626b230e057153"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2Fpavao","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2Fpavao/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2Fpavao/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2Fpavao/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veeso","download_url":"https://codeload.github.com/veeso/pavao/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217172,"owners_count":20903008,"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":["libsmbclient","rust","rust-lang","rust-smb","smb","smbclient"],"created_at":"2024-08-01T15:01:29.930Z","updated_at":"2025-04-04T17:04:48.440Z","avatar_url":"https://github.com/veeso.png","language":"Rust","funding_links":["https://github.com/sponsors/veeso","https://ko-fi.com/veeso","https://www.paypal.me/chrisintin"],"categories":["Rust"],"sub_categories":[],"readme":"# Pavão\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/pavao.png\" alt=\"pavao logo\" width=\"128\" height=\"128\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e~ A Rust client library for SMB ~\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#get-started-\"\u003eGet started\u003c/a\u003e\n  ·\n  \u003ca href=\"https://crates.io/crates/pavao\" target=\"_blank\"\u003eCrates.io\u003c/a\u003e\n  ·\n  \u003ca href=\"https://docs.rs/pavao\" target=\"_blank\"\u003eDocumentation\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eDeveloped by \u003ca href=\"https://veeso.me/\" target=\"_blank\"\u003e@veeso\u003c/a\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003eCurrent version: 0.2.12 (19/03/2025)\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.gnu.org/licenses/gpl-3.0\"\n    \u003e\u003cimg\n      src=\"https://img.shields.io/badge/License-GPLv3-blue.svg\"\n      alt=\"License-GPLv3\"\n  /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/veeso/pavao/stargazers\"\n    \u003e\u003cimg\n      src=\"https://img.shields.io/github/stars/veeso/pavao.svg?style=plain\"\n      alt=\"Repo stars\"\n  /\u003e\u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/pavao\"\n    \u003e\u003cimg\n      src=\"https://img.shields.io/crates/d/pavao.svg\"\n      alt=\"Downloads counter\"\n  /\u003e\u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/pavao\"\n    \u003e\u003cimg\n      src=\"https://img.shields.io/crates/v/pavao.svg\"\n      alt=\"Latest version\"\n  /\u003e\u003c/a\u003e\n  \u003ca href=\"https://ko-fi.com/veeso\"\u003e\n    \u003cimg\n      src=\"https://img.shields.io/badge/donate-ko--fi-red\"\n      alt=\"Ko-fi\"\n  /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/veeso/pavao/actions\"\n    \u003e\u003cimg\n      src=\"https://github.com/veeso/pavao/workflows/Linux/badge.svg\"\n      alt=\"Linux CI\"\n  /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/veeso/pavao/actions\"\n    \u003e\u003cimg\n      src=\"https://github.com/veeso/pavao/workflows/MacOS/badge.svg\"\n      alt=\"MacOS CI\"\n  /\u003e\u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/veeso/pavao\"\n    \u003e\u003cimg\n      src=\"https://coveralls.io/repos/github/veeso/pavao/badge.svg\"\n      alt=\"Coveralls\"\n  /\u003e\u003c/a\u003e\n   \u003ca href=\"https://docs.rs/pavao\"\n    \u003e\u003cimg\n      src=\"https://docs.rs/pavao/badge.svg\"\n      alt=\"Docs\"\n  /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n- [Pavão](#pavão)\n  - [About Pavão 🦚](#about-pavão-)\n    - [SMB Rust client for Windows](#smb-rust-client-for-windows)\n  - [Get started 🏁](#get-started-)\n    - [Add pavao to your Cargo.toml 🦀](#add-pavao-to-your-cargotoml-)\n    - [Install pavao C dependencies on your system 🖥️](#install-pavao-c-dependencies-on-your-system-️)\n      - [MacOS 🍎](#macos-)\n      - [Debian based systems 🐧](#debian-based-systems-)\n      - [RedHat based systems 🐧](#redhat-based-systems-)\n      - [OpenBSD 🐡](#openbsd-)\n      - [Termux 🤖](#termux-)\n      - [Build from sources 📁](#build-from-sources-)\n  - [Vendored libsmbclient](#vendored-libsmbclient)\n    - [Create a pavao application](#create-a-pavao-application)\n    - [Run examples](#run-examples)\n  - [Documentation 📚](#documentation-)\n  - [Support the developer ☕](#support-the-developer-)\n  - [Contributing and issues 🤝🏻](#contributing-and-issues-)\n  - [Changelog ⏳](#changelog-)\n  - [License 📃](#license-)\n\n---\n\n## About Pavão 🦚\n\nPavão (/pɐ.ˈvɐ̃w̃/) is a Rust client library for SMB version 2 and 3 which exposes type-safe functions to interact with the C libsmbclient.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/pavao.gif\" alt=\"pavao gif\" width=\"auto\" height=\"150\" /\u003e\n\u003c/p\u003e\n\n### SMB Rust client for Windows\n\nSMB is natively supported on Windows by the fs module. If you're looking on how to use SMB on Windows with Rust, please check out this article \u003chttps://blog.veeso.dev/blog/en/how-to-access-an-smb-share-with-rust-on-windows/\u003e or consider adopting [remotefs-smb](https://github.com/veeso/remotefs-rs-smb).\n\n---\n\n## Get started 🏁\n\n### Add pavao to your Cargo.toml 🦀\n\n```toml\npavao = \"0.2\"\n```\n\n### Install pavao C dependencies on your system 🖥️\n\n#### MacOS 🍎\n\nInstall samba with brew:\n\n```sh\nbrew install samba\n```\n\n#### Debian based systems 🐧\n\nInstall libsmbclient with apt:\n\n```sh\napt install -y libsmbclient-dev libsmbclient\n```\n\n⚠️ `libsmbclient-dev` is required only on the machine where you build the application\n\n#### RedHat based systems 🐧\n\nInstall libsmbclient with dnf:\n\n```sh\ndnf install libsmbclient-devel libsmbclient\n```\n\n⚠️ `libsmbclient-devel` is required only on the machine where you build the application\n\n#### OpenBSD 🐡\n\nInstall samba with pkg_add:\n\n```sh\npkg_add samba\n```\n\n#### Termux 🤖\n\nInstall samba with pkg:\n\n```sh\npkg install samba\n```\n\n#### Build from sources 📁\n\nInstall libsmbclient building from sources:\n\n```sh\nwget -O samba.tar.gz https://github.com/samba-team/samba/archive/refs/tags/samba-4.16.1.tar.gz\nmkdir -p samba/\ntar  xzvf samba.tar.gz -C samba/ --strip-components=1\nrm samba.tar.gz\ncd samba/\n./configure\nmake\nmake install\ncd ..\nrm -rf samba/\n```\n\n---\n\n## Vendored libsmbclient\n\nIt is possible to build libsmbclient **statically** when building **pavao**.\n\nTo do so it is enough to enable the `vendored` feature for the `pavao` crate in your `Cargo.toml`:\n\n```toml\npavao = { version = \"0.2\", features = [\"vendored\"] }\n```\n\n\u003e [!CAUTION]\n\u003e Mind that libsmbclient is a bloated library with tons of dependencies, so the vendored feature will increase the size of the final binary and may not work on all platforms.\n\nIn order to build and run with the `vendored` feature YOU MUST have the following libraries in your **LD_LIBRARY_PATH**:\n\nsee [DEPENDENCIES](./pavao-src/README.md)\n\n---\n\n### Create a pavao application\n\n```rust\nuse pavao::{SmbClient, SmbCredentials, SmbOptions, SmbOpenOptions};\n\n// Initialize a new client\nlet client = SmbClient::new(\n    SmbCredentials::default()\n        .server(server)\n        .share(share)\n        .password(password)\n        .username(username)\n        .workgroup(workgroup),\n    SmbOptions::default().one_share_per_server(true),\n)\n.unwrap();\n// do anything you want here with client\nlet mut file = client.open_with(\"/abc/test.txt\", SmbOpenOptions::default().read(true)).unwrap();\n// read file...\ndrop(file);\n// disconnect from server\ndrop(client);\n\n```\n\n### Run examples\n\nTwo examples are provided along with this repository and can be found under the `examples/` directory.\n\nThe `tree` example can be used to get a fs tree of the smb share and can be run with:\n\n```sh\ncargo run --example tree -- -u \u003cusername\u003e -w \u003cworkspace\u003e -s \u003cshare\u003e -P \u003cpassword\u003e smb://\u003chostname\u003e\n```\n\nwhile the `transfer` example shows how to write a file to the remote host and can be run with:\n\n```sh\ncargo run --example transfer -- -i \u003cfile_on_local\u003e -o \u003cfile_to_write\u003e -u \u003cusername\u003e -w \u003cworkspace\u003e -s \u003cshare\u003e -P \u003cpassword\u003e smb://\u003chostname\u003e\n```\n\n---\n\n## Documentation 📚\n\nThe developer documentation can be found on Rust Docs at \u003chttps://docs.rs/pavao\u003e\n\n---\n\n## Support the developer ☕\n\nIf you like Pavão and you're grateful for the work I've done, please consider a little donation 🥳\n\nYou can make a donation with one of these platforms:\n\n[![ko-fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge\u0026logo=ko-fi\u0026logoColor=white)](https://ko-fi.com/veeso)\n[![PayPal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge\u0026logo=paypal\u0026logoColor=white)](https://www.paypal.me/chrisintin)\n\n---\n\n## Contributing and issues 🤝🏻\n\nContributions, bug reports, new features and questions are welcome! 😉\nIf you have any question or concern, or you want to suggest a new feature, or you want just want to improve pavao, feel free to open an issue or a PR.\n\nPlease follow [our contributing guidelines](CONTRIBUTING.md)\n\n---\n\n## Changelog ⏳\n\nView Pavão's changelog [HERE](CHANGELOG.md)\n\n---\n\n## License 📃\n\nPavão is licensed under the GPLv3 license.\n\nYou can read the entire license [HERE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveeso%2Fpavao","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveeso%2Fpavao","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveeso%2Fpavao/lists"}