signal-hook
rust
Our great sponsors
signal-hook | rust | |
---|---|---|
4 | 2184 | |
557 | 77,440 | |
- | 2.1% | |
4.2 | 10.0 | |
3 days ago | about 19 hours ago | |
Rust | Rust | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
signal-hook
-
How to do graceful shutdown in rust for cli programs?
After few hours of search, I found signal-hook. The issue now is it will not kill process immediately, instead it will wait until the sleep function is done.
If you're interested in the techniques people use here, you might take a look at signalfd - which gives you a way to read signals as-if through a file pipe (so you can use it with things like select/epoll loops) - or signal-hook's implementation of the signal-pipe pattern (which makes use of the fact that write is on the list of async-signal-safe system calls).
rust
-
The Technology Behind GitHub's New Code Search
Today I learned of Simon Sapin's WTF-8 encoding for UTF-16 text containing invalid codepoints. (Rust source)
- I Use C When I Believe in Memory Safety
-
Why the slow compile times?
I wanted to comment on this a little. The Rust team have gone out of their way to keep Rust's grammar easy to parse! A good example is the turbofish, ::<>, which is used with generics. This PR shows an example of why it's necessary, which lead to the creation of the infamous Bastion of the Turbofish.
-
I wrote a library to expand byte string literals for pattern matching
The pattern matching is cool! Also, it looks like there's a concat_bytes!() in nightly (issue here) if concatenation is all you need (when it stabilizes or if you're on nightly).
-
I ❤️ PEG
Rust lexer, still no regex.
-
How to be able to contribute to languages/compilers?
A huge part of it is working on a compiler that's written in a language that helps avoid mistakes. Even when I was doing C++ regularly I never even tried diving into Clang, because I "knew" I'd be in a mess of complicated manual stuff that I was sure I'd break somehow. But with Rust, I first did a trivial compiler change https://github.com/rust-lang/rust/pull/42275/files#diff-3675ead66a843fefc1a0ac141fac8adeac7899e87979e79d2b4cd2dddd11c2b2, and that was non-terrible enough that I tried a slightly bigger change https://github.com/rust-lang/rust/pull/46264/files#diff-265ef672b5d778c5debaca696bc903a604165df54c44ea4bff07a2369b92e90d, and while I'm far from an expert on the compiler, now I can just go add stuff https://github.com/rust-lang/rust/pull/96376 and it's no big deal.
- Show HN: Mass Dissent – Easily send a letter to U.S. Congress representatives
-
"My Reaction to Dr. Stroustrup’s Recent Memory Safety Comments"
ICE's are not something C++ exclusive. Plenty of that in rustc. That fact that you hit that while working with C++ is unfortunate, but it could be your experience with Rust as well. The only difference would be Rust's faster cadence and more open community/process so there'd be a chance your issue would be fixed in the next 6-12 weeks.
-
Stop Comparing Rust to Old C++
The partial borrow issue is from a desire to assign names to tuple indices so you can access elements without sensitivity to their order. Without that, any change to the arrangement of components in an ECS archetype would affect downstream code attempting to query-iterate those tuples. Ideally I would use an intermediate struct, but as I discovered over the course of this project, rustc/LLVM aren't great about converting between tuples and structs. The only way to be sure you're not taking a perf hit would be to use a code-generated trait to rename the tuple fields, but you can't do that because traits don't give you direct field access and you can't partial borrow from function access.
There are three. The official one, mrustc (no borrow checker, but can essentially compile the official rustc) and GCC (can't really compile anything substantial yet). Only rustc is production-ready though.
What are some alternatives?
carbon-lang - Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
Elixir - Elixir is a dynamic, functional language designed for building scalable and maintainable applications
rust-analyzer - A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer]
Odin - Odin Programming Language
scala - Scala 2 compiler and standard library. For bugs, see scala/bug
mimalloc - mimalloc is a compact general purpose allocator with excellent performance.
go - The Go programming language
Rustup - The Rust toolchain installer
spaCy - 💫 Industrial-strength Natural Language Processing (NLP) in Python
AutoHotkey - AutoHotkey - macro-creation and automation-oriented scripting utility for Windows.