Skip to content

Conversation

@walruscraft
Copy link
Contributor

@walruscraft walruscraft commented Jan 12, 2026

Since #[naked] is stable now (1.79) and origin already requires 1.88, we can drop the global_asm!() fallback entirely.

This sidesteps the whole @function vs %function platform-specific syntax mess that #168 was trying to fix.

Per @bjorn3's suggestion - this supersedes #168.

Copy link
Contributor

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

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

Looks pretty good.

#[naked] is stable since Rust 1.79, and origin already requires 1.88.
This removes the global_asm!() fallback and the naked_fn! macro entirely,
inlining #[naked] directly at each call site.

Signal handlers don't need #[no_mangle] since they're passed by address.
@walruscraft
Copy link
Contributor Author

You're right - removed no_mangle from the signal handlers since they're passed by address, not looked up by name. Kept it only on _start. Tested and works.

@walruscraft
Copy link
Contributor Author

I think I've addressed all the feedback - anything else needed or is this good to go?

@sunfishcode sunfishcode merged commit 17031bc into sunfishcode:main Jan 14, 2026
9 checks passed
@sunfishcode
Copy link
Owner

Looks good, thanks!

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.

3 participants