I started learning rust a few months ago on my free time. I went through the most difficult already like borrow checker and I used the Learning Rust book from Jim Blandy as reference especially for its first chapters.
This is not my first time learning a language I already have experience with Python, Go, JS, C, Lua ... but with Rust it feels different.
Everytime I learned a new lang there was always a milestone I crossed that made me feel comfortable using the language, that milestone was always some side project or program I needed anyway.
I am trying to do the same with Rust but the slowness of learning and looking up the docs coupled with the verbosity of the language is not very motivating. Don't get me wrong, I really want to use Rust and learn it as it looks very elegant and clean, I already learned a lot more about lower level details of programming. The documentation is probably the most elaborate one I ever used for a programming language.
To keep me going I am practicing Rustlings while a procrastinate to work on the side project I chose as first project.
I am just curious how others passed that milestone with Rust.
I would like to know if there are any proposals for internal file organization, like what to put from top to bottom...
Example: start with pub use declarations, then use, the mod, enums, traits, etc.
I've seen rustfmt has some options like reorder_imports that may impose some partial structure, but I would like a more comprehensive guide/spec...
If there's nothing like that. Can we maybe discuss something that makes sense? 🤔
I want to announce a new version of the activitypub-federation crate. Over the last weeks I worked on major improvements to the usability and documentation. It now includes an extensive guide on getting started to implement federation from scratch, and also an example project which can directly be deployed to a server and federate with projects like Mastodon.
The library takes care of basic functionality like HTTP Signatures, activity sending, and fetching data from other servers. Application developers can focus on the main logic, and treat federation as another form of API. There is no restriction to the content being federated: you can implement a microblogging platform, link aggregator, video hosting site or any other type of social media. The goal is to encapsulate all basic functionality, so that developers can easily implement federation without any prior knowledge.
Using this library can help to share core Activitypub logic between different projects, so that the same code doesn’t have to be implemented and maintained separately by each project. This way improvements can benefit everyone. It also encourages the use of effective patterns to make Rust and Activitypub work together. All of this has been proven to work in Lemmy which uses this library and is the biggest Activitypub project written in Rust.
Seems really neat, basically the next.js but for rust. Based on sycamore, a web-ui library for rust.
Looks like it does well in the framework benchmarks too.
> This project aims at providing nightly builds of all official rust mdbooks in epub format. It is born out of the difficulty I encountered when starting my rust apprenticeship to find recent ebook versions of the official documentation.
> If you encounter any issue, have any suggestion or would like to improve this site and/or its content, please go to https://github.com/dieterplex/rust-ebookshelf/ and file an issue or create a pull request.
[Announcement on NixOS Discourse](https://discourse.nixos.org/t/nix-init-generate-nix-packages-from-urls-with-hash-prefetching-dependency-inference-license-detection-and-more)
- Hash prefetching powered by [nurl]
- Dependency inference for Rust packages using the [Riff](https://github.com/DeterminateSystems/riff) registry and python projects
- Interactive prompts with fuzzy tab completions
- License detection
- Supported builders
- `buildPythonApplication` and `buildPythonPackage`
- Supported fetchers
- All other fetchers supported by [nurl] are also supported, you just have to specify the tags manually
Usage: nix-init [OPTIONS] <OUTPUT>
<OUTPUT> The path to output the generated file to
-u, --url <URL> Specify the URL
-c, --config <CONFIG> Specify the config file
-h, --help Print help
-V, --version Print version
cross-posted from: https://group.lt/post/44860
> Developers across government and industry should commit to using memory safe languages for new products and tools, and identify the most critical libraries and packages to shift to memory safe languages, according to a study from Consumer Reports.
>The US nonprofit, which is known for testing consumer products, **asked what steps can be taken to help usher in "memory safe" languages, like Rust**, over options such as C and C++. Consumer Reports said it wanted to address "industry-wide threats that cannot be solved through user behavior or even consumer choice" and it identified "memory unsafety" as one such issue.
>The [report](https://advocacy.consumerreports.org/research/report-future-of-memory-safety/), Future of Memory Safety, looks at range of issues, including challenges in building memory safe language adoption within universities, levels of distrust for memory safe languages, introducing memory safe languages to code bases written in other languages, and also incentives and public accountability.
> While the memory safety and security features of the Rust programming language can be effective in many situations, Rust’s compiler is very particular on what constitutes good software design practices. Whenever design assumptions disagree with real-world data and assumptions, there is the possibility of security vulnerabilities–and malicious software that can take advantage of those vulnerabilities. In this post, we will focus on users of Rust programs, rather than Rust developers. We will explore some tools for understanding vulnerabilities whether the original source code is available or not. These tools are important for understanding malicious software where source code is often unavailable, as well as commenting on possible directions in which tools and automated code analysis can improve. We also comment on the maturity of the Rust software ecosystem as a whole and how that might impact future security responses, including via the coordinated vulnerability disclosure methods advocated by the SEI’s CERT Coordination Center (CERT/CC).
![Programming Languages Maturity](https://group.lt/pictrs/image/1b49ce7d-ea9f-43e1-a956-6924b9816017.png)
> Rust is a programming language that is growing in popularity. While its user base remains small, it is widely regarded as a cool language. According to the Stack Overflow Developer Survey 2022, Rust has been the most-loved language for seven straight years. Rust boasts a unique security model, which promises memory safety and concurrency safety, while providing the performance of C/C++. Being a young language, it has not been subjected to the widespread scrutiny afforded to older languages, such as Java. Consequently, in this blog post, we would like to assess Rust’s security promises.
![Rust Protection in Context, table](https://group.lt/pictrs/image/13ba6ce2-e8cd-4228-aa7a-37cab1cd10cb.png)