Optionally include global ASM runtime (to allow using gba-rs as a lib) #217
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!