Skip to content

Conversation

@steveklabnik
Copy link
Collaborator

Adds the @syscall intrinsic for making direct OS syscalls from Rue code. This intrinsic requires the unchecked_code preview feature and a checked block.

Implementation:

  • Added syscall to KnownSymbols
  • Added analyze_syscall_intrinsic in sema.rs with type checking (all args must be u64)
  • Added x86_64 codegen using the syscall instruction
  • Added aarch64 codegen using SVC #0x80 instruction
  • Added spec section 9.2 for syscall intrinsic documentation
  • Added spec tests for basic functionality

Known issues filed as rue-8qt6:

  • checked block type inference with intrinsic return values
  • syscall with max arguments test

🤖 Generated with Claude Code

@steveklabnik steveklabnik enabled auto-merge January 4, 2026 18:46
@steveklabnik steveklabnik force-pushed the steveklabnik/push-nupxtqnvkmrz branch 2 times, most recently from a96d189 to 082404b Compare January 4, 2026 19:01
Adds the @syscall intrinsic for making direct OS syscalls from Rue code.
This intrinsic requires the unchecked_code preview feature and a checked block.

Implementation:
- Added syscall to KnownSymbols
- Added analyze_syscall_intrinsic in sema.rs with type checking (all args must be u64)
- Added x86_64 codegen using the syscall instruction
- Added aarch64 codegen using SVC #0x80 instruction
- Added spec section 9.2 for syscall intrinsic documentation
- Added spec tests for basic functionality

Known issues filed as rue-8qt6:
- checked block type inference with intrinsic return values
- syscall with max arguments test

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@steveklabnik steveklabnik force-pushed the steveklabnik/push-nupxtqnvkmrz branch from 082404b to 6bc9235 Compare January 4, 2026 19:16
@steveklabnik steveklabnik added this pull request to the merge queue Jan 4, 2026
Merged via the queue into rue-language:trunk with commit c914247 Jan 4, 2026
6 checks passed
@steveklabnik steveklabnik deleted the steveklabnik/push-nupxtqnvkmrz branch January 4, 2026 19:27
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.

1 participant