Focus on learning Rust’s network resources
Use Rust to process signals
Signals are an important part of the process life cycle on Linux, but they are very complex and need to be used with great care. This article introduces one of the challenges of signal processing: signal processing limitations.
Unix signals are difficult to process
- They are a global resource. If a library wants to set up its own signal handlers, it may interfere with other libraries. It is possible to concatenate previous signal handlers, but this makes it impossible to remove the old signal handler from the concatenation chain in any practical way.
- They can be called from any thread and need to be synchronized. In addition, because they can interrupt a thread at any time, most processes are vulnerable to contention.
- According to POSIX standards, the functions that can be called in a signal handler are limited to a very small set of functions. It is important to note that mutual exclusion (or other locking mechanisms) and memory allocation and deletion are not allowed.
Signal-hook, a library that handles Unix signals correctly and securely, is also recommended to solve the above problem.
www.jameselford.com/blog/workin…
Rust Learning Video tutorial by Gitoxide author
Gitoxide is a pure Rust implementation of Git.
Learn Rust with Gitoxide Learn Rust with Gitoxide
Horcrux: Implementing Shamir Key Sharing in Rust (Part 1)
Horcrux: Implementing Shamir’s Secret Sharing in Rust (part 1)
As I mentioned in a previous blog post, Rust is an excellent programming language for implementing encryption algorithms due to features such as memory safety, strong typing, easy-to-use unit testing, and high performance.
Horcruxs is an example of a program designed to show how Rust can be used to implement the Shamir shared key algorithm, which is not currently available in production.
Starting with this blog post, the author will start with the basic mathematics and walk the reader through how to implement the Shamir shared key algorithm with Rust (the implementation of Rust will be explained in the next blog post, if you are interested).
Project address: github.com/gendx/horcr…
Talk to Jane, head of the Error Handling Team about Rust error handling
Rustacean Station PodCast House is a community project that offers podcasts. (Audio connection listening is also good).
- Rustacean-station.org/episode/047…
- Github.com/rustacean-s…
Experimental CXX application case: Rust binding for TouchDesigner
TouchDesigner is a visual node-like authoring tool that truly defines the realm of new media interaction. An important feature is that there are many API interfaces (some pre-set functions, simple understanding of the original hardware or software produced by different manufacturers can be used with TouchDesigner through THE API), so that it can realize convenient information exchange with almost all the hardware and software in the market). TouchDeisgner can control mechanical, sound, lighting, and real-time visual effects rendering, all of which are very wrong.
It’s an experimental library for now, but it’s a good case study.
Github.com/tychedelia/…
【 series 】 A circular reference structure in Rust
There are two types of self-referential problems in Rust: internal self-referential problems and external self-referential problems. This series of articles deals with the latter, circular referencing.
- Arunanshub. Hashnode. Dev/self – refere…
- Arunanshub. Hashnode. Dev/self – refere…
Rust excellent blog is recommended The first phase of the |fasterthanli.me/
There are so many great blogs in the Rust community right now that I thought it would be a good idea to do this column and recommend some great Rust learning blogs as a backup of learning resources.
The first issue featured Fasterthanli. me, written by Amos.
Boy, who grew up playing piano and legos in the 1990s, used Java and now uses Rust. For more information about him, please refer to fasterthanli.me/about
Why was he featured in the first issue? Because his articles are good. His blog posts are systematic and nuanced to get you thinking.
If you learn Rust, Amos’s blog is highly recommended: https://fasterthanli.me/
If you think of his article is of great help to you, can be properly supported his writing: www.patreon.com/fasterthanl…
Call Rust in Python
PyO3 makes it easy to call Rust code from Python. You can write a Rust library and rely on a combination of PyO3 and Maturin (a supporting tool for the PyO3 ecosystem) to compile the Rust library and install it directly as a Python module. In addition, PyO3 can convert types between Python and Rust, and easily export Rust functions to Python through a set of macros.
Saidvandeklundert.net/learn/2021-…
Life simulation
Life Simulation, a simulator written by Rust.
Organisms can evolve through mutation and natural selection. Living things have a simple genome that gives them unique characteristics.
The demo address
Making the address
How to write idiomatic Rust
Want to write more Idiomatic Rust? @Matthiasendler maintains a peer-reviewed project that includes articles, presentations, repos, all of which use Rust.
- Repo github.com/mre/idiomat…
How do Redox OS (and similar projects) plan to handle the lack of dynamic linking support?
A few days ago, I asked if anyone had any suggestions for distributing binaries other than CFFI, and people kept pointing me at various “hack “solutions, for which I was very grateful (although the hacks didn’t help in my particular case, CFFi still looks like the least bad solution).
One thing that surprised me, however, was that the idea (perhaps just perceived) of dynamic linking (or predictable ABI, as I thought it required) was opposed. There’s also the fact that almost no one cares about what I think is a huge hole in the system’s language design.
TL; DR:
Which got me thinking: how do Redox OS or similar projects (like the one released by u/dptzippy earlier today) plan to solve this problem? Surely they wouldn’t expect people to recompile the entire operating system after fixing bugs in some core library/cache, or what would they do? Or did I miss something?
* I said “predictable” not “stable” because we don’t need a fully stable ABI. Even just making sure that if I compile things with the same version of the compiler, if the public API stays the same, the common ABI helps a lot.
Today’s most popular post on Reddit, Rust, is:
Hi, I’m the author of Theseus operating system. Very good post, really consistent with the idea of my heart.
The lack of a stable ABI is a big hurdle that we have yet to fully address. This issue is particularly important for SAS/SPL operating systems based on secure languages like Theseus, especially given that our goal is to have the compiler visibility/instrospection of all code at all levels of the system without blind spots. Personally, I don’t think this is a problem for other operating systems that use system calls as a “stable” interface between user applications and the kernel, or more broadly as a “stable” layer of connection between two independently compiled pieces of code that depend on each other for execution. I documented my journey and thought process in implementing a tool to compile the out-of-tree Crate (and a liBC skeleton of various initiators) for an existing compilation instance of Theseus. This involves hack-like abuse of cargo, and I don’t necessarily recommend other use cases — in our limited case, it works because we can control everything compiled — but it’s pretty hard to deal with. It will most likely not scale to support distribution of closed source applications or libraries. Obviously, I realized that it would be silly and tedious to dynamically re-link symbols/dependencies in separately compiled binaries at run time that are statically linked at build time to correspond to the versions of these dependencies that exist in the actual running system instance. Please note that we haven’t had time to explore better options. I’m just Posting this to illustrate what people might need to do to solve the problem of a stable ABI.
The best “alternative” is basically what someone else suggested in the u/dptzippy post you linked to above — use some kind of Bindgen to create a thin FFI layer, exposing stable C ABI functions as stubs for Rust functions. However, there is a major downside to this, which is to introduce unnecessary unsafe factors here and there, which sort of goes against the whole goal of Theseus I mentioned above, because the unsafe factor is a blind spot.
Anyway, I just thought I’d get my thoughts out there, share my experiences here, keep the conversation going and see what other people have to say.
Read More: www.reddit.com/r/rust/comm…
Opencv is used in Rust
The author made a video on how to use OpencV in Rust.
Tubing video
What can Kotlin learn from Rust?
Even from Kotlin’s point of view, comparative studies are valuable.
www.beust.com/weblog/2021…
How to improve an overly restrictive Rust Library API
The article delves into a more generous upper level design based on generics, Dyn traits, Slice, and other facilities in Rust. Belong to the advanced article, worth learning.
Blog.logrocket.com/improving-o…
Develop ios applications using pure Rust
Belong to the verification type project, do ios development of children’s shoes can be studied.
Github.com/wooden-worm…
Monitor Rust Web applications using Prometheus and Grafana
Mainly some configuration and the corresponding code embedded, written in great detail. Recommend it.
Romankudryashov.com/blog/2021/1…
Neon – Uses Rust to create memory – and type-safe Node.js modules
Neon has many other reasons why Rust Embedding should be used in Node.js besides memory and type safety.
- Parallel programming and threading
- Performance is stronger
- Access operating system-specific libraries
- Access Rust’s ecosystem via Cargo
Levelup.gitconnected.com/create-memo…
Stack-safety for free?
An interesting article that demonstrates how Rust’s generator can be used to turn any recursive function into an iterative function with little to no code changes.
Stack-safety for free?
IDE and macro
We all enjoy the convenience of ides in our daily lives, but few of us implement the functionality.
In this article, we discuss the challenges that language servers face in supporting macros. This is interesting because macros are the hardest to crack for Rust’s Analyzer.
The original link
How did Inx use SymSpell to speed fuzzy search up to 5 times faster
This article introduces SymSpell, an incredible algorithm, and gives you an overview of how we implement it in LNX.
Chillfish8. Ghost. IO/fuzzy – searc…
The story of three Rust codebase
Is now a good time to use Rust?
The founding team at Convex (which was separated from DropBox) was to develop Magic Pocket (DropBox’s geographically distributed data storage system) using Rust, Nucleus (a rewrite of DropBox’s synchronization engine), An unlimited back-end designed for responsive application development needs). They are among the most heavily loaded rust-based systems in the world today.
The Founding team at Convex shared some of the benefits and trade-offs of using Rust. Highly recommended.
Blog. Convex. Dev/a – by Tate – of – t…
Uav photogrammetry attempts using Rust and machine learning
The article’s author took a picture of the tarp with a drone. Basic photogrammetry was used to estimate the area of the image, and machine learning was used to segment the tarpaulin in the image, resulting in a tarpaulin area of 3.86m2, while the actual area was 3.96m2 (error is about 4%). The whole pre-estimation method was implemented by Rust.
- Cmoran. Xyz/writing/adv…
Merge queues using Bors
Merge queues are an application that integrates with your version control system (this article focuses on Git and GitHub) and requires code changes to be merged atomically to ensure that the main branch always contains a fully tested version of the code. Many engineering teams and open source projects are introducing merge queues as part of their workflows. This article explores several reasons for using merge queues and describes how to set up Bors, the merge queue implementation used by Rust language projects.
- Kflansburg.com/posts/merge…
Implement Raft for the browser using Rust and WebRTC
WRaft was introduced. This is a WebrTc-based Raft implementation written in Rust for WebAssembly.
There are several demo applications on wraft0.eevans.co and the code is open source on GitHub. It was an interesting and challenging project, so I thought I would write a blog post about the experience as a kind of post-mortem.
eevans.co/blog/wraft/