Add ToyOS operating system - #134
Open
Japabu wants to merge 1 commit into
Open
Conversation
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>
bjorn3
reviewed
Jul 27, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
OperatingSystem::Toyosfor 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 throughrustc_codegen_cranelift.The change follows the existing pattern for platforms like
RedoxandPsp:OperatingSystem::Toyosenum variantDisplayarm returning"toyos"FromStrarm parsing"toyos"default_calling_convention()— ToyOS uses the standard System V calling convention on x86-64cargo testpasses (14/14). Happy to adjust anything that doesn't fit your conventions.