Tag:rust
All the articles with the tag "rust".
Enhancing Rust Streams with `Ext` Traits and Futures
Posted on:December 12, 2024In this article, I delve into how to extend Rust's stream functionality using `Ext` traits, providing a step-by-step guide to implementing and using `next`, `map`, and `take` methods with practical examples.
What Does Idiomatic Rust Really Mean
Posted on:November 25, 2024This article shares my journey and insights into writing idiomatic Rust, focusing on leveraging the languageās unique features like the borrow checker, expressions, `Option` and `Result` types, iterators, and Clippy to write clearer and more efficient code.
Llamas and Dinosaurs
Posted on:May 4, 2024In this post I share insights from my 10-day visit to Germany, where I advanced AI-powered projects and explored scalable technologies, while also enjoying cultural and team-building experiences.
One Year With Rust
Posted on:May 24, 2024This article details my one-year journey learning Rust, from a beginner to building an LLM Inference Engine, working with Bindgen and FFI, and implementing TypeScript libraries in Rust.
Early Return in Rust Nightly
Posted on:July 20, 2024In this article, I explore the Rust programming language's question mark (`?`) operator, explaining how it works for error handling and early returns, and demonstrate its usage with a BlackJack dealer game.
Rust For Computer Scientists
Posted on:July 2, 2024As a computer science enthusiast, I delve into the intricacies of Rust, exploring the underlying mechanisms of its memory management through hands-on tutorials and sharing my own solutions and bug fixes on GitHub.
Rust - Put It in a Box and Win It
Posted on:August 10, 2024An eight-line changeset in Deno led me to question how wrapping a large structure in a `Box` improves performance, and if this approach works in general.
Rust FFI Builds With Rayon
Posted on:June 26, 2024In this post I describe how I reduced our Llama.rs build times from 1.5h to 16min using Rayon
Rusty Large Language Models
Posted on:September 26, 2024In this article, I explore the integration of Large Language Models (LLMs) with Rust, demonstrating how to create efficient software tools using Rust's powerful features like safety and concurrency alongside libraries such as Askama and Serde for structured outputs and robust templating.
Rust Custom Allocators
Posted on:November 20, 2024In this article, I delve into Rust's custom allocators, exploring how to build and use a simple bump allocator for performance optimization in specific scenarios.
BlueSky API With Rust
Posted on:November 22, 2024Today I wrote an example of how to create a post using the Atrium bksy-sdk in Rust and contributed it as a pull request on GitHub.
How to conditionally include code in Rust debug builds
Posted on:December 12, 2024Today I learned that in Rust, you can use the `#[cfg(debug_assertions)]` attribute to conditionally include a field in a struct only during debug builds, allowing for development-specific features without affecting release builds.
Rust Infers Closure Types on First Call
Posted on:October 15, 2024Today I learned that in Rust, if you define a closure without specifying concrete types, Rust will infer the types upon the first use, and any subsequent use with different types will result in a compilation error.
Binary Search in Rust Vectors
Posted on:November 22, 2024Today I learned that Rust provides a binary search API on Vectors.
Rust Lifetime Elision
Posted on:October 1, 2024Today I learned that Rust's lifetime elision rules can cause compilation issues when it incorrectly ties the output lifetime to an input, and this can be resolved by explicitly specifying unrelated lifetimes in the function signature.
Using Cargo metadata query information about the project
Posted on:October 24, 2024Today I learned how to extract a package's version from a Rust project using cargo metadata.
Rust's Orphan Rule
Posted on:October 16, 2024Today I learned about the orphan rule in Rust, which restricts implementing a trait for a type unless either the trait or the type is defined in your crate, ensuring consistency and preventing conflicting implementations across different crates.