Rust Daily: Embedded, cargo-safe, and Gitoxide Updates

Embedded Rust News: Issue 59

  • Zenoh no-std support standard version
  • Rust exception causing Cloudflare crash
  • Google launches Wasefire for embedded firmware
  • Arduino terminology update sparks controversy
  • Zephyr version 4.3 released
  • Fluid Kernels
  • Simulator86 is an experimental Rust embedded simulator
  • Rust 1.91 Released

Read: https://www.theembeddedrustacean.com/p/the-embedded-rustacean-issue-59

Tutorial “The Impatient Programmer’s Guide to Bevy and Rust” Chapter 3 – Letting Data Flow

Rust Daily: Embedded, cargo-safe, and Gitoxide Updates

Continuing the Rust + Bevy tutorial series. This chapter demonstrates data-driven design in Rust by refactoring hard-coded character logic into a flexible, data-driven system. We will cover the following:

  • Deserializing character configuration from external RON files using Serde
  • Building a generic system based on trait-bounded components
  • Utilizing Rust’s type system (HashMap, enums, closures) for runtime character switching

This tutorial shows how to separate data from behavior, eliminating code duplication while maintaining type safety — a core principle of Rust that scales as projects grow.

Read: https://aibodh.com/posts/bevy-rust-game-development-chapter-3/

cargo-safe: Easily Run Untrusted Code in macOS Sandbox

When reviewing PRs on GitHub (or just running someone else’s project), I always have a bit of concern. I usually need to quickly skim through to ensure there are no anomalies in, for example, build.rs.

On macOS, we have the seatbelt/sandbox-exec tool, which allows us to explicitly specify what actions a process can perform. For instance, the cargo subcommand cargo safe executes cargo and all its related operations in a sandboxed environment.

Usage is straightforward:

cargo install cargo-safe
cargo safe run

Currently, it only supports macOS. Future plans include support for Linux.

super-table: Terminal Table Library Supporting Row and Column Spanning

This is a fork of comfy-table, but since the original project has been deemed complete by its maintainer, it had to be branched to add cell spanning features.

Usage example:

use super_table::{Cell, Table};

let mut table = Table::new();
table
    .set_header(vec!["Header1", "Header2", "Header3", "Header4"])
    .add_row(vec![
        Cell::new("Spans 2x2").set_colspan(2).set_rowspan(2),
        Cell::new("Cell 3"),
        Cell::new("Cell 4"),
    ])
    .add_row(vec![
        // First 2 positions are occupied by rowspan above
        Cell::new("Cell 3 (row 2)"),
        Cell::new("Cell 4 (row 2)"),
    ]);
+---------+---------+----------------+----------------+
| Header1 | Header2 | Header3        | Header4        |
+=====================================================+
| Spans 2x2         | Cell 3         | Cell 4         |
|                   +----------------+----------------|
|                   | Cell 3 (row 2) | Cell 4 (row 2) |
+---------+---------+----------------+----------------+

It is compatible with all existing features such as styling and alignment. The API is essentially the same as comfy-table, with the addition of set_colspan() and set_rowspan() methods on Cell. If you are already using comfy-table and want to implement cell spanning, super-table can directly replace it.

Repository: https://github.com/benrogmans/super-table

Gitoxide November Update

Gitoxide is a Rust implementation of Git. November updates include:

  1. GitButler Update:

  • Introduced but CLI program, allowing GitButler to be used without a user interface.
  • Support for operations on any branch, not just gitbutler/workspace.
  • Massive code refactoring to support “modern” versions of but binaries.
  • Use of AI Tools:

    • Started using AI tools (like Copilot) to solve issues in the project.
    • Encouraged the community to use these tools more and provided guidance for developers.
  • Community Contributions:

    • Implemented incremental blame functionality based on gitoxide, significantly improving performance (500 times faster).
    • Cleaned up gix-transport and gix-protocol, improving code structure.
    • Added Git-compatible tests for gix blame and gix diff, enhancing compatibility.

    From the Daily Report Team, Bitter Melon

    Subscribe to the community learning and exchange platform:

    • Rustcc Forum: Supports RSS
    • WeChat Official Account: Rust Language Chinese Community

    Leave a Comment