u/Sermuns

efimux is the first useful Ratatui app for UEFI
▲ 21 r/rust

efimux is the first useful Ratatui app for UEFI

This is a follow-up post for when I created ratatuefi (https://www.reddit.com/r/rust/comments/1uiyqe5/ratatui_app_running_baremetal_uefi_application/), a crate providing a no_std UEFI backend for Ratatui.

Using ratatuefi, I have now created a sort of rudimentary bootloader application.

It simply scans for .efi-files in discovered filesystems and presents them in a TUI. The goal is to eventually create something rivaling Ventoy, where you can directly boot into ISO files.

For now, I think it does its job very well, let me know if you find it useful!

github.com
u/Sermuns — 9 hours ago
▲ 215 r/rust

Ratatui app running "bare-metal" (UEFI application)

The fantastic uefi made it surprisingly easy to hack together a backend for Ratatui.

I haven't tested anything physically yet, merely following the tutorial (https://rust-osdev.github.io/uefi-rs/tutorial/vm.html) for running in QEMU.
EDIT: I have now tested physically, it is MUCH faster. Going to try to figure out why running in QEMU is so slow.

I also haven't experimented with input yet, only rendering (IO is maybe just bloat?).

This isn't yet a library but a hardcoded example. I will probably release it after some more improvement!

https://github.com/sermuns/ratatuefi

u/Sermuns — 6 days ago
▲ 2 r/rust

v4l-tui: alternative to `v4l-ctl` or `cameractrls`

Sometimes I need to adjust the brightness of my webcam. I usually begrudgingly resort to cameractrls as I can never remember how to use v4l-ctl.

I already configure most of my system with TUI apps like wiremix, bluetui (co-maintainer) and impala to name a few, so it felt very fitting to have a TUI for this.

v4l-tui now basically fills the needs I had!

I know it's rough around the edges (only supports Integer and Boolean camera controls to name a few limitations.)

Of course no AI was used in the making of this. I am exhausted with the amount of slop in this subreddit (and the author of is-it-slop). I promise the code is reasonably well thought out, though perhaps lazy with the error handling.

I hope anyone else will find this useful!

github.com
u/Sermuns — 8 days ago
▲ 56 r/rust

unicode-consts: all characters as named `&str` constants

Maybe most people have rofi or some picker set up so they can search for and type any unicode character they want, but it thought it seemed cool to be able to access them via named Rust constants instead.

I have no clue how bad of an idea this is. The source code is 82304 lines and 3.5MiB in size.

EDIT: the docs.rs page: https://docs.rs/unicode-consts

crates.io
u/Sermuns — 8 days ago
▲ 382 r/rust

Smelling the slop in a given GitHub project

I'm sick of all the slop-projects in this subreddit.

Instead of just complaining, I've tried to identify common smells that could indicate the project is slop.

  • Using Rust edition 2021
  • Using workspace resolver version 2
  • Using outdated dependencies

In the last two hours I whipped up a CLI tool that checks for these three smells on a given GitHub project.

It it understandably rough around the edges and I know there are way more smells, like using the words "Phase 0", "Phase 1", having HUGE markdown files, using em-dashes, etc, etc.

I would be very happy to get contributions from fellow flesh-and-blood developers!

Sorry for the negative post, but I'm happy I could at least do something creative with my frustration!

github.com
u/Sermuns — 23 days ago
▲ 6 r/rust

silence-interrupter: for when you need that adrenaline kick

This is an excellent tool for every developer if I may say so myself.

A command-line program that plays random "brainrot" audio effects within the random time range of your choice.

You can configure both the randomness time range and audio gain.

Here are some interesting combinations:

normal usage (put this as a background service)

silence-interrupter --range 10m..30m

stimulationmaxxing (USE RESPONSIBLY!!!)

silence-interrupter --range 0..1s --gain 10.0

make your friend feel like they are insane (put this as a background service)

silence-interrupter --range 1h..8h --gain 0.01

https://github.com/sermuns/silence-interrupter

https://crates.io/crates/silence-interrupter

github.com
u/Sermuns — 1 month ago
▲ 0 r/rust

Reverse-engineering QR code dot shapes (using Rust, of course))

Hey friends!

I was feeling inspired by the YouTube content of Jon Gjengset and Daniel Hirsch and wanted to explore what kind of dot shapes are possible in a QR code.

I went in "blind" and recorded the process of research and implementation of generating my own (weirdly shaped) QR codes as SVG (though none of the complicated encoding, that was handled by the qrcode crate.)

The final code is very simple, it's the journey of research and experimenting that I thought might be interesting.

Enjoy!

The video: https://www.youtube.com/watch?v=RbmkNSqMvZY The code: https://github.com/sermuns/qr-dot-shapes

youtube.com
u/Sermuns — 1 month ago
▲ 23 r/rust

I like to keep Cargo projects as bloat-free as possible by finding out if I can disable default features and pick the minimum subset needed for every dependency.

I don't think there exists any tool, similar to cargo-machete for finding unnecessary dependencies, but that finds unnecessary features of dependencies. Am I mistaken?

reddit.com
u/Sermuns — 2 months ago