Programming languages endorsed for server-side use at Meta

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • cxx

    Safe interop between Rust and C++

  • > Specifically, it lacks one fundamental thing: why.

    No, it's there. I can explain.

    They clearly mention that adding support for a new language is considerable effort - the language needs support for core libraries, security and privacy, developer experience etc. They also mention that a long tail of languages are "community supported", meaning the teams that use them support their own use cases.

    Let's look at it from the perspective of an infra team - let's say the ones maintaining the privacy aware database abstraction. That team has limited bandwidth so they can't support every language. They start with Hack support, because that's the biggest language. Then they add C++ support and build Python support "for free" on top of the C++ code. That's it, they've done their job.

    Now if a developer team wants access to the database, they're on their own. They need to come up with APIs to access these core abstractions. They implement it on their own, or they try to wrap the existing C++ libraries.

    This is the core philosophy - every team has the freedom to make their tech choices. Maybe in some cases the tech is compelling enough (like Haskell for a rule engine) that it's worth the investment to build those bindings. In other cases (like Go for networking tools), they might not need the bindings at all. But the important thing is that tech choices happen bottom up and not top down.

    Which also explains why Rust is now supported at Meta. Rust has a couple of advantages. Like Python, Rust can access C++ libraries with the appropriate bindings (https://cxx.rs). This reduced the friction for teams around the company to adopt Rust - the libraries they needed were mostly supported.

    This organic adoption led to leadership eventually considering if it made sense to make it "officially supported", meaning the burden of maintenance of Rust support would now by on each individual infra team. Clearly, they felt that Rust provided something that the other 3 languages didn't. That explains their decision.

    I hope that answered your question. The article isn't worthless. I would not criticise so harshly if I were you.

  • cinder

    Cinder is Meta's internal performance-oriented production version of CPython. (by facebookincubator)

  • Instagram is a huge Django app and unlike all the ML libraries, Django isn't highly optimized low-level code wrapped in Python, at least not by default. That's why Facebook are putting so much work into running a more performant fork of CPython - https://github.com/facebookincubator/cinder

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • duckling

    Language, engine, and tooling for expressing, testing, and evaluating composable language rules on input strings.

  • It also powers the backend of Wit.ai which FB owns. Wit's open-source entity parser, duckling, is written entirely in Haskell. https://github.com/facebook/duckling

  • autocxx

    Tool for safe ergonomic Rust/C++ interop driven from existing C++ headers

  • The areas you mentioned (CLI, web services, low level systems programming) are not mutually exclusive. Doing a good job on one doesn't mean something else is affected.

    The folks who worked on the most popular command line argument parser (https://docs.rs/clap/latest/clap/#example) made a positive contribution that didn't detract from any other use case.

    Similarly, the folks working on improving Rust for web services will also make it better for systems programming. In a blog post published today (https://blog.rust-lang.org/inside-rust/2022/07/27/keyword-ge...), they discuss keyword generics, a feature that will be equally helpful for `async` code and `const` functions evaluated at compile time.

    There is already some interoperability with C++ (http://cxx.rs) and ongoing research into automating this interoperability (https://github.com/google/autocxx, https://github.com/google/crubit). Feels like there's enough effort

  • crubit

  • The areas you mentioned (CLI, web services, low level systems programming) are not mutually exclusive. Doing a good job on one doesn't mean something else is affected.

    The folks who worked on the most popular command line argument parser (https://docs.rs/clap/latest/clap/#example) made a positive contribution that didn't detract from any other use case.

    Similarly, the folks working on improving Rust for web services will also make it better for systems programming. In a blog post published today (https://blog.rust-lang.org/inside-rust/2022/07/27/keyword-ge...), they discuss keyword generics, a feature that will be equally helpful for `async` code and `const` functions evaluated at compile time.

    There is already some interoperability with C++ (http://cxx.rs) and ongoing research into automating this interoperability (https://github.com/google/autocxx, https://github.com/google/crubit). Feels like there's enough effort

  • windows-rs

    Rust for Windows

  • You can have a look at its issues,

    https://github.com/microsoft/windows-rs

    Note the lack of of safe wrappers for Windows APIs, and still no good way to create the Windows Runtime objects necessary to interoperate with XAML.

    Also a note the basic examples with very little UI code on what is supposed to be a projection for a Windows UI framework.

  • httm

    Interactive, file-level Time Machine-like tool for ZFS/btrfs/nilfs2 (and even actual Time Machine backups!)

  • > I’m no expert but always saw Go as the better choice for CLI tooling where performance is important

    I'm no expert in golang, so golang may in fact be better(?) by some metric of better, but as the author of a Rust CLI tool[0], I will say that Rust is pretty fantastic at this use case, and it seems like a sweet spot to me.

    [0]: https://github.com/kimono-koans/httm

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

    Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.

  • Well, there is Slint in that case, from former Qt devs, but it is still pretty much early days.

    https://slint-ui.com/

  • drogon

    Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows

  • > How would one go about building a rest service in C++?

    I'd use https://github.com/drogonframework/drogon if the app needs to be pure C++ or Cutelyst (https://cutelyst.org/) if it's a Qt app which needs to expose an http server

  • Cutelyst

    A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.

  • > How would one go about building a rest service in C++?

    I'd use https://github.com/drogonframework/drogon if the app needs to be pure C++ or Cutelyst (https://cutelyst.org/) if it's a Qt app which needs to expose an http server

  • mirage

    MirageOS is a library operating system that constructs unikernels

  • OCaml has Mirage (https://mirage.io) for example, and ReasonML is just another syntax for the language.

  • vectorflow

  • >> Mozilla (of course)

    Mozilla is a c++ and javascript shop. What do they ship in Rust? How much of Firefox is written in rust for example?

    >> Microsoft, Meta, Google/Acrobat, Amazon

    Large firms have lots of devs and consequently lots of toy projects. Is their usage of rust more significant than their use of D? I mean Meta was churning out projects in D a while back (warp, flint, etc) and looked like it might be going all in at one point (they even hired one of the leads on D lang).

    >> That's practically all of FAANG

    Who were we missing? Netflix, they’ve dabbled with D too: https://github.com/Netflix/vectorflow

    Don’t misunderstand my point - it’s not that D is more popular than rust, it’s that rust is not used for real work in any significant capacity yet.

    Where’s the big project written in rust? Servo and the rust compiler are the only two large rust projects on github.

  • ugrep

    NEW ugrep 5.1: an ultra fast, user-friendly, compatible grep. Ugrep combines the best features of other grep, adds new features, and searches fast. Includes a TUI and adds Google-like search, fuzzy search, hexdumps, searches nested archives (zip, 7z, tar, pax, cpio), compressed files (gz, Z, bz2, lzma, xz, lz4, zstd, brotli), pdfs, docs, and more

  • ugrep has full SSE/AVX support

    https://github.com/Genivia/ugrep/blob/a3acf863803a755ff8da8c...

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