(New to this series? Consider starting from part 1)
At the end of the last post, we started to get some interesting functionality with the ability to resolve addresses to names in a module. This was the last functionality missing before we could implement breakpoints! This part adds the ability for ...
Berlin based technology consultancy specialising in the Rust programming language. We offer development, implementation, training and long-term support.
I made one of those e-ink weather displays that you see on tech blogs and hacker news sometimes. It can display the current weather, the temperature and precipitation forecast for the rest of the week, and my current and upcoming tasks from Todoist. It's powered by a couple NiMH AA …
Recently, I found myself returning to a compelling series of blog posts titled
Zero-cost futures in Rust
by Aaron Turon about what would become the foundation of Rust's async ecosyste…
The colleague, who added @rustlang support to #syslog\_ng left many years ago. Syslog-ng #Rust support was last touched 7 years ago. Still, there are regular downloads. Just #searchengines or there are real users? Does it actually work?
Stabilization report
This report proposes the stabilization of #![feature(return_position_impl_trait_in_trait)] (RPITIT) and #![feature(async_fn_in_trait)] (AFIT). These are both long awaited featu...
I'm working on a cli for a service I've made that maintains a node edge graph (think neo4j type thing). I want to be able to display a graph in the terminal in a sort of ascii art text form kinda like git log -graph. I haven't found any third part libraries that can do that and am looking for help.
Restore from-source serde_derive build on all platforms — eventually we'd like to use a first-class precompiled macro if such a thing becomes supported by cargo / crates.io
I'm working on packaging serde for Fedora Linux, and I noticed that recent versions of serde_derive ship a precompiled binary now. This is problematic for us, since we cannot, under no circumstance...
serde_derive now ships a precompiled binary. This made a lot of people angry. The crate maintainer finally locked the issue.
I recently ran into an issue where I wanted to use Any for slices. However, it only allows 'static types (based on what I read, this is because you get the same TypeId regardless of lifetimes).
I came up with this workaround which I think is safe:
```rust
use std::{
any::{Any, TypeId},
marker::PhantomData,
};
edit: Unfortunately it seems like Lemmy insists on mangling the code block. See the playground link below.
T: Any ensures T is also 'static. The lifetime is preserved with PhantomData. Here's a playground link with some simple tests and a mut version: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=3116a404c28317c46dbba6ed6824c8a9
It seems to pass Miri, including the mut version (which requires a bit more care to ensure there can only be one mutable reference). Any problems with doing this?
I've implemented a few new things on lib.rs recently! New features page It lists all cargo features that a crate supports. It includes comments from Cargo.toml, neatly formatted as markdown, so you can learn what the features do. Since comments on features are rare, I also search crate's source co...
> Lots of new features!
>
> Thought I should share this with those who don't use users.rust-lang.org. Note: I'm not affiliated with lib.rs, I'm only reposting to lemmy.
Contribute to davidlattimore/cackle development by creating an account on GitHub.
> Cackle is a tool to analyse the transitive dependencies of your crate to see what kinds of APIs each crate uses.
> The idea is look for crates that are using APIs that you don't think they should be using. For example a crate that from its description should just be doing some data processing, but is actually using network APIs.
START HERE. This is the top-level project for lib.rs that connects all the repositories together.
Previously: https://lemmyrs.org/post/175672
> I originally had sources and data of the site public, hoping they would be interesting to study, aid in bug reporting, bring contributions, and make site's algorithms transparent.
> Instead, I got knee-jerk reactions about lines of code taken out of context. I got angry dogpiles from the Rust community, including rust-lang org members. I don't need to endure such mudslinging. Therefore, the sources are no longer available.
As of right now bitcoin crate is not deprecated, instead libs.rs responds with error 502.
>
>
> Hi everybody, I'm new to Rust.
>
> So, I have a struct Panel which contains a data widget which implements the trait Widget
> I have to implement a function for Panel that uses another function that requires a type that implements Widget.
>
> I tried Box<T>, Rc<T>, Box<dyn Widget, &T, but nothing, always compiler errors.
>
> How can I fix this?
Berlin based technology consultancy specialising in the Rust programming language. We offer development, implementation, training and long-term support.
Rust has a runtime. No really it does! I blew past that aspect in my most recent
post "Oxidizing the technical interview"
[https://blog.mgattozzi.dev/oxidizing-the-technical-interview/] when I put in the line:
> The greatest trick the Devil ever played was convincing C and Rust programmers
their la...
Hi,
I Just started working on a Emacs-inspired text editor in Rust.
Being insipred by Emacs, the most important part Is the possibiliy to implement new components.
My ideas were:
Rust-based scripting language, like Rhai
RustPython (slower, but more compatible and lots of people know Python)
PyO3 (Bigger executable and not that fast)
Wasm/Wasi (Cross-platform, but I don't know if the compatibility with Rust's hosted functions and structs is good)
Other binded language, like V8, Lua or SpiderMonkey
Compiled plugins, like .so or .DLL (Fast, but not compatible; there should be Rust plugin frameworks for implementing this, but I don't remember the name)
The elements to analyze are: speednees (consider it's a text editor, so...), easy-to-develop and Cross-platform (if possible, not that important), but the possibility to execute functions in the host Rust program is EXTREMELY important.
Flash animation or Flash cartoon is an animated film that is created with the Adobe Animate (formerly Flash Professional) platform or similar animation software and often distributed in the SWF file format. The term Flash animation refers to both the file format and the medium in which the...
pest3 started as an effort to improve pest's language grammar and parser API, i.e., as per pest's focus, pest3 aimed to improve their accessibility, correctness, and performance. 💪 (Note that flexi...
Empowering everyone to build reliable and efficient software.
The Rust team is happy to announce a new version of Rust, 1.71.0. Rust is a programming language empowering everyone to build reliable and efficient software.
If you have a workspace with dependencies you probably noticed that sometimes cargo seemingly unnecessary recompile external dependencies as you switch between different members of your workspace.
This is caused by something called feature unification ([1]). Since features by design should be additive only cargo tries to avoid redundant work by using a superset of all required features. Problem comes when there are multiple crates in the workspace require external dependencies with different set of features. When you are working with the workspace as a whole - unified features include all the dependencies, when you target a single crate - unified features will include only features of that crate's dependencies.
What's worse - if you are using nix with crate2nix to manage dependencies - you'll get no feature unification at all and every dependency with each unique combination of features is considered a separate dependency so the same crate can be compiled (and linked in) multiple times - I've seen 20+ copies of a single crate.
Unless there are special requirements it is better to make sure that all the external dependencies have exact same set of features enabled across the workspace. One option is to do it by hand manually editing Cargo.toml files for individual dependencies or with inherited workspace dependencies. As with anything manual - it would be error prone.
That's where cargo-hackerman comes in. It can check if there are feature unification issues in the workspace so you can run it in CI if you want to do it manually or it can apply the smallest possible hack by itself (and remove it later).
This is not a new crate, we've been using it in production with a large workspace for over a year now.
In addition to feature unification it can help with some other compilation time things giving easy answers to questions like :
are there any duplicate dependencies in my workspace?
why is this dependency or feature on dependency is required?
what are all the dependencies of this crate?
where is the repository of this crate?
With updated bpaf documentation on https://crates.io/crates/cargo-hackerman should be always up to date and cli - a bit more user friendly