Skip to content

Add ToyOS operating system - #134

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

Add ToyOS operating system#134
Japabu wants to merge 1 commit into
bytecodealliance:mainfrom
ToyOSOrg: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 ToyOSOrg/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

@bjorn3 bjorn3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving a dummy request because github doesn't allow me to dismiss the review request otherwise. (I don't have write permission for this repo.)

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