Fast image conversion and processing with Rust and Python
We’ll convert png to jpg, but the same concept will apply to doing the reverse of this. You can grab png datasets from Kaggle If you just want to skip to the code, check out these links: What is a JPEG ? Let’s first understand the structure of a *.jpg file The structure of a […]
How to use serde_json to handle data and extract fields
Using serde_json to Handle Fake Data in Rust When working with JSON data in Rust, serde_json provides a convenient way to parse and manipulate JSON values. In this post, we’ll demonstrate how to use serde_json::Value to create some mock data, simulate a search result, and extract specific fields from it. Creating Fake Data and Extracting […]
Rust thiserror
This article delves into a Rust program that showcases custom error handling, parsing, and validation. By leveraging the thiserror crate, we create descriptive error types to manage various parsing scenarios robustly. We’ll explore how the program defines an Animal struct, parses and validates integer strings, and utilizes generics and traits for flexible error reporting. Whether […]
Comparing Rust and Python for Asynchronous and Multithreaded Operations – Qdrant vector database
Introduction In this guide, we will compare Rust and Python for asynchronous and multithreaded operations, particularly focusing on uploading data to a Qdrant vector search engine. We will evaluate how using Arc in Rust and AsyncQdrantClient in Python impacts performance. Imagine you get approached by a company to speed up their code and you improve […]
Using Rust for Preprocessing images
Rust is an ideal choice for image preprocessing due to its combination of performance, safety, and concurrency. Its low-level control allows for highly efficient image manipulation, crucial for handling large datasets or performing complex transformations. Image preprocessing involves transforming raw image data into a format that is usable and meaningful. If you want a fast […]
Websockets with Tokio Tungstenite
“WebSockets revolutionize web communication by establishing persistent, full-duplex connections between a client (typically a browser) and a server. Unlike traditional HTTP, WebSockets enable real-time, bi-directional data exchange, ideal for interactive applications like live chat, gaming, and financial tickers. By maintaining a constant connection, WebSockets eliminate the need for frequent client polling, reducing latency and server […]