From 1d7e443bca5f9f03370e244f069083a045e029e9 Mon Sep 17 00:00:00 2001 From: Japabu Date: Mon, 27 Jul 2026 17:19:59 +0200 Subject: [PATCH] Add ToyOS operating system ToyOS is an operating system written from scratch in Rust, targeting x86-64 (https://github.com/Japabu/toyos). It uses the standard System V calling convention on x86-64, so it is registered alongside the other SysV platforms in default_calling_convention(). Co-Authored-By: Claude Fable 5 --- src/targets.rs | 3 +++ src/triple.rs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/targets.rs b/src/targets.rs index 5cc5c2d..28746a1 100644 --- a/src/targets.rs +++ b/src/targets.rs @@ -745,6 +745,7 @@ pub enum OperatingSystem { Openbsd, Psp, Redox, + Toyos, Solaris, SolidAsp3, TvOS(Option), @@ -808,6 +809,7 @@ impl OperatingSystem { Openbsd => Cow::Borrowed("openbsd"), Psp => Cow::Borrowed("psp"), Redox => Cow::Borrowed("redox"), + Toyos => Cow::Borrowed("toyos"), Solaris => Cow::Borrowed("solaris"), SolidAsp3 => Cow::Borrowed("solid_asp3"), TvOS(deployment_target) => darwin_version("tvos", deployment_target), @@ -1664,6 +1666,7 @@ impl FromStr for OperatingSystem { "openbsd" => Openbsd, "psp" => Psp, "redox" => Redox, + "toyos" => Toyos, "solaris" => Solaris, "solid_asp3" => SolidAsp3, "uefi" => Uefi, diff --git a/src/triple.rs b/src/triple.rs index 6b10f04..5f18605 100644 --- a/src/triple.rs +++ b/src/triple.rs @@ -143,7 +143,8 @@ impl Triple { | OperatingSystem::Netbsd | OperatingSystem::Openbsd | OperatingSystem::Redox - | OperatingSystem::Solaris => CallingConvention::SystemV, + | OperatingSystem::Solaris + | OperatingSystem::Toyos => CallingConvention::SystemV, OperatingSystem::Windows => CallingConvention::WindowsFastcall, OperatingSystem::Zos => CallingConvention::ZosXplink64, OperatingSystem::Nebulet