Best of RustJanuary 2025

  1. 1
    Article
    Avatar of communityCommunity Picks·1y

    An "oh fuck" moment in time

    Over the Christmas break, a staff software engineer explores the use of software assistants to convert a Rust library into a Haskell library, resulting in a breakthrough moment. While these assistants sometimes err, they hold immense potential, creating new solutions rather than simply regurgitating existing knowledge. The experience highlights the evolving role of software assistants and how engineers must adapt to remain relevant in the industry.

  2. 2
    Article
    Avatar of mitsuhikoArmin Ronacher·1y

    Build It Yourself

    The post discusses the issue of dependency churn in software development, particularly in the Rust ecosystem. It highlights how dependencies can lead to constant updates and security issues, suggesting that developers should consider writing their own code for small functions to reduce maintenance overhead. The author advocates for a cultural shift towards valuing fewer dependencies and more stable, self-written code.

  3. 3
    Article
    Avatar of the_react_communityThe React Community·1y

    Neotasks OSS - An in-development task manager

    The author is developing a task management application called Neotask, inspired by Trello but with additional features. It's being built using React, with the backend yet to be decided, possibly in C++ or Rust. The design uses the Catppuccin color palette.

  4. 4
    Article
    Avatar of lobstersLobsters·1y

    Building a tiny Linux from scratch

    The author describes their journey of building a tiny Linux system from scratch to gain a deeper understanding of the Linux kernel and the boot process. They detail the steps taken to compile the Linux kernel and Busybox, write an init process in Rust, create an initramfs, and configure the system for UEFI booting. The post includes troubleshooting tips for common issues and additional ideas for expanding the project.

  5. 5
    Article
    Avatar of rustRust·1y

    Announcing Rust 1.84.0

    Rust 1.84.0 has been released, introducing several new features and improvements. Cargo now considers the minimum supported Rust version (MSRV) for dependency version selection, reducing maintainer toil. The Rust compiler has begun migrating to a new trait solver, enhancing type system capabilities and correctness. Additionally, new strict provenance APIs have been included to minimize undefined behavior related to pointers. Various new APIs have been stabilized, including several in const contexts.

  6. 6
    Article
    Avatar of hnHacker News·1y

    Understanding Memory Management, Part 1: C

    The post provides an in-depth exploration of memory management in C, highlighting the challenges and intricacies involved. It explains how programs use memory, the conceptual differences between the stack and heap, and how memory allocation and deallocation work using functions like malloc and free. The post also covers common pitfalls such as memory leaks and use-after-free bugs, offering practical coding examples and strategies to manage memory effectively.

  7. 7
    Article
    Avatar of nuxtandvueVuejs&Nuxtjs·1y

    fylepad - a notepad with powerful rich-text editing, built with Vue (Nuxt) & Tauri.

    fylepad is a lightweight, open-source note-taking app built with Vue (Nuxt) and Tauri. It offers powerful, Markdown-based rich-text editing, auto-save state, and multi-tab support. The app enables users to export and import notes easily and operates smoothly with its Rust core, ensuring speed and security. With a compact size of just 5MB, fylepad provides an efficient solution for managing notes, featuring customizable themes and a user-friendly interface.

  8. 8
    Article
    Avatar of hnHacker News·1y

    Static search trees: 40x faster than binary search

    The post introduces and optimizes a static search tree (S+ tree) to enhance the high-throughput searching of sorted data. The implementation involves various strategies such as batching, prefetching, and optimized tree layouts. The optimization techniques include auto-vectorization, manual SIMD, and using hugepages for better memory management. The post provides significant speedup (over 40x) compared to traditional binary search by reducing the number of memory access and improving CPU efficiency.

  9. 9
    Video
    Avatar of primeagenThePrimeTime·1y

    Picking A Language In 2025

    Choosing a programming language post-2025 is challenging due to the rapidly evolving landscape. The author, who has previously worked with Rust and Go, is exploring alternatives like Zig, Odin, and JAI. There's a strong emphasis on languages that support metaprogramming. The discussion also highlights the frustrations with some languages' complexity and the uncertainty of adopting new ones during a period of fast-paced developments.

  10. 10
    Article
    Avatar of htmxhtmx·1y

    > htmx ~ A Real World wasm to htmx Port

    The author shares their experience of rewriting Sidekick, a customer service software, from a complex Rust and WASM-based architecture to a simpler HTMX-based system. This change significantly improved load times and made it easier to add new features, which is crucial for their startup. The rewrite process took about three weeks and led to a more maintainable and efficient codebase.

  11. 11
    Video
    Avatar of mentaloutlawMental Outlaw·1y

    Arti - The Future Of The Dark Web

    Ry is a project that aims to rewrite Tor's anonymity protocols in Rust, potentially replacing the current C implementation due to its memory safety and multi-threading capabilities. This rewrite is expected to solve existing performance and security issues, making the Tor network faster and safer. The post includes a demonstration of using Ry as a Tor proxy and discusses the benefits and concerns of transitioning to Rust.

  12. 12
    Article
    Avatar of hnHacker News·1y

    bodo-run/yek: A fast tool to read text-based files in a repository or directory, chunk them, and serialize them for LLM consumption.

    Yek is a Rust-based tool designed to read and serialize text-based files from repositories or directories for LLM consumption. It skips files based on .gitignore rules, infers file importance from Git history, and allows content chunking by token count or byte size. Yek supports multi-directory processing, custom ignore patterns, and file priority rules via a `yek.toml` configuration file. It offers superior speed, being 230x faster than repomix in benchmarking tests.

  13. 13
    Video
    Avatar of primeagenThePrimeTime·1y

    I Will Not Write Rust Again

    The author expresses a personal decision to stop using Rust for future projects despite appreciating some of its features like enums and serialization. They highlight a preference for Go and exhibit an interest in exploring the Zig language, pointing out its advantages in metaprogramming and performance. The author reflects on their previous positive experiences with C and seeks a similar enjoyment in newer languages, finding Rust less appealing compared to other options.

  14. 14
    Article
    Avatar of hnHacker News·1y

    An embedded scripting language for Rust.

    Rhai is an embedded scripting language for Rust that provides an easy and safe way to add scripting to applications. It supports all CPU and OS targets of Rust, including WebAssembly and `no-std`. Rhai features a JavaScript-like syntax with dynamic typing, minimal dependencies, and tight integration with Rust functions and types. It offers robust security features, customizable APIs, and capabilities for object-oriented programming. The scripting engine is sandboxed and protected against various attacks, ensuring stability and security.

  15. 15
    Article
    Avatar of lobstersLobsters·1y

    Prototyping in Rust

    Prototyping is a crucial part of the programming process, and Rust, despite its reputation for being strict and complex, is excellent for this purpose. Developers can quickly bring ideas to life by using simple types, type inference, and tools like the Rust playground and bacon for faster feedback. Techniques such as using unwrap liberally and leveraging IDE support can make Rust prototyping both efficient and productive. Rust's strong type system helps catch design flaws early, and with small adjustments, prototypes can evolve seamlessly into robust production code.

  16. 16
    Video
    Avatar of primeagenThePrimeTime·1y

    40x Faster Binary Search

    The post discusses implementing an S+ tree to improve binary search speed. It explores optimizing code to enhance performance, leveraging techniques such as SIMD (Single Instruction, Multiple Data) instructions and batching queries. The focus is on achieving high throughput and optimizing memory usage, highlighting how various strategies can significantly speed up search operations.

  17. 17
    Article
    Avatar of cncfCNCF·1y

    RustCoder: AI-assisted Rust learning

    RustCoder is an AI-powered assistant designed to ease the steep learning curve associated with Rust programming. Built on the Qwen-2.5 Coder model and integrated with the Gaia platform, RustCoder aids both beginners and experienced developers by providing solutions and debugging assistance within their IDEs. It played a crucial role in helping over 1,000 students and young professionals during a coding camp organized by OpenAtom Foundation and Tsinghua University. Additionally, RustCoder will be featured in a forthcoming AI-assisted Rust Data Structures and Algorithms Training Camp in January 2025.

  18. 18
    Article
    Avatar of lobstersLobsters·1y

    ollien/quicknotes: A notes application that makes taking notes... quick

    Quicknotes is a simple, fast note-taking application that stores notes locally in plain text. It can be installed via Cargo and allows users to create, edit, and maintain notes easily using their preferred text editor. Quicknotes also supports daily notes for journaling and offers customizable configuration. The app is designed to be straightforward and efficient, aligning with the creator’s personal workflow needs.

  19. 19
    Article
    Avatar of rustRust·1y

    Announcing Rust 1.84.1

    Rust 1.84.1 has been released, addressing several regressions from version 1.84.0, including fixes for duplicate-crate diagnostics, overlapping impls in incremental rebuilds, and slow compilation issues. Additionally, it provides several fixes for those building Rust from source. Existing users can update via rustup.

  20. 20
    Article
    Avatar of lobstersLobsters·1y

    How I think about Zig and Rust

    Zig and Rust are both systems programming languages but have different core philosophies. Zig emphasizes simplicity and minimalism, lacking features like closures and operator overloading, which makes it suitable for low-level programming. Rust, on the other hand, comes from a high-level background, offering more expressiveness and safety features like traits and pattern matching. While Zig is ideal for direct memory and system-level operations with seamless C interoperability, Rust provides a more user-friendly experience with extensive tooling and a strong type system.

  21. 21
    Article
    Avatar of newstackThe New Stack·1y

    Introduction to Rust Programming Language

    Rust is a programming language known for its safety, speed, and concurrency. It uses a compile-time ownership system to ensure memory safety without a garbage collector. Critical features include zero-cost abstractions, fearless concurrency, and helpful error messages. Major tech companies like Microsoft and Meta use Rust to enhance performance and security. Rust's ecosystem includes tools like Cargo for package management and a rich community. It's widely used in web development, system programming, cryptography, and game development.

  22. 22
    Article
    Avatar of lobstersLobsters·1y

    mit-pdos/noria: Fast web applications through dynamic, partially-stateful dataflow

    Noria is a streaming data-flow system designed to be a fast, read-heavy storage backend for web applications. It precomputes and caches relational query results to enhance read performance and automatically updates cached results as the underlying data changes. Noria supports dynamic data-flow and query changes, and provides easy integration with MySQL-based applications. It requires nightly Rust for building, and uses Apache ZooKeeper for server location management. Native Rust bindings and a MySQL adapter are available for interaction.

  23. 23
    Article
    Avatar of ntietznicole@web·1y

    Great things about Rust that aren't just performance

    The post highlights several reasons why the author enjoys programming in Rust beyond its performance advantages. Rust's expressive type safety, resistance to crashes, data race prevention, and control over system resources are emphasized. The ability to mix functional and imperative styles and the helpful compiler errors also stand out. Ultimately, the author finds Rust fun and a joy to work with, crediting its design for making coding an enjoyable experience.

  24. 24
    Article
    Avatar of lobstersLobsters·1y

    Improve Rust Compile Time by 108X

    Nathaniel Simard shares his experience in reducing the compilation time for a Rust project from 108 seconds to just 1 second. Effective optimizations included using element-type generics, swapping const generics for a comptime system, and adjusting the LLVM optimization level. This approach was particularly useful for CubeCL, a GPU programming dialect, by leveraging JIT compilation to dynamically handle instruction sizes and reduce binary size.

  25. 25
    Article
    Avatar of lobstersLobsters·1y

    Game dev in Rust, a year later

    A year after the initial insights on game development in Rust, several major projects have abandoned Rust due to restrictive ownership and compile times. The Rend3 graphics stack was also abandoned and is now maintained as rend3-hp. Performance issues persist with the current graphics stack, which struggles to utilize more than 25% GPU load with an NVidia 3070. Maintaining 3D rendering in Rust requires significant effort, coping with rapid crate updates and a lack of spatial computation in rendering. Bevy offers an alternative but sacrifices Rust ownership for a dynamic ECS system.