mstdn.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general-purpose Mastodon server with a 500 character limit. All languages are welcome.

Administered by:

Server stats:

11K
active users

#rustlang

100 posts79 participants0 posts today

The next release of #RustLang will start warning about "mismatched lifetime syntaxes".

You can already automatically fix many of these cases by applying an auto-fix for the `elided_lifetimes_in_paths` warning:

RUSTFLAGS="-Welided_lifetimes_in_paths" cargo fix --all --all-targets

Two (very) nice improvements got merged today in docs.rs:

  1. Content is now streamed directly from storage, allowing a much smoother experience for users: github.com/rust-lang/docs.rs/p
  2. You can search for Rust project crates like std on docs.rs search directly: github.com/rust-lang/docs.rs/p

Enjoy!

This will start streaming also rustdoc html files from S3 to the client.
First for simple cases, release specific rustdoc assets, which can directly be streamed.
Then I also added a streaming HTML ...
GitHubstream rustdoc html content from S3, use streaming rewriter, stream to client by syphar · Pull Request #2872 · rust-lang/docs.rsBy syphar

Joey Riches has been working on packagekit integration for moss so that we can have a nicer GUI experience for package installation of our stone based packages.

A short summary of his progress:

- Generated rust bindings for packagekit
- Wrote the moss backend for packagekit and implemented all functionality that moss supports
- Gnome software can list, install & update packages - working on getting a appstream catalog hosted for full functionality

TODO:

- Figure out C/rust interop story to minimise usage of unsafe
- Get support for misc. items implemented in moss such as repo origin of packages
- Get progress bar callback support in
- Implement support for remaining more niche packagekit filters e.g. newest, devel, basename, etc
- Figure out build system: integrate rust bindings & our backend upstream or develop it downstream for now?

It sometimes needs saying that we are fleshing out our distro from scratch, which means we are having to build new integrations like this from scratch. This is a good thing as we have been finding opportunities for optimisation across our code base, but it does require time.

#Rust #RustLang, #AerynOS #Linux #packagekit #GUI

Continued thread

The fifteenth chapter of the ray tracing book is a bit more exciting as it adds the triangle and smooth triangle shapes as well as a parser for OBJ files. This makes it possible to load 3D models and add them to the scene.

I also made an optimization to cache the inverse of the transformation matrix which sped up the calculations a lot.

Here is an image of a smooth high polygon version of the Utah Teapot.

Continued thread

I had to do a lot of refactoring of my ray-tracer to get Chapter 14 working where Groups are added. Making it possible to combine shapes and translate them at the same time.

The end result is not very exciting though. This is a hexagon made up of six cylinders as edges and six spheres as corners.

What are you doing during a rainy weekend? Instructing CoPilot in #VScode to implement a fully working Blockchain implementation in Rust - with a TUI and WASM-based frontend. I haven't written any line of code, just prompted CoPilot in the right direction. In sum I have spent less than 4 hours on this. I learned a lot about CoPilot, Generative AI, cryptography, and the blockchain technology itself. #GenAI #rust #rustlang #ratatui #wasm #blockchain #crypto #crytography

Ok I'm tired... In #ratatui How Am I supposed to return a Span<'_> from a function ? Where does this lifetime comes from? #rustlang

everything is owned in my function:

fn display_battery_level(bat: f32) -> Span<'_> {
let bat_s = bat.to_string();
match bat {
_ if bat > 50.0 => bat_s.green(),
_ if bat > 25.0 => bat_s.yellow(),
_ => bat_s.red(),
}
}