rust
zig
rust | zig | |
---|---|---|
2,844 | 896 | |
104,363 | 39,460 | |
1.2% | 1.7% | |
10.0 | 10.0 | |
1 day ago | 7 days ago | |
Rust | Zig | |
GNU General Public License v3.0 or later | MIT License |
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.
rust
-
Building an iOS App with Rust Using UniFFI
Rust: Install it from the official Rust website.
- rlox: A Rust Implementation of “Crafting Interpreters” – Scanner
- 🏳️⚧️ Pride Hero: LGBTQ+ Landing Page for WASM Frameworks
-
Why I'm excited about Go for agents
> Lack of proper enums is hurting so much I can't describe it.
Do you mean sum types? Its enums function just pretty much like enums in every single other language under the sun. If anything, Go enums are more advanced than most languages, allowing things like bit shifts. But at the heart of it all, it's all just the same. Here are enum implementations in both Go and Rust:
[Go] https://github.com/golang/go/blob/f18d046568496dd331657df4ba...
[Rust] https://github.com/rust-lang/rust/blob/40daf23eeb711dadf140b...
While Go leans on the enumerator value produced by `range`, while Rust performs explicit incrementing, the outcome is no different — just plain [n=0, n++].
- 🏳️🌈 Pride RS: LGBTQ+ Flag Component for Rust Frontends
-
Low-Level Optimization with Zig
> Rust ran into places where they're like "infinite loop please" and LLVM says "Aha, C++ says those never happen, optimising accordingly" but er... that's the wrong language
Worth mentioning that LLVM 12 added first-class support for infinite loops without guaranteed forward progress, allowing this to be fixed: https://github.com/rust-lang/rust/issues/28728
- 🦸 Hero: WASM-Ready Hero Section Components
-
Why Use Structured Errors in Rust Applications?
Yeah I agree - in fact I ran into this very issue only hours ago. The entire error message was literally "operation not supported on this platform". Yeay.
https://github.com/rust-lang/rust/issues/141854
> I'll also note that this was quite annoying to debug since the error message in its entirety was `operation not supported on this platform`, you can't use RUST_BACKTRACE, rustfmt doesn't have extensive logging, and I don't fancy setting up WASM debugging. I resorted to tedious printf debugging. (Side rant: for all the emphasis Rust puts on compiler error messages its runtime error messages are usually quite terrible!)
Even with working debugging it's hard to find the error since you can't set a breakpoint on `Err()` like you can with `throw`.
- 🧭 Browser RS: A Wasmy Browser Frame Component
-
Rust + Web3 For All Your Backend Code
Rust Programming Language
zig
-
Bzip2 crate switches from C to 100% rust
This list's Zig as an entry, despite the Zig project having very clear plans[0] for a 1.0 release. That's not 0ver, it's just the beta stage of semver.
[0] https://github.com/ziglang/zig/milestone/2
-
Show HN: Dk – A script runner and cross-compiler, written in OCaml
I usually structure teaching the same way done in https://www.writethedocs.org/videos/eu/2017/the-four-kinds-o.... So "the Quick Walkthrough Guide will explain what dk scripts are and give you small examples to run" is simply a learning-oriented tutorial which is mostly about giving students confidence and visual feedback. And simultaneously it an explanation of nothing (the video has a great explanation for why to do that). So, I agree that an explanation of threads + Internet + cross-compilation would quite nuts, but for an experienced developer I'd expect to see a meaty example (take a look at https://ziglang.org/ for comparison).
One concrete action may be to make two distinct Quick Start guides ... one for the experienced and one for the inexperienced students though. Is that your thinking?
- Zig Devlog: Self-Hosted x86 Back End Is Now Default in Debug Mode
-
Low-Level Optimization with Zig
> I feel like I can write powerful code in any language, but the goal is to write code for a framework that is most future proof, so that you can maintain modular stuff for decades.
I like Zig a lot, but long-term maintainability and modularity is one of its weakest points IMHO.
Zig is hostile to encapsulation. You cannot make struct members private: https://github.com/ziglang/zig/issues/9909#issuecomment-9426...
Key quote:
> The idea of private fields and getter/setter methods was popularized by Java, but it is an anti-pattern. Fields are there; they exist. They are the data that underpins any abstraction. My recommendation is to name fields carefully and leave them as part of the public API, carefully documenting what they do.
You cannot reasonably form API contracts (which are the foundation of software modularity) unless you can hide the internal representation. You need to be able to change the internal representation without breaking users. I hope Zig reverses this decision someday and supports private fields.
-
Why Use Structured Errors in Rust Applications?
> Did Zig really do that?
https://github.com/ziglang/zig/issues/544#issuecomment-61807...
> In order to simplify everything, tabs are not allowed. Spaces are necessary; we can't ban spaces.
They seem to be open to the alternative but not to a solution that isn't forced on people:
> Maybe someday, we'll switch to tabs for indentation, spaces for alignment and make it a compile error if they are incorrectly mixed
Zig already has a builtin code formatter that automatically changes formatting to their preference, but that's not enough.
-
A new language inspired by Go
Zig solved this by not having a string type at all and not shipping full Unicode support in std: https://github.com/ziglang/zig/issues/234#issuecomment-27630....
- Learning C3 (As a Zig User)
-
What is Bun? The Node.js Alternative Explained
Bun is written from scratch in Zig, a low-level language focused on performance and safety. Instead of using V8 (the engine behind Node and Deno), Bun runs on JavaScriptCore, the engine used in Safari. This choice helps it stay fast and efficient, both in terms of memory and startup time.
- Convince OpenBSD developers to allow an executable get the path to itself (2020)
-
Using unwrap() in Rust is Okay (2022)
> We discussed this in the meeting today and decided that we'll start by changing all => unreachable to => return error.Unexpected in std.posix and std.os.
https://github.com/ziglang/zig/issues/6389#issuecomment-2895...
What are some alternatives?
carbon-lang - Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
ssr-proxy-js - A Node.js tool for Server-Side Rendering (SSR) and Static Site Generation (SSG) using headless Chrome via Puppeteer
Odin - Odin Programming Language
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).
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io