thedataquarry/rustinpieces
thedataquarry/rustinpieces has 50 GitHub stars and 3 forks. Star changes are not measured yet. Last checked 2026-11-12 08:07 UTC. Last push 2026-11-09.
Journeys between the two worlds of Python 🐍 and Rust 🦀
实测星标增长
- 24小时
- 正在收集历史
- 7天
- 正在收集历史
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Rust in Pieces
Journeys between two worlds: Python 🐍 and Rust 🦀.
This repo contains the code for the book Rust in Pieces. The goal is to help developers move between the worlds of Python and Rust by building small projects that they wouldn't normally have any trouble doing in the language of their choice. Each solution starts off with a Python implementation for a specific problem and is accompanied by a Rust implementation that performs the same task.
Rust is a language that's known for its steep learning curve -- yet, it's almost universally loved by those who become proficient with it. The book series that builds on this repo aims to make the initial steps for Python developers less daunting by providing a familiar environment for Python developers who are used to solving real world problems in their day-to-day work.
In the reverse direction, Python is a language that's falsely known for its performance limitations. Python's rich package ecosystem allows one to write high-performance code by only writing parts of a project in Rust for performance reasons. These days, a large portion of the AI/ML landscape is in Python, and it's become one of the most popular programming languages on GitHub. Thus, the other goal of this repo is to help Rust developers become familiar with Python's ecosystem and how to use it to their advantage.
The larger focus of the book and this project is to help developers become proficient enough with software/data engineering use cases in either language to make an informed choice about whether to use one or the other language for parts of a larger project. This will come from a deeper understanding of Rust's performance benefits, and how to unite Python and Rust code bases via PyO3.
Pieces
Each piece is a small project that's implemented in both Python and Rust. The goal is to make it as easy as possible for Python developers to understand the Rust implementation, and vice versa.
The code for the pieces is in the src directory. Each piece is accompanied by a README that explains the problem statement, and how to run the code in both languages.
One of the challenges with learning (and teaching) Rust, is that concepts such as ownership, borrowing, traits and lifetimes that can be quite challenging to grasp for a new learner, are ubiquitous in the language, so it's not straightforward to introduce them gradually. The learning approach applied here is top-down, and so the best way to get familiar with these concepts is to try and apply them to your own problems, as we do in each piece.
Although the implementation concepts are introduced as gradually as possible, it's still possible that you may find yourself referring to the Rust book or other resources to understand certain concepts from the bottom-up as you go along.
The following pieces are covered:
| Piece | Category | Key Rust concepts |
|---|---|---|
| Hello world | Intro | macros |
| Data structures & constructs | Intro | crates, structs, traits, implementations |
| Simple CSV parsing | Files | serde, vec |
| Regex JSON | Files | match, regex |
| Mock data generation | Files | RNG, sampling |
| Age grouping | Files | enums |
| Datetime parsing | Files | chrono, lifetimes |
| Extract pronouns from text | Files | rayon, parallelism |
| Postgres | Databases | async, sqlx, tokio |
| Meilisearch | CLIs | async, async-std, clap |
| REST API to Postgres | APIs | axum, async, tokio |
| PyO3 mock data generation | Unification | PyO3, Maturin |
| PyO3 parallel computation | Unification | PyO3, Maturin |
Contributing
Contributions and improvements from the community are welcome! Please see the contributing guidelines.
探索相关项目
Asabeneh/30-Days-Of-Python
30 Days of Python 编程挑战是一份循序渐进的指南,用于在 30 天内学习 Python 编程语言。这项挑战可能需要超过 100 天。请按自己的节奏进行。这些视频或许也有帮助:https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,560 星标grafana/grafana
开放且可组合的可观测性与数据可视化平台。可对来自 Prometheus、Loki、Elasticsearch、InfluxDB、Postgres 等众多数据源的指标、日志和追踪进行可视化。
77,830 星标redis/redis
对于正在构建实时数据驱动应用的开发者而言,Redis 是首选、速度最快且功能最丰富的缓存、数据结构服务器和文档与向量查询引擎。
77,395 星标apache/superset
Apache Superset 是一个数据可视化与数据探索平台
75,473 星标