Optionally include global ASM runtime (to allow using gba-rs as a lib)#217
Merged
Lokathor merged 1 commit intorust-console:mainfrom Dec 31, 2025
Merged
Conversation
Member
|
I'd like as much assistance as you can provide, because I don't know anything about multiboot. If you think we should add it in this PR we can, or I can merge this now and multiboot can be improved later. |
Contributor
Author
|
I think it would be fine to merge this and work on proper Multiboot compatibility in it's own PR, since this would let us plug different runtime impls in and out during testing without breaking anything major (as far as I can tell). |
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.
Howdy!
I was messing around with compiling Rust for GBA while creating binaries to test my recent USB Multiboot project (and it's speed test binary), and the pre-defined
VolatileAddresss and their bespoke types (likeIrqBits) are super handy to use outside of usinggbaas a game engine.However, since it assumes it's the only global ASM crate, I can't use it for Multiboot projects due to a cartridge-assuming runtime, and the space supplied for the header not having enough room. Additionally, I can't use its predefined addresses and types in a project that is properly set up, for the same reason (the global ASM runtime).
So I chose to make it entirely optional while working on my aforementioned speed test binary, using my own runtime while still using
gba's types.I still had to make my own consts
GBA_BIOS_IRQ_HANDLER @ 0x03007FFCandGBA_BIOS_IF @ 0x03007DF8bindings, but it worked well!If you'd like assistance in making
gbaMultiboot-compatible, I'd be very willing to lend a hand!