Comment by procaryote

Comment by procaryote 2 days ago

34 replies

The other direction might be more interesting, in case rust drops in popularity in a couple of years, leaving behind a bunch of "let's rewrite in rust" efforts

speedgoose 2 days ago

I am not convinced that anyone would take a working rust project and rewrite it in C. I don’t see any good reason to do so.

When rust will lose popularity, it is going to happen eventually, I would bet it’s in favour of a newer and more promising programming language. Not C.

  • VBprogrammer 2 days ago

    I think Rust has hit critical mass. It's now basically the default choice for something you want to perform well but want to be reasonably secure. For example, uv in the python ecosystem.

    • foldr 2 days ago

      If you read HN you might get that impression, but that vast majority of software that needs security and good performance is being written in Java.

      • dana321 2 days ago

        If you were building a programming language, would you write it in Java or Rust?

      • pjmlp 15 hours ago

        Alongside C# in more Microsoft influenced culture shops. :)

      • VBprogrammer a day ago

        I wouldn't be surprised if that was closer to the truth. A heck of a lot of boring software runs on the JVM. That said, it's a slightly different niche from command line tools.

    • m00dy 2 days ago

      Rust is the clear winner of the LLM era. With code generation being so effortless, why would you write in any other language?

      • pjmlp 15 hours ago

        The ultimate goal is for LLM replace languages, and directly perform tasks, why bother with Rust when we will be using agentic runtimes?

      • throawayonthe 2 days ago

        i don't use LLMs, but i've heard people complain current LLMs are not good at writing Rust

  • nacozarina 2 days ago

    new chips will always have a c compiler available long before anything else

    • Avamander 2 days ago

      I would assume that an LLVM backend is created for new chips and then C is not the only thing getting support. There's very little point in just supporting C in that sense.

    • pjmlp 15 hours ago

      Alongside a much safer C++ compiler.

      In 2025 there are hardly single language compiler toolchains being released.

      Also if the chip toolchain is based on a GCC or clang fork, there are several frontends to chose from.

    • nicoburns 2 days ago

      That doesn't seem to have been an issue for recent new CPU architectures. RISC-V has excellent Rust support for example.

      • camel-cdr 2 days ago

        Not really. Rust still doesn't support Arm SVE or RVV intrinsics.

  • ghthor 2 days ago

    Compile speed maybe the only one. But hopefully that keeps becoming less of a difference

whatpeoplewant 14 hours ago

Language popularity is cyclical; the hedge is to treat Rust as an implementation detail behind stable, language-agnostic boundaries (protocols, C ABI, WASM) and invest in strong tests/specs. If Rust wanes, migrate piecemeal: keep interfaces, reimplement modules elsewhere, and verify parity with property tests and benchmarks. Multi-agent, agentic LLM workflows can prototype alternatives in parallel, generate FFI/interop shims, and cross-check behavior to de-risk the swap without another “big rewrite.”

rererereferred 2 days ago

That would also help use Rust in platforms that only have a C compiler.

  • galangalalgol 2 days ago

    People have used mrustc like that to put rust on a c64. The number of targets that make sense from a word length perspective that aren't already supported by llvm are pretty small I think? You aren't going to compile rust to some fixed point dsp where a long is 48bits. The c anything is likely to generate won't compile in whatever odd not-quite-ansi c compiler the chip maker provides.

indigoabstract 2 days ago

That could be interesting. If some new language or tool appears that automatically figures out the correct lifetime and ownership of the resources in your program, people (might be the same people) will call for rewrites from Rust into the new language, as you would no longer have to assign memory ownership manually.