Skip to content

[Discussion] Blockers towards including Rust into monero codebase #9297

Open
@SyntheticBird45

Description

@SyntheticBird45

Why ?

@kayabaNerve proposal to implement the FCMPs over a Rust library, restarted the discussion of Rust being introduced into monero core. This discussion isn't about whether Rust should be integrated into monero but what are the blockers of doing so, if the team is willing to do so.

Blockers

Monero core introducing Rust into the codebase means introducing the necessary build tools. Interoperability between C++/Rust isn't necessarily an issue, as libraries exist for that purpose, and/or public functions can be defined by extern "C" fn, making it use the C API.

Targets

What haven't been discussed yet, are the build targets. Monero Core offers official releases/reproducible builds for: Windows (x86(_64)) MacOS (x86, ARM), Linux (x86(_64), ARMv7, ARMv8, RISC-V), Android (ARMv7, ARMv8), FreeBSD (x86_64)
And provide documentation for building on:
OpenBSD, NetBSD, Solaris

The rust compiler offers different Tiers of guarantees depending of which platform we wish to build for.

Tier 1 means it is officially supported, guaranteed to work.
Monerod targets falling into Tier 1:

  • i686-unknown-linux-gnu | x86 32-bit Linux (kernel 3.2+, glibc 2.17+)
  • x86_64-unknown-linux-gnu | x86 64-bit Linux (kernel 3.2+, glibc 2.17+)
  • aarch64-unknown-linux-gnu | ARMv8-A 64-bit Linux (kernel 4.1, glibc 2.17+)
  • i686-pc-windows-gnu | x86 32-bit MinGW (Windows 7+)
  • x86_64-pc-windows-gnu | x86 64-bit MinGW (Windows 7+)
  • x86_64-apple-darwin | x86 64-bit macOS (10.12+, Sierra+)

Tier 2 means it is officially supported, but only guaranteed to build. The Rust teams make no assumptions that the changes are scrutinized and some tests are not used. Bugs are possible and reports are welcome.
Monerod targets falling into Tier 2:

  • armv7-unknown-linux-gnueabihf | ARMv7-A (32 bit) hardfloat (kernel 3.2, glibc 2.17)
  • riscv64gc-unknown-linux-gnu | RISC-V Linux (64 bit) (kernel 4.20, glibc 2.29)
  • x86_64-unknown-freebsd | x86 64-bit FreeBSD
  • armv7-linux-androideabi | ARMv7-A (32 bit) Android
  • aarch64-linux-android | ARMv8-A (64 bit) Android

Tier 3 means the Rust codebase should work on these targets but the Rust project does not build or test them. There are no guarantees.
Monerod targets falling into Tier 3:

  • aarch64-unknown-openbsd | ARMv8-A (64 bit) OpenBSD
  • x86_64-unknown-openbsd | x86 (64 bit) OpenBSD
  • aarch64-unknown-netbsd | ARMv8-A (64 bit) NetBSD
  • x86_64-unknown-netbsd | x86 (64 bit) NetBSD
  • x86_64-pc-solaris | x86 (64 bit) Solaris

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions