{"id":28445079,"url":"https://github.com/wechaty/rust-wechaty-getting-started","last_synced_at":"2026-01-28T08:03:43.659Z","repository":{"id":97378496,"uuid":"341203225","full_name":"wechaty/rust-wechaty-getting-started","owner":"wechaty","description":"Rust Wechaty Starter Project Template that Works Out-of-the-Box","archived":false,"fork":false,"pushed_at":"2021-02-22T13:19:11.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-29T20:39:16.819Z","etag":null,"topics":["rust-wechaty"],"latest_commit_sha":null,"homepage":"https://gitpod.io/#https://github.com/wechaty/rust-wechaty-getting-started","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wechaty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-02-22T13:05:24.000Z","updated_at":"2021-02-22T14:08:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba251192-f9e3-4a84-baaf-c6acb0fbae76","html_url":"https://github.com/wechaty/rust-wechaty-getting-started","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/wechaty/rust-wechaty-getting-started","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Frust-wechaty-getting-started","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Frust-wechaty-getting-started/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Frust-wechaty-getting-started/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Frust-wechaty-getting-started/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wechaty","download_url":"https://codeload.github.com/wechaty/rust-wechaty-getting-started/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Frust-wechaty-getting-started/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28842833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["rust-wechaty"],"created_at":"2025-06-06T10:11:16.017Z","updated_at":"2026-01-28T08:03:43.653Z","avatar_url":"https://github.com/wechaty.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-wechaty-getting-started\n\n[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/wechaty/rust-wechaty-getting-started)\n[![Wechaty in Rust](https://img.shields.io/badge/Wechaty-Rust-7de)](https://github.com/wechaty/rust-wechaty)\n\nRust Wechaty Starter Project Template that Works Out-of-the-Box\n\n## Connecting Chatbots\n\n[![Powered by Wechaty](https://img.shields.io/badge/Powered%20By-Wechaty-brightgreen.svg)](https://github.com/Wechaty/wechaty)\n\nWechaty is a RPA SDK for Wechat **Individual** Account that can help you create a chatbot quickly.\n\n## A Basic Implementation of a Rust ChatBot\n\n```rust\n#![feature(async_closure)]\n\nuse wechaty::prelude::*;\nuse wechaty_puppet_service::PuppetService;\n\n#[actix_rt::main]\nasync fn main() {\n    let mut bot = Wechaty::new(\n        PuppetService::new(PuppetOptions {\n            endpoint: None,\n            timeout: None,\n            token: Some(env!(\"WECHATY_PUPPET_SERVICE_TOKEN\").to_owned()),\n        })\n            .await\n            .unwrap(),\n    );\n    bot.on_scan(async move |payload: ScanPayload, _ctx| {\n            if let Some(qrcode) = payload.qrcode {\n                println!(\"Visit https://wechaty.js.org/qrcode/{} to log in\", qrcode)\n            }\n        })\n        .on_login(async move |payload: LoginPayload\u003cPuppetService\u003e, _ctx| {\n            println!(\"User {} logged in\", payload.contact)\n        })\n        .on_message(async move |payload: MessagePayload\u003cPuppetService\u003e, _ctx| {\n            println!(\"Message: {}\", payload.message)\n        })\n        .start()\n        .await;\n}\n```\n\n\u003e **Note**: the example above requires nightly version of Rust since it makes use of the `async_closure` feature which is unstable now.\n\n## Requirements\n\n1. Cargo\n\nThe easiest way to get Cargo is to install the current stable release of [Rust]\nby using `rustup`. Installing Rust using `rustup` will also install `cargo`.\n\nOn Linux and macOS systems, this is done as follows:\n\n```console\ncurl https://sh.rustup.rs -sSf | sh\n```\n\nIt will download a script, and start the installation. If everything goes well,\nyou’ll see this appear:\n\n```console\nRust is installed now. Great!\n```\n\nOn Windows, download and run [rustup-init.exe]. It will start the installation\nin a console and present the above message on success.\n\nAfter this, you can use the `rustup` command to also install `beta` or `nightly`\nchannels for Rust and Cargo.\n\n\u003e The contents above are quoted from [The Cargo Book](https://doc.rust-lang.org/cargo/getting-started/installation.html).\n\n## Install\n\n```shell\nmake install\n```\n\n## Run\n\nGet a Token for your Bot first. Learn more from our [Wechaty Developers Program](https://github.com/wechaty/wechaty/wiki/Wechaty-Developer-Program)\n\n```sh\nexport WECHATY_PUPPET_SERVICE_TOKEN=your_token_at_here\n\nmake bot\n```\n\n## Wechaty Getting Started in Multiple Languages\n\n- [TypeScript Wechaty Getting Started](https://github.com/wechaty/wechaty-getting-started)\n- [Python Wechaty Getting Started](https://github.com/wechaty/python-wechaty-getting-started)\n- [Java Wechaty Getting Started](https://github.com/wechaty/java-wechaty-getting-started)\n- [Go Wechaty Getting Started](https://github.com/wechaty/go-wechaty-getting-started)\n- [Rust Wechaty Getting Started](https://github.com/wechaty/rust-wechaty-getting-started)\n\n## Badge\n\n[![Wechaty in Rust](https://img.shields.io/badge/Wechaty-Rust-7de)](https://github.com/wechaty/rust-wechaty)\n\n```md\n[![Wechaty in Rust](https://img.shields.io/badge/Wechaty-Rust-7de)](https://github.com/wechaty/rust-wechaty)\n```\n\n## Maintainers\n\n[@wechaty/rust](https://github.com/orgs/wechaty/teams/rust/members)\n\n## Copyright \u0026 License\n\n- Code \u0026 Docs © 2021 - now Wechaty Contributors \u003chttps://github.com/wechaty\u003e\n- Code released under the Apache-2.0 License\n- Docs released under Creative Commons","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwechaty%2Frust-wechaty-getting-started","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwechaty%2Frust-wechaty-getting-started","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwechaty%2Frust-wechaty-getting-started/lists"}