Skip to content

Add ToyOS operating system - #134

Open
Japabu wants to merge 1 commit into
bytecodealliance:mainfrom
Japabu:add-toyos-os
Open

Add ToyOS operating system#134
Japabu wants to merge 1 commit into
bytecodealliance:mainfrom
Japabu:add-toyos-os

Conversation

@Japabu

@Japabu Japabu commented Jul 27, 2026

Copy link
Copy Markdown

Adds OperatingSystem::Toyos for ToyOS, an operating system written from scratch in Rust targeting x86-64 (UEFI, 2020+ hardware). It has its own Rust target (x86_64-unknown-toyos) via a compiler fork, and uses target-lexicon through rustc_codegen_cranelift.

The change follows the existing pattern for platforms like Redox and Psp:

  • OperatingSystem::Toyos enum variant
  • Display arm returning "toyos"
  • FromStr arm parsing "toyos"
  • registration in default_calling_convention() — ToyOS uses the standard System V calling convention on x86-64

cargo test passes (14/14). Happy to adjust anything that doesn't fit your conventions.

Japabu added a commit to Japabu/target-lexicon that referenced this pull request Jul 27, 2026
default_calling_convention() returned Err for ToyOS targets because the
OS was never added to the SysV list. Fixed upstream in
bytecodealliance#134.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread .DS_Store Outdated
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 <noreply@anthropic.com>
@Japabu
Japabu requested a review from bjorn3 July 28, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants