![Community banner](https://programming.dev/pictrs/image/785b76dd-e87f-4fc9-9df8-db835c373155.jpeg)
![rust](https://programming.dev/pictrs/image/1f7e5534-88d3-4d6f-bc57-7cda9553890f.webp?format=webp&thumbnail=48)
Rust
- GitHub - Atreyagaurav/local-mpv: Run MPV with a webserver to control from local network
cross-posted from: https://lemmy.world/post/17984566
> Hi all, > > mpv communities seem to be tiny in lemmy, so I'm sharing it here. > > This is a program I made for music control from local network. > > You can run it in a computer with some local media files, or youtube links or any other links yt-dlp supports. And then with the server, you can control the media player and the playlist from any devices in your local network. So that you can just show a QR code or something to house guests for parties, or have it bookmarked within family to control the music. > > I wanted to make something similar to how youtube app let's you play in TV and such, but my skills were not enough to do that. So I tried a simple alternative that works with computers. In an ideal world, I could make "Play with local mpv server" option come while on other android apps, but I have zero experience in android app development and it looks complicated. > > I know some other programs also give option to control media, but I wanted to give it a go with a simple implementation. Making the web-server was a tricky part. Only tutorial from the rust book was useful here as every other web server developement in rust seems to be async ones using libraries so I would have to make a complicated system to communicate with the mpv. Using the simple Tcp connection let me make a thread with mpv instance in the scope. I do need to support https and file uploads and other things, but I haven't had any luck finding a solution that works with simple Tcp connection like in the tutorial. Let me know if you know anything. > > Github: https://github.com/Atreyagaurav/local-mpv
- Announcing Rust 1.80.0blog.rust-lang.org Announcing Rust 1.80.0 | Rust Blog
Empowering everyone to build reliable and efficient software.
- System76 with Jeremy Soller | Rust in Production Podcast S02 E07 by corrode Rust Consulting | 2024-07-25corrode.dev System76 with Jeremy Soller - Rust in Production Podcast | corrode Rust Consulting
Many devs dream of one day writing their own operating system. Ideally in their favorite language: Rust. For many of us, this dream remains just that: a dream. Jeremy Soller from System76, however, didn't just contribute kernel code for Pop!_OS, but also started his own operating system, RedoxOS, wh...
> Many devs dream of one day writing their own operating system. Ideally in their favorite language: Rust. For many of us, this dream remains just that: a dream. > > Jeremy Soller from System76, however, didn't just contribute kernel code for Pop!_OS, but also started his own operating system, RedoxOS, which is completely written in Rust. One might get the impression that he likes to tinker with low-level code! > > In this episode of Rust in Production, Jeremy talks about his journey. From getting hired as a kernel developer at Denver-based company System76 after looking at the job ad for 1 month and finally applying, to being the maintainer of not one but two operating systems, additional system tools, and the Rust-based Cosmic desktop. We'll talk about why it's hard to write correct C code even for exceptional developers like Jeremy and why Rust is so great for refactoring and sharing code across different levels of abstraction.
Listen to Rust in Production Podcast S02 E07
- Jiff is a new date-time library for Rust that encourages you to jump into the pit of successgithub.com GitHub - BurntSushi/jiff: A date-time library for Rust that encourages you to jump into the pit of success.
A date-time library for Rust that encourages you to jump into the pit of success. - BurntSushi/jiff
- PSA: Claude is some much better at rust than ChatGPT
Pretty much the title. For those who use LLMs for learning or writing rust code, claude is much better at it, based on my experience.
- Monitrust - a minimal self-hosted server monitoring toolgithub.com GitHub - lesurp/monitrust: Monitor your server's resources in real time
Monitor your server's resources in real time. Contribute to lesurp/monitrust development by creating an account on GitHub.
Hi friends, Not sure whether this little tool could be of use to anyone here, but I thought it might be interesting to share.
I was running into problems on my VPS due to high-memory usage, which led to my email server going down with all the consequences that come with it. I tried using Grafana Agent to monitor the server's state, but with 2GB memory, the tool's footprint was creating more problems than anything else, so I reinvented my own, square, low-memory footprint, wheels.
Cheers everyone.
- Anyone looking for a fun small rust project? Create a crate for cleaning urls, based on the ClearUrls project
cross-posted from: https://lemmy.ml/post/18162485
> This would entail: > > - Pulling in the ClearUrls rules as a git submodule. > - Reading / transforming the json there into Rust structs. > - Creating a Rust crate that runs a
.clean(input_url) -> String
> > Lemmy issue: https://github.com/LemmyNet/lemmy/issues/4905 - diesel_async 0.5 released, with SQlite supportgithub.com Release Diesel-Async 0.5.0 · weiznich/diesel_async
Added type diesel_async::pooled_connection::mobc::PooledConnection MySQL/MariaDB now use CLIENT_FOUND_ROWS capability to allow consistent behaviour with PostgreSQL regarding return value of UPDATe ...
> - Added type
diesel_async::pooled_connection::mobc::PooledConnection
> - MySQL/MariaDB now useCLIENT_FOUND_ROWS
capability to allow consistent behaviour with PostgreSQL regarding return value ofUPDATe
commands. > - The minimal supported rust version is now 1.78.0 > - Add aSyncConnectionWrapper
type that turns a sync connection into an async one. This enables SQLite support for diesel-async > - Add support fordiesel::connection::Instrumentation
to support logging and other instrumentation for any of the provided connection impls. > - Bump minimal supportedmysql_async
version to 0.34 > > A special thanks goes to @momobel and Wattsense for contributing theSyncConnectionWrapper
implementation. > > To support future development efforts, please consider sponsoring me on GitHub. > > Full Changelog:v0.4.0...v0.5.0
- Slint 1.7 Released with New Widgets, Multi-Window Support, and Live-Preview Redesignslint.dev Slint 1.7 Released with New Widgets, Multi-Window Support, and Live-Preview Redesign
Slint 1.7 Released with New Widgets, Multi-Window Support, and Live-Preview Redesign
- Ferris is now on the Fediverse Canvas!
I hope this slightly off-topic post is ok here. Today the Fediverse Canvas 2024 event begun and I thought it would be nice to add Ferris to the canvas. I started with a couple of pixels, but after a while I got distracted with other things. When I came back, I found that some of you have already finished it 🦀
Btw. Ferris sits on top of the Godot logo (bottom and slightly right).
- What are you working on this week? (July. 7, 2024)
Hi rustaceans! What are you working on this week? Did you discover something new, you want to share?
- Should RustSec (Advisory Database and Cargo tools) be embraced at the foundational level and made a "mandatory best practice"?rustsec.org About RustSec › RustSec Advisory Database
Security advisory database for Rust crates published through https://crates.io
Hi all,
ref: https://programming.dev/post/16349359
I agree with all the criticism about the author, the intentions, and the points in the article, expressed in the ref. thread. I also think the author highlights a serious issue (if we leave "selling the book", cheap criticism, and sensationalism aside). While nothing new for most developers, the article has spawned a personal rabbit hole of discovery, starting from supply chain attacks.
I am still very early in my process of learning Rust (still reading The Book) and self-taught software engineering in general, and the journey the article has spawned was very educational to me. I've learned about securing software and being mindful across the whole SDLC[1], AppSec, DevSec, OWASP, SLSA[2] Socket[3], GitHub Advanced Security, and many more tools and guidelines. Last of which is RustSec[4]. Which quenched my thirst and closed that personal rabbit hole. It has opened a different can of worms though.
While endemic to any non-monolithic ecosystem and only part of the "big security picture", supply chain is possibly the major player across the spectrum. Comparable to "the legacy issue" of stagnating systems and infrastructures, open to exploits as old as the Sun.
Now, while I am aware that security is a process, not a product and that this is easier said than done: I wonder if tools like RustSec should be embraced at the foundational level and made a "mandatory best practice". RustSec tools integrate with an up to date security advisory database and Cargo. They can also be deployed as GitHub Actions.
Because I am sure this is not all roses: I agree that (for example) dependabot is seen as a major annoyance more than a useful tools for a number of reasons, and that RustSec could spark the same kind of thoughts. However, it could be a great stepping stone of the security process.
I am aware I may be being too idealistic here, but the process has to start from somewhere and stagnating on "dogmas" ain't helping either.
Please be kind in your replies.
Cheers
[1] https://www.youtube.com/watch?v=hDvz8KivY_U [2] https://slsa.dev [3] https://socket.dev [4] https://rustsec.org
- rustc_codegen_gcc: Progress Report #33
We finally were able to finish the sync with the Rust compiler and now support the types f16 and f128!
I had a lot of stuff going on lately in my private life, so I wasn't able to work as much as I wanted on rustc_codegen_gcc. Hopefully, it should be back to normal after my vacation.
- Mannheim (DE) Meetup on July 16rheinneckar.events Nix Your Bugs & Rust Your Engines #4
Jul 16, 2024, 6:00:00 PM - GMT+2 - Mafinex Technologiezentrum, 68163, Mannheim, Deutschland - Nix Your Bugs & Rust Your Engines is a new meetup for people in the Rhein-Neckar region that are interested in Rust (the programming language), Nix (the package manager), or NixOS (the Linux distributi…
It's less than two weeks until our next Rust and NixOS meetup in Mannheim, Germany. We're meeting on the 16th of July at the Mafinex technology center close to the main station. If you want to join us, please sign up for the event on Mobilizon (no account required) or Meetup.com.
https://rheinneckar.events/events/9d740b89-7713-4e19-a112-45aff1670f0f
https://www.meetup.com/hackschool-rhein-neckar/events/301504325/
As first talk, we will hear Andre Dossinger on "Using NixOS for Pragmatical Self-hosting", where he will show us how NixOS can be used in a problem oriented manner to preserve privacy and make complex setups manageable. Questions and discussions are highly encouraged!
Then, we will hear Benjamin Sparks on "Reading from Streams and Writing to Sinks" using Rust and Tokio, with a focus on low runtime overhead, safe buffer management, and robust error handling. He will show us the types and traits Tokio leverages to efficiently decode bytes and encode structured data in a type-safe manner is presented, and give us a practical demonstration of codecs for two different protocols.
Finally, Stefan Machmeier of the EMCL at Heidelberg University will give us an introduction to Nix Flakes, the experimental dependency management system built into Nix since version 2.4 that can be used for reusable Nix libraries as well as your own Nix packages and NixOS configurations.
The talks will be recorded and uploaded after the meetup.
- Bevy 0.14 Releasedbevyengine.org Bevy 0.14
Bevy is a refreshingly simple data-driven game engine built in Rust. It is free and open-source forever!
- Rust has a HUGE supply chain security problem | Sylvain Kerkour | July 2, 2024kerkour.com Rust has a HUGE supply chain security problem
This post is part of my Summer of Rust 2024 serie: weekly (or more) quickies about how to write great Rust code so you will be ready to rock at the end of the summer and find a new exciting job 🤘 Dont forget to Subscribe (Email & RSS) "If
July 2, 2024
Sylvain Kerkour writes:
> Rust adoption is stagnating not because it's missing some feature pushed by programming language theory enthusiasts, but because of a lack of focus on solving the practical problems that developers are facing every day. > > ... no company outside of AWS is making SDKs for Rust ... it has no official HTTP library. > > As a result of Rust's lack of official packages, even its core infrastructure components need to import hundreds of third-party crates. > > - cargo imports over 400 crates. > > - crates.io has over 500 transitive dependencies. > > ...the offical libsignal (from the Signal messaging app) uses 500 third-party packages. > > ... what is really inside these packages. It has been found last month that among the 999 most popular packages on crates.io, the content of around 20% of these doesn't even match the content of their Git repository. > > ...how I would do it (there may be better ways): > > A stdx (for std eXtended) under the rust-lang organization containing the most-needed packages. ... to make it secure: all packages in stdx can only import packages from std or stdx. No third-party imports. No supply-chain risks.
[stdx packages to include, among others]:
> gzip, hex, http, json, net, rand
Read Rust has a HUGE supply chain security problem
---
Submitter's note:
I find the author's writing style immature, sensationalist, and tiresome, but they raise a number of what appear to be solid points, some of which are highlighted above.
- Feedback wanted: Investigating a streamlined sonnection between Weird core and SvelteKit.github.com Investigate a Streamlined Connection Between Weird Core and SvelteKit. · Issue #92 · commune-os/weird
This is an exploratory task to see if there is a better way than a REST API to connect SvelteKit to the Weird core. Right now we have the Weird core library which is implemented in Rust and uses Ir...
- What are you working on this week? (June. 30, 2024)
Hi rustaceans! What are you working on this week? Did you discover something new, you want to share?
- Types Team Update and Roadmap | Rust Blogblog.rust-lang.org Types Team Update and Roadmap | Rust Blog
Empowering everyone to build reliable and efficient software.
- JetBrains RustRover Is Released and Includes a Free Non-Commercial Optionblog.jetbrains.com RustRover Is Released and Includes a Free Non-Commercial Option | The RustRover Blog
We’re excited to announce the general availability of RustRover, the powerhouse IDE for Rust developers!
Rust Rover is out of preview and is free for non-commercial use. The only caveat is:
> It’s also important to note that if you’re using a non-commercial license, you cannot opt out of the collection of anonymous usage statistics.
- Rust Container Cheat Sheet
Found this on Mastodon https://fosstodon.org/@dpom/112681955888465502 , and it is a very nice overview of the containers and their layout.
- Dioxus Labs + “High-level Rustdioxus.notion.site Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.
A new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team
- What are you working on this week? (June. 23, 2024)
Hi rustaceans! What are you working on this week? Did you discover something new, you want to share?
- General purpose scripting language with no non-Rust dependencies
Is there a good general-ish purpose scripting language (something like Lua on the smaller end or Python on the bigger) that’s implemented in only Rust, ideally with a relatively low number of dependencies?
Have you used it yourself, if so for what and what was your experience?
Bonus points if it’s reasonably fast (ideally JITed, though I’m not sure if that’s been done at all in Rust).
- Frequency detection crate
I've needed to detect a frequency of an audio signal a couple of times in my life, but I cannot for the love of me remember what does the FFT output actually mean. So I took this knowledge out of my latest project and packed it up in this crate.
Also this is my first potentially useful published crate, so if I missed anything, please let me know!
- Rust just merged two new very fast sort implementations into stdlibgithub.com Replace sort implementations by Voultapher · Pull Request #124032 · rust-lang/rust
This PR replaces the sort implementations with tailor-made ones that strike a balance of run-time, compile-time and binary-size, yielding run-time and compile-time improvements. Regressing binary-s...
name diff % speedup slice::sort_large_random -65.49% x 2.90 slice::sort_large_strings -37.75% x 1.61 slice::sort_medium_random -47.89% x 1.92 slice::sort_small_random 11.11% x 0.90 slice::sort_unstable_large_random -47.57% x 1.91 slice::sort_unstable_large_strings -25.19% x 1.34 slice::sort_unstable_medium_random -22.15% x 1.28 slice::sort_unstable_small_random -15.79% x 1.19
- I've created a CLI tool to download Rust web books as EPUBgithub.com GitHub - mawkler/rust-book-to-epub: Rust Book to EPUB converter
Rust Book to EPUB converter. Contribute to mawkler/rust-book-to-epub development by creating an account on GitHub.
Hi! I've created a CLI tool for downloading Rust web books (like The Rust Programming Language) as EPUB, so that you can easily read them on your e-book reader. The tool is heavily based on this gist and a lot of proompting.
Check it out here: https://github.com/mawkler/rust-book-to-epub
- Cargo-playdate 0.5 released 🎉github.com Release 2024.06.18 · boozook/playdate
TL;DR What's Changed Refactoring some build system parts including final product matching, that gives support of cargo's auto-targets such as bin and example, as well as args like --all-targets me...
That was a hard long adventure, massive refactoring with bug-fixing 🥵
- Sophia: a Rust toolkit for RDF and Linked Datagithub.com GitHub - pchampin/sophia_rs: Sophia: a Rust toolkit for RDF and Linked Data
Sophia: a Rust toolkit for RDF and Linked Data. Contribute to pchampin/sophia_rs development by creating an account on GitHub.
I went to look into the activitypub federation package from Rust and noticed that it does not support JSON-LD. This took me to a search into other libraries, which got me to RDF-based crates. Just thought it was a good idea to share.
- What are you working on this week? (June. 16, 2024)
Hi rustaceans! What are you working on this week? Did you discover something new, you want to share?