• themoken@startrek.website
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    edit-2
    3 days ago

    Rust can create native binaries but I wouldn’t call it close to the metal like C. It’s certainly possible to bootstrap from assembly to Rust but, unlike C, every operation doesn’t have a direct analog to an assembly operation. For example Rust needs to be able to dynamically allocate memory for all of its syntax to be intact.

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      6
      ·
      3 days ago

      For example Rust needs to be able to dynamically allocate memory for all of its syntax to be intact.

      Hmm, you got an example of what you mean?

      Rust can be used without allocations, as is for example commonly done with embedded.
      That does mean, you can’t use dynamically sized types, like String, Vec and PathBuf, but I wouldn’t consider those part of the syntax, they’re rather in the std lib…