Use rust for embedded development
Alan Smithee on why Rust’s high performance, reliability, and productivity make it a good fit for embedded systems.
Alan Smithee on why Rust’s high performance, reliability, and productivity make it a good fit for embedded systems.
Seed is a Rust framework that uses an Elm-like architecture to help you build fast and reliable web apps that run on WebAssembly. Here’s why you might want to use it:
Seed allows you to develop the front-end with all the benefits of Rust, meaning speed, safety, and too many more things to count.
The Seed templating system uses a macro syntax that makes Rustaceans feel right at home. This means linting, formatting, and commenting will work, and it’s all in Rust. This is opposed to a JSX-like syntax that relies on IDE extensions to improve the developer experience.
Seed has a batteries-included approach. This means less time writing boilerplate and less time installing dependencies.
And a few reasons why you might not:
- It’s newer. It’s harder to find support outside of Discord.
- WebAssembly is newer with less support. Browser compatibility is at 92.9%.
- Pre-built components are rare. You will likely have to roll your own components such as date pickers.
- No server-side rendering yet
- You may prefer other Rust frameworks like MoonZoon or Yew.
git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers. The changelog template can be customized with a configuration file to match the desired format.
htmlq uses CSS selectors to extract bits of content from HTML files. Mozilla’s MDN has a good reference for CSS selector syntax.
This looks super handy. Examples!
// Find part of a page by ID
curl --silent https://www.rust-lang.org/ | htmlq '#get-help'
// Find all links in a page
curl --silent https://www.rust-lang.org/ | htmlq --attribute href a
// Get the text content of a post
curl --silent https://nixos.org/nixos/about.html | htmlq --text .main
Problem: TODOs as comments are too often forgotten or neglected
Solution: TODOs as code that triggers compile errors based on set criteria
// trigger a compile error if we're past a certain date
todo_or_die::after_date!(3000, 1, 1); // its the year 3000!
// or a GitHub issue has closed
todo_or_die::issue_closed!("rust-lang", "rust", 44265); // GATs are here!
// or the latest version of a crate matches some expression
todo_or_die::crates_io!("serde", ">1.0.9000"); // its over 9000!
Brett Cannon:
… over 3 years ago I set out to re-implement the Python Launcher for Unix in Rust. On July 24, 2021, I launched 1.0.0 of the Python Launcher for Unix… This gives you a
py
command on Unix which will always use the newest version of Python.
He goes on to describe some workflow niceties that a built in and also what this project is not about:
The Launcher is purely a convenience and not meant to be The Launcher For All Things; this should never end up in a Docker container.
axum
focuses on ergonomics and modularity. It can:
tower
] and [tower-http
] ecosystem of middleware, services, and utilities.Lots of axum
doing various webby things right here.
This is not a use-it-in-the-real-world kinda thing. It’s being written as a learning project, but may interest you if you want to learn about database internals. It includes:
Angle-grinder allows you to parse, aggregate, sum, average, min/max, percentile, and sort your data. You can see it, live-updating, in your terminal. Angle grinder is designed for when, for whatever reason, you don’t have your data in graphite/honeycomb/kibana/sumologic/splunk/etc. but still want to be able to do sophisticated analytics.
Angle grinder can process well above 1M rows per second (simple pipelines as high as 5M), so it’s usable for fairly meaty aggregation. The results will live update in your terminal as data is processed. Angle grinder is a bare bones functional programming language coupled with a pretty terminal UI.
I’m not gonna lie, they had me with the name on this one.
Difftastic is an experimental structured diff tool that compares files based on their syntax. It is very much unfinished. It works reasonably on very parenthesised data (lisps, JSON), it works sometimes on other languages with sufficient parentheses (Rust, JS), and falls back to a line-oriented diff otherwise.
rpg-cli is a bare-bones JRPG-inspired terminal game written in Rust. It can work as an alternative to
cd
where you randomly encounter enemies as you change directories.
You’ll want to practice a bit first, then once you get good at it go ahead and override the builtin cd
by adding this function to your bash profile.
cd () {
rpg-cli "$@"
builtin cd "$(rpg-cli --pwd)"
}
Works out of the box, no configuration required. Great alternative to TeamViewer and AnyDesk! You have full control of your data, with no concerns about security. You can use our rendezvous/relay server, set up your own, or write your own rendezvous/relay server.
The built-in file transfer and tunneling look great.
The Parcel team is excited to release Parcel 2 beta 3! This release includes a ground up rewrite of our JavaScript compiler in Rust, which improves overall build performance by up to 10x. In addition, this post will cover some other improvements we’ve made to Parcel since our last update, along with our roadmap to a stable Parcel 2 release.
A growing trend in the JS tooling world is to replace bits and pieces with Rust ||
Go where it makes sense and reap the performance benefits. Congrats to the Parcel team on epic results from this rewriting effort.
The goal of this project is to add support for the Rust language to the Linux kernel. This repository contains the work that will be eventually submitted for review to the LKML.
Probably the most exciting fork of torvalds/linux in the ’Verse, but what are the odds that this effort eventually makes it back upstream?
This doesn’t aim to entirely replace find
and ls
, but if you already know SQL (like many of us do), why not be able to leverage that knowledge for your more advanced file-finding needs? Here’s a couple of examples so you get the idea:
Find temporary or config files (full path and size):
fselect size, path from /home/user where name = '*.cfg' or name = '*.tmp'
Use aggregate functions:
fselect "MIN(size), MAX(size), AVG(size), SUM(size), COUNT(*) from /home/user/Downloads"
Find by date and time intervals:
fselect path from /home/user where modified gte 2017-05-01
This is a spare time project, so keep that in mind. It runs on Linux, macOS, Windows 10, and FreeBSD.
grex
is a library as well as a command-line utility that is meant to simplify the often complicated and tedious task of creating regular expressions. It does so by automatically generating a single regular expression from user-provided test cases. The resulting expression is guaranteed to match the test cases which it was generated from.
Unfortunately, the tool’s authors still think you need learn how to write regexes, even when grex
works flawlessly (and I tend to agree with them).
Lots to like here:
Zola comes as a single executable with Sass compilation, syntax highlighting, table of contents and many other features that traditionally require setting up a dev environment or adding some JavaScript libraries to your site.
And here:
The average site will be generated in less than a second, including Sass compilation and syntax highlighting.
I’d love to see some build time benchmarks on a site with many pages.
Sylvestre Ledru:
Rust/coreutils is now available in Debian, good enough to boot a Debian with GNOME, install the top 1000 packages, build Firefox, the Linux Kernel and LLVM/Clang. Even if I wrote more than 100 patches to achieve that, it will probably be a bumpy ride for many other use cases.
Dan Lorenc, from Google’s Infrastructure Security Team:
Software written in unsafe languages often contains hard-to-catch bugs that can result in severe security vulnerabilities, and we take these issues seriously at Google. That’s why we’re expanding our collaboration with the Internet Security Research Group to support the reimplementation of critical open-source software in memory-safe languages.
Notice he said “expanding our collaboration”, which must mean they’ve been doing this for a bit, but I wasn’t aware of the effort? An uplifting trend, regardless. Work is well underway:
The new Rust-based HTTP and TLS backends for curl and now this new TLS library for Apache httpd are an important starting point in this overall effort. These codebases sit at the gateway to the internet and their security is critical in the protection of data for millions of users worldwide.
Stoked for the Rust community!
Today, on behalf of the Rust Core team, I’m excited to announce the Rust Foundation, a new independent non-profit organization to steward the Rust programming language and ecosystem, with a unique focus on supporting the set of maintainers that govern and develop the project.
Also, Mozilla has “transferred all trademark and infrastructure assets, including the crates.io package registry,” to the Rust Foundation.
David Hamp-Gonsalves created a really cool use for your old Kindle:
Second hand Kindles are waiting in drawers for someone to repurpose them into something great. Boasting large e-ink screens, wifi connectivity and ARM processors they are an amazing hacking platform.
In my case I created an information panel summarizing my day such as my calendar, surf and weather forecast, garbage schedule, school closures, etc. My favorite part is that any extra space is filled with a random Pokémon sprite which my kids(not me) like to come check in on.
Built with Rust plus some serverless backend data collection bits.
Stork is two things. First, it’s an indexer: it indexes your loosely-structured content and creates a file that you can upload to your web server. Second, it’s a JavaScript + WebAssembly frontend for that index file: Stork will hook into an
<input>
on your web page, download the index you’ve specified, and display the best search results immediately to your user, as they type. The precomputed index and WebAssembly frontend module make the entire Stork engine very good, and very fast.
Mundane is backed by BoringSSL (Google’s fork of OpenSSL that is used in Chrome, Android, et al) and is built to be “difficult to misuse, ergonomic, and performant (in that order)”.
Crush is an attempt to make a traditional command line shell that is also a modern programming language. It has the features one would expect from a modern programming language like a type system, closures and lexical scoping, but with a syntax geared toward both batch and interactive shell usage.
Check out the overview of features right here.