Skip to main content

Search

Items tagged with: RustLang


🦀 I wrote a proposal for an #[export] attribute in #rustlang to allow for *dynamic* linking between Rust crates, without losing memory safety at the linker boundary.

This will make other ABI work aimed at Rust FFI directly usable between Rust crates as well.

https://github.com/rust-lang/rfcs/pull/3435


Tl'dr #rustlang is a great collaboration opportunity for @gnome and @kde.

A long long time ago, #freedesktop initiative was created for precisely this goal. While in many ways it was a success story (especially in terms of establishing standards), it came short in one specific aspect: code collaboration.

Most freedesktop (all?) projects were and are almost exclusively developed and maintained by GNOME folks. That's not very surprising, given that C (being that lowest common denominator) had to be the programming language of choice. Just like most GNOME folks wouldn't want to touch C++, KDE folks don't particularly enjoy coding in C either. I know both have their reasons and the point here is not to play the blame game here.

There is not much point in dwelling in the past here but if we decide to write all future infrastructure/non-UI projects (that would have otherwise been written in C or C++) in Rust, there's a great potential for collaboration, I believe.

Talk is cheap, you could say and I agree. Hence why I've taken some steps in this direction already: https://github.com/dbus2/


I've spent a good part of my weekend working on upgrading the GStreamer Rust bindings on Servo. The presentation by Martin Robinson from @igalia at @rustnl was a real inspiration.

https://github.com/servo/media/pull/393

I'm delighted with the revival of Servo and I believe it has a bright future.

#ServoBrowser #RustLang #GStreamer


Oxidizing GTK
https://events.gnome.org/event/101/contributions/458/

At the next GUADEC, there will be a presentation on an experiment
about integrating Rust in the GTK code base.

#Rustlang #GTK #GNOME #GUADEC #GUADEC2023


Microsoft is rewriting parts of GDI in Rust, as evidenced by a new file called "win32kbase_rs.sys" which contains a complete reimplementation of the REGION type in rust, and a vive ID called "Rust_GDI_REGION".

#rust #rustlang #microsoft #windows


🆕🦀 Just moments ago, #rustlang 1.69.0 was released!

As usual, here's a thread with some of the highlights. 🧵

1/8

https://blog.rust-lang.org/2023/04/20/Rust-1.69.0.html


Over the Easter holidays I experimented a bit with building Rust code with meson instead of cargo.

Specifically I tried building a GStreamer plugin with a few dozen Rust dependencies, but the same applies in a similar way to GTK/GNOME applications or literally anything else.

A write-up of the results with a lot of details can be found here: https://coaxion.net/blog/2023/04/building-a-gstreamer-plugin-in-rust-with-meson-instead-of-cargo/

#RustLang #GStreamer #GNOME #GTK #meson #cargo #BuildSystems


🦀 "Why the Rust Community Should Be Worried About the New Carbon Language"

👉 should we?

👉 If we some language can do what Rust can do but more simpler, we should be happy to switch but is that the case here?

Article:
https://towardsdev.com/why-the-rust-community-should-be-worried-about-the-new-carbon-language-3a0ab07d6ce5

#rustlang #rust #cpp #carbon


📕 What's the most exciting thing you learned from Rust Atomics and Locks?

#rustlang
https://marabos.nl/atomics/


🆕🆕🆕🦀 In the last few weeks, #rustlang 1.68.0, 1.68.1 and 1.68.2 have been released!

Here's a thread with some of the highlights of Rust 1.68. 🧵

1/11

https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html


If you ever wanted a clean guide on how to make Mastodon in rust from scratch,

https://docs.rs/activitypub_federation/latest/activitypub_federation/

:BoostOK: :ReplyOK:

#rust #rustlang


:youtube_logo: In today's video, I have some strange recommendations on how to learn #RustLang! :rust:
https://youtu.be/2hXNd6x9sZs


Just discovered that there is a "voldemort case" in a Rust RFC. It's when you have a private type in a public API. You can reach the type but can't name it.

https://github.com/petrochenkov/rfcs/blob/9901089b2467b0813456479ba03642e9f0ac0912/text/0000-type-privacy.md#lint-3-voldemort-types-its-reachable-but-i-cant-name-it

#rust #rustlang


Anyone able to help advise me on how to write serde binds for scim? I feel like im doing it a really bad way right now and would love some #rustlang advice. https://github.com/kanidm/scim/blob/main/proto/src/lib.rs


#rustlang peeps, how do you distinguish between recoverable errors and fatal ones that should exit the call chain as quickly as possible? I know about the nested Result from https://sled.rs/errors but am wondering about other patterns.


🥺 The bottom emoji breaks rust-analyzer

https://fasterthanli.me/articles/the-bottom-emoji-breaks-rust-analyzer #rust #rustlang


Watch Philip's talk at #FOSDEM, where he covers the API and prototypes for 'connectbyname', a library function that takes as input a DNS name and returns a TLS connection, as well as a new EDNS(0) option called Proxy Control option that allows stub resolvers to send requirements to a local proxy.

We're developing an #API in #rustlang that can internally use asynchronous #DNS lookups, implement Happy Eyeballs, support #DANE, SVCB/HTTPS, encrypted client hello, etc.

https://fosdem.org/2023/schedule/event/dns_connectbyname_and_the_proxy_control_option/


✨ GStreamer Rust bindings 0.20 and Rust plugins 0.10 release is out

This release features the addition of a few convenience APIs, the addition of bindings for some minor APIs and a lot of internal changes to improve performance and code generation.

https://gstreamer.freedesktop.org/news/#2023-02-13T10:00:00Z

#GStreamer #Rust #RustLang


As part of the optimizations, there are a lot fewer temporary allocations now, e.g. for NUL-terminated strings.

Also, in addition to better performance, the code generation improvements also reduce the binary size considerably.

Some GStreamer plugins saw reductions of 15-20% 🥳

#GStreamer #Rust #RustLang


New gtk-rs release is out! More information there: https://gtk-rs.org/blog/2023/02/10/new-release.html

#rust #rustlang #gtk


ICYMI 👉 Over the course of the last decade, #Rustlang has emerged as a new programming language for writing safe low-level code. In the first of a series, @gfxstrand explores using Rust to write Mesa #Vulkan drivers: https://col.la/ervd1 #OpenSource @rustlang


Getting everyone to stop using sha1 is not a trivial task.

https://sequoia-pgp.org/blog/2023/02/01/202302-happy-sha1-day/

#rust #rustlang


@TauriApps is awesome!

I just made a standalone app for emoji-mart using tauri.

It is very easy to use as a developer, starts fast, binaries are small (2mb for this project) and packaging just works out of the box.

For this project I did not even had to write a single line of rust, so you don't need to be comfortable with #rustlang to be able use it.

https://github.com/Simon-Laux/tauri-emoji-mart-app

#tauri


RIIR strikes again!
https://github.com/fish-shell/fish-shell/pull/9512

#rust #rustlang

/cc @jntrnr


let floor = Floor::default();<br>let mut bowl = Bowl::new();<br>let mut cat = Cat::mew();<br><br>bowl.place_on(&floor);<br>cat.sit_on(&bowl);<br><br>let floor: &mut Floor = unsafe {<br>    &mut *(&floor as *const Floor as *mut Floor)<br>};<br><br>floor.lower_by(50 * CM);<br>


Levitation needs some unsafe code, but not around the cat, cats don't take fall damage.

Original post by @Kyu : https://meow.social/@Kyu/109571030568292591

#RustCataStructures #rust #RustLang #cat #CatsOfMastodon

Not all cats have the gift of levitation.
Those that do, however, do like to flaunt it.


#Rustlang 1.67 added extra optimizations of struct layouts. This might break code that relied on the "don't rely on this" layout of Rust structs without `#[repr(C)]`.

If you want to ensure your code doesn't rely on undocumented struct layout, there's an nightly flag for that: https://github.com/rust-lang/rust/issues/106764

RUSTFLAGS="-Z randomize-layout" cargo +nightly test


The Rust base64 crate got a new release the other day, which removed (or rather deprecated for now) the simple encoding/decoding API and requires quite a bit boilerplate for such a simple task.

The maintainer does not see the point in providing a simpler API for the common cases because if the API is too difficult to use then Rust is just the wrong language for you 🙄

Too bad the crate has such a prominent name on crates.io and is used so widely. I hope that doesn't turn away too many beginners because something as simple as base64 handling is so complicated.

The data-encoding crate looks like a good alternative for the same tasks. It provides the same amount of flexibility while still providing a simple API for the common tasks.

https://lib.rs/crates/data-encoding

#rust #RustLang


Thanks to my students and former students at @TelecomParis for this perfect gift: a #rustlang themed temperature sensitive cup.


Now that we made it all through the holidays, we're happy to do some releases again!

First up is our #RPKI relying party software Routinator. 🚀 Version 0.12.1 fixes a small number of bugs. Most importantly, the #TLS-enabled servers for both HTTP and RTR now also accept private keys formatted as PKCS#1 RSA keys rather than only accepting PKCS#8 keys. #RoutingSecurity #rustlang

https://github.com/NLnetLabs/routinator/releases/tag/v0.12.1


A two-month beginner's project: Machine Learning from scratch

https://github.com/Raibows/MLinRust

Discussions: https://discu.eu/q/https://github.com/Raibows/MLinRust

#programming #rustlang


declares intent on #fediverse - https://blog.mozilla.org/en/mozilla/mozilla-launch-fediverse-instance-social-media-alternative/

With their track of incubating #RustLang I'm curious how this pans out.


The experimental Rust PR to add a more expressive "interop" ABI on top of the C ABI is IMHO the most exciting new effort that happened in Rust in the last few years.

Thanks to @josh and others for starting this very important work 🥳​

https://github.com/rust-lang/rust/pull/105586

Also @Mara's reply seems to indicate that some serious thought is now also put into other related areas, especially for handling Rust dynamic libraries.

https://github.com/rust-lang/rust/pull/105586#issuecomment-1349332850

Very exciting stuff for making Rust a better choice in various areas where exactly these topics were slowing down or hindering adoption.

#Rust #RustLang


First video in the "decrusted" series where we peel back the crust of the serde crate is now up: https://youtu.be/BI_bHCGRgMY. I quite like the format, so expect to see more of these! #rustlang


🦀📕 Rust Atomics and Locks is now available as ebook! 🎉

Pre-ordered printed copies should start shipping in a few weeks. ⌛️

#rustlang

https://marabos.nl/atomics/