nrf-hal VS zig

Compare nrf-hal vs zig and see what are their differences.

zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software. (by ziglang)
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
nrf-hal zig
5 852
516 36,205
1.7% 2.9%
8.6 10.0
about 2 months ago 5 days ago
Rust Zig
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.

nrf-hal

Posts with mentions or reviews of nrf-hal. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-06.

zig

Posts with mentions or reviews of zig. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-01-10.
  • Flattening ASTs (and Other Compiler Data Structures)
    4 projects | news.ycombinator.com | 10 Jan 2025
    Zig compiler pipeline (AST, Zir, Air, Sema) does exactly this on all layers. Not only contiguous, but instead of array-of-structs it is struct-of-arrays, so walking the tree is even more cache friendly. For AST see: https://github.com/ziglang/zig/blob/master/lib/std/zig/Ast.z...
  • I Wrote a Game Boy Advance Game in Zig
    4 projects | news.ycombinator.com | 30 Dec 2024
    Yes, please read the comment linked at the issue description: https://github.com/ziglang/zig/issues/16270#issuecomment-161...
  • When Zig Is Safer and Faster Than Rust
    5 projects | news.ycombinator.com | 30 Dec 2024
    A few notes:

    1) Lack of a garbage collector does not make your program faster, it makes the performance more easily predictable in terms of latency.

    It also makes it more friendly for memory bandwidth, CPU cache and to overall memory usage, which in turn results in better performance in real-case scenarios vs synthetic/toy benchmarks. This is particularly noticeable in constrained environments (like embedded systems).

    2) Zig was never about memory safety, and it is not a memory-safe language.

    It might have better plumbing than C, it might add better way to implement and abstract concepts.. but so does C++, for instance.

    The more striking differences between C++ and Zig, IMHO, are syntax and the ability to use the same language instead of a separate one to do meta-programming (templates vs comptime).

    3) Aliasing enforcement in Rust is there for a reason.

    Two examples I quickly found on Zig's issue tracker:

    https://github.com/ziglang/zig/issues/3696

  • Enum of Arrays
    3 projects | news.ycombinator.com | 21 Dec 2024
    I'll tell you my experience with Zig. I don't have any. I saw maybe Primagen talking about it and I see your post here. I watched 10 minutes of your vimeo video. I see it has 30k+ stars on github. So now I have to try to understand it in a nutshell.

    First like any language, I go to indeed.com and put in "Zig" to see if there are any jobs listed which use it. I don't see any.

    Then I click to https://ziglang.org/ and it describes Zig as "robust, optimal and reusable". Well that doesn't really say much of anything.

    I read the example listed, which appears to be a test case, and I wonder how the 'try' mechanism works without a 'catch'

    Then I go to https://ziglang.org/documentation/master/ and see that it says:

  • Zon – object notation like JSON in Zig
    1 project | news.ycombinator.com | 28 Nov 2024
  • Linux Syscall Support
    1 project | news.ycombinator.com | 7 Nov 2024
  • Zig is everything I want C to be
    2 projects | news.ycombinator.com | 22 Oct 2024
    > will that function also get to return a u8?

    No, the main function (the entry point of the entire program) is special cased. Have a look at the source code. There you can see the it's calling the user defined main function and handling its return value / error.

    https://github.com/ziglang/zig/blob/2d888a8e639856e8cb6e4c6f...

    > Also, what happened to argv/argc?

    You can access argv with std.os.argv which is a slice of null terminated strings. It's better to go with std.process.argsAlloc though (requires an allocation but works on all supported platforms).

  • Introduction to Zig (a project-based book)
    2 projects | news.ycombinator.com | 21 Oct 2024
    I'm a bit hesistant to mentally invest in Zig, given the maintainers choice to directly develop against a mostly undocumented NT-API instead of the Win32 API.

    [1]: https://github.com/ziglang/zig/issues/1840

  • Huly – Open-Source All-in-One Project Management Platform
    13 projects | news.ycombinator.com | 13 Oct 2024
    Interestingly, Huly is also the sponsor of the Zig programming language[1].

    [1]: https://ziglang.org/

  • Pledging $300k to the Zig Software Foundation
    6 projects | news.ycombinator.com | 1 Oct 2024
    > And there's also the aliasing issue

    Plans to address this were shared just last week: https://github.com/ziglang/zig/issues/5973#issuecomment-2380...

What are some alternatives?

When comparing nrf-hal and zig you can also consider the following projects:

embassy - Modern embedded framework, using Rust and async.

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).

ziglings - Learn the Zig programming language by fixing tiny broken programs.

Odin - Odin Programming Language

drogue-device - A distribution of tools and examples for building embedded IoT applications in Rust

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

nrf-softdevice

ssr-proxy-js - A Server-Side Rendering Proxy focused on customization and flexibility!

zephyr - Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.

rust - Empowering everyone to build reliable and efficient software.

riscv-rust-quickstart - A template for building Rust applications for HiFive1 boards

go - The Go programming language

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured

Did you konow that Rust is
the 5th most popular programming language
based on number of metions?