How can I compile rust for 16bit x86 (Intel 8086)?

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

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
  1. llvm-mos

    Port of LLVM to the MOS 6502 and related processors

    You could look at LLVM-MOS, the port of LLVM to the 6502. It might give you some ideas around the problems to solve https://llvm-mos.org/wiki/Welcome https://github.com/llvm-mos/llvm-mos

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. rv51

    A RISC-V emulator for the 8051 (MCS-51) microcontroller.

    One (hacky) way to target CPUs not supported by Rust/LLVM, is to write emulator in language that works on that target (C/Asm) of a platform that rust can compile to. For example, someone made Rust work on 8051 by writing Risc-V emulator in 8051 assembly: https://github.com/cyrozap/rv51

  4. rusty-dos

    A Rust skeleton for an MS-DOS program for IBM compatibles and the PC-98, including some PC-98-specific functionality

    I assume that's what rusty-dos is using, given this bit from the README:

  5. gcc-ia16

    Fork of Lambertsen & Jenner (& al.)'s IA-16 (Intel 16-bit x86) port of GNU compilers ― added far pointers & more • use https://github.com/tkchia/build-ia16 to build • Ubuntu binaries at https://launchpad.net/%7Etkchia/+archive/ubuntu/build-ia16/ • DJGPP/MS-DOS binaries at https://gitlab.com/tkchia/build-ia16/-/releases • mirror of https://gitlab.com/tkchia/gcc-ia16

    or GCC IA 16 (https://github.com/tkchia/gcc-ia16) gets someday mainlined (also a multi month/years project) and then gccrs can maybe use it as backend

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

  • LLVM-MOS 6502 Compiler Backend: Having a Blast in the Past

    1 project | /r/beneater | 15 Nov 2023
  • Explaining my fast 6502 code generator

    3 projects | news.ycombinator.com | 24 Mar 2023
  • A Graphical OS for the Atari 8-bit

    3 projects | news.ycombinator.com | 14 Jul 2022
  • Recursion kills: The story behind CVE-2024-8176 in libexpat

    2 projects | news.ycombinator.com | 14 Mar 2025
  • I'm sorry honey, it's just not working out. Our relationship worked when we were younger, but we're both older now and we've grown apart. This issue is to fully eliminate LLVM, Clang, and LLD libraries from the Zig project.

    3 projects | /r/programmingcirclejerk | 29 Jun 2023