Best of RustOctober 2024

  1. 1
    Article
    Avatar of rustRust·1y

    Announcing Rust 1.82.0

    Rust 1.82.0 introduces several updates including the cargo info command, promotion of macOS on 64-bit ARM to Tier 1, and new use<..> syntax for precise capturing in implementations. The update also provides native syntax for creating raw pointers, stable operations on floating-point constants, and various stabilized APIs. There are changes to pattern matching, unsafe attributes, and extern blocks. The update emphasizes better handling of NaN values and constants as assembly immediates.

  2. 2
    Article
    Avatar of communityCommunity Picks·1y

    Redox OS: A Rust-Based Open Source Alternative to Linux And BSD

    Redox OS is a highly scalable, open-source operating system built using the Rust programming language. It features a modular microkernel architecture and aims to provide a secure and stable experience. Redox OS is source-compatible with POSIX, thereby running many Linux/BSD applications without needing a port. Preliminary testing has shown good performance on bare metal, although it currently lacks support for USB peripherals and storage, which is expected in future releases. The system includes many pre-installed applications and uses the Orbital desktop environment.

  3. 3
    Article
    Avatar of p99confP99 Conf·2y

    14 Books by P99 CONF Speakers: Latency, Wasm, Databases & More

    P99 CONF features over 60 speakers sharing insights on performance topics like distributed databases, Rust, C++, Go, Wasm, and more. The post highlights 14 books authored by the speakers, providing a rich resource for attendees. Registrants get a 30-day access to O’Reilly’s library and discounts from Manning publications. The highlighted books cover diverse topics such as data-intensive applications, technical writing, latency reduction, distributed systems, and eBPF.

  4. 4
    Article
    Avatar of communityCommunity Picks·1y

    warpy-ai/rustubble: Beautifull components for your terminal.

    The project 'warpy-ai/rustubble' offers a variety of customizable components designed for terminal-based applications in Rust. These components include TextInput, TextArea, Spinner, Table, Progress bar, Timer, Stopwatch, Viewport, List, and MenuList. Each component is built to enhance user interaction with features like Unicode support, dynamic input handling, various spinner styles, and customizable attributes. Contributions to the project are encouraged and it is licensed under the Apache License.

  5. 5
    Video
    Avatar of primeagenThePrimeTime·1y

    Sqlite Is Getting So Good

    The post dives into a new multi-tenant architecture and issues a scalability challenge for a serverless database based on a fork of SQLite. It emphasizes the advantages of deterministic simulation testing (DST) and highlights the importance of not reinventing the wheel unless mission-critical. It also discusses the application of Rust and its borrow checker for improved safety and performance, the implementation of DST for bug detection, and the decision-making process behind choosing Rust over Zig for the rewrite project.

  6. 6
    Article
    Avatar of hnHacker News·2y

    SlateDB - An embedded storage engine built on object storage

    SlateDB is an embedded storage engine that utilizes object storage for unlimited storage capacity and high durability. It eliminates the need for disks, offering zero-disk architecture to prevent disk failures and corruption. The database supports simple replication via object store, allows for tunable performance, and enables scalable readers with a single writer. Built in Rust, SlateDB can be integrated with various programming languages.

  7. 7
    Article
    Avatar of communityCommunity Picks·1y

    Rust Programming for Beginners: Building a Recipe Manager App

    Learn how to build a simple recipe manager application using the Rust programming language. The guide walks through setting up Rust, structuring program requirements, organizing project folders and files, coding the recipe script, creating the application manager, implementing a GUI, and finally running the code. Useful tips on setting up Rust with Visual Studio Code and managing project dependencies are also provided.

  8. 8
    Article
    Avatar of zedZed·1y

    Life of a Zed Extension: Rust, WIT, Wasm

    Extensions in Zed, added earlier this year, enable additional languages, themes, snippets, and commands. These extensions are written in Rust, compiled into WebAssembly (Wasm) modules using the WebAssembly Component Model, and leverage Tree-sitter for parsing within Wasm. Extensions are managed via a repository and compiled using a CLI tool. Upon installation, extensions are downloaded as pre-compiled Wasm archives and integrated into Zed through a Wasm runtime. The effort showcases a harmonious integration of Rust and Wasm technologies, creating a powerful extension ecosystem.

  9. 9
    Article
    Avatar of logrocketLogRocket·1y

    Using Polars in Rust for high-performance data analysis

    Learn how to use Rust and Polars to create a high-performance data analysis application with a REST-based Web API. This guide covers setting up a Rust project, importing and manipulating data from CSV files, creating a web server using Axum and Tokio, and implementing API endpoints for retrieving and analyzing data. Polars is highlighted for its performance and versatility in handling large data sets.

  10. 10
    Article
    Avatar of quastorQuastor Daily·1y

    How Cloudflare Optimized their Reverse Proxy with Tries

    Cloudflare optimized their reverse proxy performance by using a data structure called a trie. This change cut latency by 75% for a path handling 35 million requests per second. Their process included extensive benchmarking with the Rust criterion crate, inverting their header removal function, and creating a custom optimized trie implementation. This effort's result was a reduction in average header removal time from 3.65 to 0.93 microseconds.

  11. 11
    Article
    Avatar of lobstersLobsters·1y

    freetonik/textpod: Extremely simple note-taking app inspired by "One Big Text File"

    Textpod is a local, web-based note-taking app inspired by the 'One Big Text File' idea. It features a single page for all notes with a simple entry form using Markdown, and supports search/filtering with the `/` key. Notes are stored in a `notes.md` file, and it allows for file and image attachments as well as saving local single-page copies of links. Installation is straightforward using Cargo, and it aims to remain simple and accessible to beginners.

  12. 12
    Article
    Avatar of communityCommunity Picks·1y

    Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun

    After experiencing challenges with Rust, the author rewrote their keyboard firmware in the Zig programming language. Despite having no prior experience with Zig, they found it easier to use and more enjoyable compared to Rust. The author highlights the simpler conditional compilation and type handling mechanisms in Zig, which made their development process smoother. Zig's smaller and more consistent language design allowed the author to be more productive with less mental overhead. This shift provided a new perspective on Rust's complexity and raised appreciation for Zig's simplicity and efficiency.

  13. 13
    Article
    Avatar of lobstersLobsters·2y

    Replacing nginx with axum

    The post discusses the process of replacing an Nginx server with Axum, a Rust library for writing web services. The author shares code examples and explanations on how to handle tasks such as creating basic web services, serving static files, managing multiple subdomains, and setting up reverse proxying. Additionally, the post covers securing services with basic authentication and setting up TLS using rustls_acme. The author acknowledges that while this setup might be more complex than Nginx, it offers the advantage of leveraging Rust's full capabilities.

  14. 14
    Article
    Avatar of lobstersLobsters·2y

    Rust is rolling off the Volvo assembly line

    Julius Gustavsson, the main software architect at Volvo, successfully implemented Rust in Volvo's low-power processor ECU for handling power management in electric cars. Initially using C and C++, Julius transitioned to Rust due to its safety features and robustness. Despite some tooling challenges, Rust proved highly effective for the project, leading to fewer bugs and higher quality software. Volvo is now exploring more opportunities to use Rust in other projects.

  15. 15
    Article
    Avatar of lobstersLobsters·1y

    Rust Prism

    An exploration of a complex Rust code snippet that demonstrates async functions, the use of the defer pattern, and error handling with anyhow::Result. The author shares their revelation about the intricacies of real-world Rust code, highlighting how different it can be from educational examples.

  16. 16
    Article
    Avatar of hnHacker News·1y

    gosub-io/gosub-engine: A web browser in the making. More info at https://gosub.io

    The Gosub browser engine project aims to create a standalone library for parsing and rendering HTML5 and CSS3 documents. Although still in its early stages, the project supports parsing HTML5 and CSS3 into document trees and offers initial rendering capabilities. The project uses Rust and can be built into WebAssembly. Contributors are welcome to join the development effort, primarily focused on research and proof-of-concepts at this stage.

  17. 17
    Article
    Avatar of hnHacker News·1y

    rochacbruno/marmite: Markdown makes sites

    Marmite is a straightforward static site generator that converts markdown files into HTML content with minimal setup. It reads markdown files from an input directory, parses them to HTML, and saves the output in a specified folder. Features include handling static media and offering a customizable template system. Installation is available via Cargo or by downloading a pre-built binary.

  18. 18
    Article
    Avatar of steveklabnikSteve Klabnik·1y

    When should I use String vs &str?

    This post provides guidelines for choosing between `String` and `&str` in Rust. It introduces four levels of recommendations: using `String` by default, preferring `&str` for function parameters, sometimes returning `&str`, and considering `&str` in structs only when necessary. These rules help simplify code and manage string ownership and lifetime effectively.

  19. 19
    Article
    Avatar of infoworldInfoWorld·2y

    Rust resumes rise in popularity

    Rust has returned to 13th place in the October Tiobe index of programming language popularity due to its security and speed, despite being difficult to learn. It remains 10th in the Pypl index, which ranks languages based on tutorial searches on Google. Tiobe's index measures popularity by assessing the number of skilled engineers and courses offered for each language. The new Mojo language, a combination of Python and Swift, entered Tiobe's top 50 for the first time, indicating its promising future.

  20. 20
    Article
    Avatar of hnHacker News·2y

    Embedded Rust in Production ..?

    STABL Energy has successfully used Rust on the embedded ESP32 platform in production for over a year. Initially frustrated with a C implementation for their energy storage system, they switched to Rust, which resulted in greater reliability and fewer bugs despite taking longer to write. They experienced a smooth transition and continued improvements in Rust support from Espressif. Although finding developers proficient in Rust remains a challenge, the language has proven effective for their embedded projects.

  21. 21
    Video
    Avatar of communityCommunity Picks·2y

    A Legendary Web Framework is Reborn... In Rust

    Loco RS is a web framework inspired by Ruby on Rails, written in Rust. It promises improvements in performance and safety while maintaining a great developer experience. The framework aims to combine the best of Rails and Rust, offering features such as built-in user authentication and integrated database handling. Loco RS uses existing Rust crates to avoid reinventing the wheel, and it's created by Doan Naham, who has experience in both development and business. Benchmarks suggest it handles significantly more requests per second than Rails, potentially reducing cloud infrastructure costs for developers and smaller companies.

  22. 22
    Video
    Avatar of letsgetrustyLet's Get Rusty·2y

    Ultimate VS Code setup for Rust development (2025)

    Setting up VS Code for Rust development involves installing the Rust toolchain using rustup.rs, downloading VS Code, and adding essential extensions like Rust Analyzer for code completion and Code LLDB for debugging. Optional extensions like Dependabot, Error Lens, To-Do Tree, and GitHub Copilot can further enhance your development experience.

  23. 23
    Article
    Avatar of logrocketLogRocket·1y

    Building Node.js modules in Rust with NAPI-RS

    NAPI-RS is a framework used for building Node.js modules with Rust, making it useful for tasks such as image resizing and cryptographic operations. This guide demonstrates creating an image resizer in Rust using NAPI-RS, installing required tools, writing the necessary Rust code, and comparing its performance with the 'sharp' npm package. By using parallel processing with the Rayon crate, the performance of the image resizer in Rust is improved significantly, highlighting the efficiency gains possible with Rust in Node.js applications.

  24. 24
    Video
    Avatar of letsgetrustyLet's Get Rusty·1y

    Rust is secretly taking over chip development

    Nvidia, AMD, Google, and Microsoft are collaboratively working on Project Calyptra, which aims to secure computer chips using Rust-based implementations of the root of trust component. Root of trust ensures that low-level boot code is authentic and secure, critical for preventing hardware-level malware attacks. Current implementations suffer from fragmentation, lack of transparency, and scalability issues. Rust's usage in this project promises enhanced security and maintainability. Calyptra is expected to be integrated into Google and Microsoft silicon by 2024, with AMD following by 2026. The trend of using Rust is also growing in the automotive industry, with notable adoption by Volvo and others for embedded systems.

  25. 25
    Article
    Avatar of tdsTowards Data Science·2y

    Master Embedded Development with Rust and no_std

    Running Rust on embedded systems using no_std can optimize for environments with constrained resources like microcontrollers. Practical steps include ensuring compatibility with WASM and WASI, identifying and adjusting dependencies, marking main code with no_std and alloc, and using Cargo features to toggle std usage. Testing embedded systems often requires tools like QEMU. Despite challenges, Rust’s “if it compiles, it works” philosophy is highly applicable for embedded development.