dafny VS Rust-for-Linux

Compare dafny vs Rust-for-Linux and see what are their differences.

dafny

Dafny is a verification-aware programming language (by dafny-lang)

Rust-for-Linux

Adding support for the Rust language to the Linux kernel. (by Rust-for-Linux)
ReSharper is now available in VS Code and Cursor
ReSharper brings a professional toolset for C# developers backed by over 20 years of experience, enterprise-grade security, SOC 2 compliance, and the trust of companies worldwide.
www.jetbrains.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
dafny Rust-for-Linux
43 86
3,431 4,367
1.1% 0.5%
8.3 0.0
6 days ago 6 days ago
C# C
GNU General Public License v3.0 or later GNU General Public License v3.0 or later
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.

dafny

Posts with mentions or reviews of dafny. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2026-05-20.
  • There's Never Been a Better Time to Study Computer Science
    1 project | news.ycombinator.com | 25 May 2026
  • Learnings from 100K lines of Rust with AI (2025)
    2 projects | news.ycombinator.com | 20 May 2026
    It's a set of asserts that are a part of the type signature. Requires are asserts on the inputs, ensures are asserts on the outputs.

    Depending on your backend you either ignore them, check them all of the time, some of the time, or have SMT-solvers prove that if you uphold the first one all else must follow.

    If you're interested in the last one, have a look at Dafny[0]

    [0] https://dafny.org/

  • Vera: a programming language designed for machines to write
    5 projects | news.ycombinator.com | 29 Apr 2026
    > The signature declares types, preconditions, postconditions, and effects. The compiler verifies the contract via SMT solver.

    This reminds me of Dafny: https://dafny.org/

    Actually, that would be an interesting question: how good are LLMs at writing (correct) Dafny?

  • Dafny: Verification-Aware Programming Language
    1 project | news.ycombinator.com | 16 Dec 2025
  • Verified Ordered Set in Dafny
    1 project | dev.to | 14 Aug 2025
    In the world of software development, we spend countless hours writing tests to prevent bugs. But what if we could prove, with mathematical certainty, that our code is free of entire classes of errors? This is the promise of formal verification, and tools like Dafny are making it more accessible than ever.
  • Long division verified via Hoare logic
    1 project | news.ycombinator.com | 26 Feb 2025
    Automation of Hoare logic is quite good these days. Dafny, from MS Research (https://dafny.org), is probably the most friendly formal language. Dafny has been used to verify large systems, including many components of AWS. I am hoping that LLMs make more advanced languages, such as Liquid Haskell or Agda, much easier to write. Ideally, lots of code should be autocompleted once a human provides a type signature. The advantage of formal verification is that we are sure the generated code is correct.
  • Automated reasoning and generative AI: Harness creativity with formal verifications
    2 projects | dev.to | 28 Jan 2025
    Modern software verification employs various approaches, each offering different trade-offs between ease of use and strength of guarantees. AWS contributes to the open source program verification tools used in the previous examples. Dafny and Kani represent two powerful approaches to program verification. Let's see how they work in practice before connecting the dots between automated reasoning and generative AI.
  • Playing Chess with 84,688 Regular Expressions
    6 projects | news.ycombinator.com | 6 Jan 2025
    On that note, I discovered Dafny[1] recently, as a more accessible way to program with proofs. There's a companion book[2] that seems very accessible and down-to-earth (and, unfortunately, quite expensive). I didn't have the time to play with it yet, but it looks like it does what Ada/SPARK does (and more), but with less verbose syntax and more options for compilation targets. It seems to be actively developed, too. Personally, I had a very hard time getting into Coq, which is a proof assistant more than a programming environment - Dafny seems much more welcoming for a "working programmer" :)

    [1] https://dafny.org/

    [2] https://mitpress.mit.edu/9780262546232/program-proofs

  • F*: A proof oriented general purpose programming language
    5 projects | news.ycombinator.com | 25 Dec 2024
    https://dafny.org/ also allows proof checking and allows do write real programs with it. It has a java like syntax and is also from MS I believe
  • Safer with Google: Advancing Memory Safety
    2 projects | news.ycombinator.com | 16 Oct 2024
    > I do think there's a bit of the Ignaz Semmelweis[1] issue at hand here, where developers want to believe in their inherent quality and refuse processes that improve safety if it goes against their worldview

    I think the problem is that other variables (not only safety) must be assessed beyond the pure "better". Haskell is very good also. Very correct. Who uses that, and where? And why? Why not everyone uses https://dafny.org/ ?

Rust-for-Linux

Posts with mentions or reviews of Rust-for-Linux. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-12-09.
  • The end of the kernel Rust experiment
    18 projects | news.ycombinator.com | 9 Dec 2025
  • Upcoming Rust language features for kernel development
    9 projects | news.ycombinator.com | 16 Oct 2025
  • Rewriting Rust
    23 projects | news.ycombinator.com | 25 Sep 2024
  • Committing to Rust in the Kernel
    3 projects | news.ycombinator.com | 24 Sep 2024
    You're welcome.

    > Any concerns of the same kind of thing?

    Here's the canonical list: https://github.com/Rust-for-Linux/linux/issues/2

    There's a lot, and I don't know the status of many of them, personally. But I don't see anything there that I know is not gonna work out, like for example, they aren't using specialization. Most of it feels like very nuts and bolts codegen options and similar things.

    That said, back in August, the Rust Project announced their goals for the second half of this year: https://blog.rust-lang.org/2024/08/12/Project-goals.html

    They say that they're committed to getting this stuff done, and in particular: https://rust-lang.github.io/rust-project-goals/2024h2/rfl_st...

    > Closing these issues gets us within striking distance of being able to build the RFL codebase on stable Rust.

    So, things sound good, in my mind.

  • Deploying Rust in Existing Firmware Codebases
    3 projects | news.ycombinator.com | 5 Sep 2024
    The goal of rust for linux isn't to wholesale translate linux into rust, but simply to be able to write pieces of linux (largely new ones) in rust. I think it's very unlikely anyone (including google) will take on a wholesale translation anytime soon. That said

    > It's unlikely that Google has much sway here

    Google has helped fund the rust for linux project pretty much from the start [1], they're one of three organizations mentioned on the homepage due to their sponorship [2]. They're actively involved in it, and have already ported their android "binder" driver into it with the intent to ship it in android. This strikes me as a very weird take.

    [1] https://www.memorysafety.org/blog/supporting-miguel-ojeda-ru...

    [2] https://rust-for-linux.com/

  • Rust for Linux
    1 project | news.ycombinator.com | 24 Jun 2024
  • The Linux Kernel Prepares for Rust 1.77 Upgrade
    9 projects | news.ycombinator.com | 18 Feb 2024
    Rust is backwards compatible when you stick to stable features, but the kernel uses unstable features that can and do incur breaking changes.

    https://github.com/Rust-for-Linux/linux/issues/2

  • Rust in Linux Kernel
    1 project | /r/ThePrimeagenReact | 8 Oct 2023
  • Mark Russinovich: “Working towards enabling Windows driver development in Rust”
    7 projects | news.ycombinator.com | 23 Sep 2023
    > How would this work?

    Don't know exactly what you're asking.

    > And why would it be a better idea?

    Poorly written device drivers are a significant attack vector. It's one of the reasons Linux is now exploring using Rust for its own device drivers.[0] You may be asking -- why Rust and not some other language? Rust has many of the performance and interoperability advantages of C and C++, but as noted, makes certain classes of memory safety issues impossible. Rust also has significant mindshare among systems programming communities.

    [0]: https://rust-for-linux.com

  • The Linux Kernel Module Programming Guide
    2 projects | news.ycombinator.com | 1 May 2023

What are some alternatives?

When comparing dafny and Rust-for-Linux you can also consider the following projects:

tlaplus - TLC is a model checker for specifications written in TLA+. The TLA+Toolbox is an IDE for TLA+.

rustig - A tool to detect code paths leading to Rust's panic handler

FStar - A Proof-oriented Programming Language

jakt - The Jakt Programming Language

koka - Koka language compiler and interpreter

shake - Shake build system

ReSharper is now available in VS Code and Cursor
ReSharper brings a professional toolset for C# developers backed by over 20 years of experience, enterprise-grade security, SOC 2 compliance, and the trust of companies worldwide.
www.jetbrains.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured

Did you know that C# is
the 11th most popular programming language
based on number of references?