How good is LLVM in other languages other than C++? (In my case I'm interested in using Rust)

This page summarizes the projects mentioned and recommended in the original post on /r/ProgrammingLanguages

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
  • unlisp-llvm

    Compiler for a toy Lisp language

  • ante

    A safe, easy systems language

  • 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
  • rust

    Empowering everyone to build reliable and efficient software.

  • No, they wrote their own ad-hoc C bindings: https://github.com/rust-lang/rust/blob/master/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

  • inkwell

    It's a New Kind of Wrapper for Exposing LLVM (Safely)

  • I'm currently using the Inkwell bindings for Rust, which I've found actually pretty nice. In terms of generating LLVM IR, the C bindings (which is what Inkwell uses internally) can do anything you want them to (definitely not limited to trivial languages as someone else here said.) I'm even using the LLVM garbage collection infrastructure, with no problems (well, no problems in generating it; the LLVM GC infrastructure works pretty well but is sparsely documented, so actually writing a GC is fairly difficult, but it's doable). The C bindings are actually more stable than the C++ bindings (!), although not quite as stable as the textual IR format; but without the bindings you would have to write code to generate the IR yourself, the compiler would be slower as it must be emitted as text and then reparsed in a different process, and you would have less control over optimization.

  • molten

    An LLVM compiler for an ML-like language (written in Rust)

  • I managed to write an ocaml-like language compiler in Rust using llvm-sys (which uses the LLVM C API) without too much trouble. It may not be the fastest but it's fairly feature cobplete. The code is at https://github.com/transistorfet/molten

  • riju

    ⚡ Extremely fast online playground for every programming language.

  • You should check out https://riju.codes it's really not that hard to get any old language running there :). It's a couple config files. I managed to get my language hosted there and the maintainer was really helpful in the process https://riju.codes/claro

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

  • Best practices for AST design in Rust?

    1 project | /r/rust | 13 Mar 2023
  • Can rust be entirely written in rust and drop C usage in its code base ?

    7 projects | /r/rust | 7 Sep 2022
  • Aya Rust tutorial Part One

    1 project | dev.to | 9 May 2024
  • Moving your bugs forward in time

    4 projects | dev.to | 8 May 2024
  • Rust to .NET compiler – Progress update

    2 projects | news.ycombinator.com | 3 May 2024