Will Hare replace C? Or Rust? Or Zig? Or anything else?

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • gccrs

    GCC Front-End for Rust

  • Besides the standard llvm-based compiler, I know of at least two others:

    https://github.com/Rust-GCC/gccrs

    https://github.com/thepowersgang/mrustc

  • mrustc

    Alternative rust compiler (re-implementation)

  • Besides the standard llvm-based compiler, I know of at least two others:

    https://github.com/Rust-GCC/gccrs

    https://github.com/thepowersgang/mrustc

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • dmd

    dmd D Programming Language compiler

  • I am surprised D isn't mentioned here. It seems to have found the right balance between C and Python / C++ ( https://dlang.org/ ). I've been exploring some "lower level" language alternatives to C, and find that D, Ada and Pascal (FPC / Lazarus) hold more appeal to me than many of these new languages.

  • FFmpeg-Builds

  • libav:

    On Windows: download shared from here(1), unzip anywhere. Right click on the project, select "Project settings" (IIRC) then point to .libs you want to use (or add them all), add include path (ffmpeg/include). Done.

    On linux (Qt): install with apt-get. Point to libs, add include path (in the .pro file).

    The only complication is that you have to wrap the #includes with extern "C" {} if you are on C++.

    I did it for both platforms the other day and it works. Super easy.

    Cross-compile: on Qt you do it through packs you select at install stage. Sometimes it requires the runtime to be installed (like for Android) but it's not complicated.

    On VS, I don't know. I use it for Windows applications.

    On Arduino: select your board from the menu. Also, installing libraries is done through a menu. Pulled from online resources automatically.

    But I guess I will not convince you. You'll come up with another challenge.

    (1) https://github.com/BtbN/FFmpeg-Builds/releases

  • rust-ffmpeg

    Safe FFmpeg wrapper.

  • Really? It really seems more complicated than that.........

    https://github.com/zmwangx/rust-ffmpeg/wiki/Notes-on-buildin...

    And "Install FFmpeg (complete with headers) through any means, e.g. downloading a pre-built "full_build-shared".

    Come on...

  • nomicon

    The Dark Arts of Advanced and Unsafe Rust Programming

  • I think Rust kinda has a marketing problem: the myth that "Writing in Safe Rust automatically makes your code memory-safe". It doesn't (well, it does most of the time but it isn't guaranteed), but it rather defers the responsibility to other low-level system programmers writing Unsafe code behind the scenes. And oh boy they have a fuckton of responsibility... Stacked Borrows along with various sanitizers can help when writing unsafe code, but it isn't perfect. I highly recommend anyone trying out Rust for the safety guarantees to take a look at the Rustonomicon (https://doc.rust-lang.org/nomicon/), which debunks a lot of the misconceptions around safe/unsafe Rust.

    In an ideal la-la land world, there exists an abstract interpreter that can consume safe Rust code and does not enforce any contracts upon the programmer (and hence will never have any undefined behavior). However, real world hardware definitely has contracts which developers have to obey (manually! because of the constraints of actual semiconductor physics! no compiler hand-holding here!). And on top of that all major OSes (Windows, MacOS, Linux) are written in C (so you need unsafe FFI to interact with the OS).

  • FrameworkBenchmarks

    Source for the TechEmpower Framework Benchmarks project

  • https://www.techempower.com/benchmarks/

    js actually beats Golang on metrics if you're aiming for synthetic "web" performances.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • cargo-generate

    cargo, make me a project

  • Currently, it has two built-in ones for `cargo new` and `cargo init` (--bin and --lib) and there are third-party tools like `cargo generate` which provide for more, but they haven't accepted anything into the main distribution yet.

    https://github.com/cargo-generate/cargo-generate

  • cross

    “Zero setup” cross compilation and “cross testing” of Rust crates

  • What is currently missing from https://github.com/cross-rs/cross ?

  • rfcs

    RFCs for changes to Rust

  • Ahh, the dynamic linking thing.

    To some extent, I see that more as "Distros have ossified around the workflows and tooling that is essentially 'a third-party package manager like Conan for C++, but for C'".

    How do you deal with the same monomorphization problems in C++ libraries? See https://blogs.gentoo.org/mgorny/2012/08/20/the-impact-of-cxx...

    How do you deal with vendored single-header libraries and bespoke implementations brought about by C's lack of a cross-distro, cross-platform dependency handling story? You generally don't.

    https://wiki.alopex.li/LetsBeRealAboutDependencies#gotta-go-...

    As that article points out, Rust's approach to package management allows things to be shared between projects which, in practice, don't get shared between C projects.

    With Crates.io not allowing existing crate versions to have their contents modified and Cargo.lock providing a SHA256-verified record of the exact dependencies your project used, you've got a record of what build dependency versions went into your package, which can be used by tools like `cargo audit`.

    Yes, it means that you need tooling to automate rebuilding the binaries whenever they're statically linked but, as Michał Górny pointed out in 2012, that's already necessary with libraries that use C++ templates and, as was said in "Let's Be Real About Dependencies", "On the flip side, I wonder how many times vlc’s XML parser has been fuzzed?"

    While it's slow going, discussion and an experimental prototype do exist for embedding full dependency versioning information inside Rust binaries to further help that approach: https://github.com/rust-lang/rfcs/pull/2801

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Any alternate Rust compilers?

    10 projects | /r/rust | 10 Apr 2023
  • Rust vs. Haskell

    4 projects | news.ycombinator.com | 14 Feb 2023
  • Aya Rust tutorial Part One

    1 project | dev.to | 9 May 2024
  • Why Does Windows Use Backslash as Path Separator?

    4 projects | news.ycombinator.com | 24 Apr 2024
  • I hate Rust (programming language)

    1 project | news.ycombinator.com | 22 Apr 2024