Rust

← Back to All Categories

Rust

Rust Data Engineering: Processing Dataframes with Polars

If you're interested in data engineering with Rust, you might want to check out Polars, a Rust DataFrame library with Pandas-like API.

Rust Data Engineering: Processing Dataframes with Polars

Rust

Cargo: workspace inheritance

Since 1.64.0, Cargo now supports workspace inheritance, so you can avoid duplicating similar field values between crates while working within a workspace. Workspace inheritance can include things like shared version numbers, repository URLs, or rust-version.

Cargo: workspace inheritance

Rust

Rust: Why ? is good

In Rust, the question mark (?) operator is used as an alternate error propagation method for functions that yield Result or Option types. The ? operator is a shortcut that minimizes the amount of code required in a function to quickly return Err or None from the types Result<T, Err>, or Option.

Rust

Cargo: Patch Dependencies

There are several scenarios when you will need to override or patch upstream dependencies. Like testing a bugfix of your crates before pushing to crates.io, a non-working upstream crate has a new feature or a bug fix on the master branch of its git repository that you'd want to try, etc. In these cases, the [patch] section of Cargo.toml might be useful.

Rust

Rust: Rayon - A data parallelism library for Rust

rayon là thư viện data-parallelism cho Rust, gọn nhẹ và dễ dàng convert từ code tính toán tuần tự sang song song mà vẫn đảm bảo không lỗi data-race.

Rust

Rust: indoc

indoc là một crate nhỏ nhưng hữu ích giúp canh lề (indented documents). indoc!() macro nhận multiline string và un-indents lúc compile time, xoá tất cả khoảng trắng đầu tiên trên cách dòng dựa theo dòng đầu tiên.

Rust

Rust automatically upgrade to a new edition

Every two or three years, the Rust team produces a new Rust edition. Each edition contains a lot of changes. Each edition brings together the features that have landed into a clear package with fully updated documentation and tooling.

Rust

Rust Source-based Code Coverage

Support for LLVM-based coverage instrumentation has been stabilized in Rust 1.60.0. To get the code coverage report in Rust, you need to generate profiling data and then use LLVM tools to process and generate reports.

Rust Source-based Code Coverage