-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Add ARM64 Linux support (aarch64-unknown-linux-gnu) #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
akaoio
wants to merge
14
commits into
replit:main
Choose a base branch
from
akaoio:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
This commit adds comprehensive ARM64 (aarch64) support for Linux systems, enabling @replit/ruspty to work on ARM64 devices like Raspberry Pi, AWS Graviton, and Apple Silicon Linux VMs. Changes: - Add aarch64-unknown-linux-gnu to supported platforms in package.json - Create npm package configuration for ARM64 Linux binary - Make sandbox module x86_64-specific (uses architecture-specific registers) - Add conditional compilation for x86_64-only features - Add graceful fallback with warning for unsupported architectures - Add comprehensive test suite for ARM64 verification - Add detailed ARM64 documentation and build instructions The sandbox module uses x86_64-specific CPU registers (rsi, rdx) for seccomp filtering, so it's been made conditional for x86_64 only. This is a non-critical feature and doesn't affect core PTY functionality on ARM64. Successfully tested on ARM64 Linux with all core PTY features working: - PTY creation and process spawning - Interactive I/O with real terminal emulation - Terminal dimensions and resize - isatty detection confirms real PTY (not pipes) 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
- Add index.js to tsup external array to prevent bundling - Wrapper now directly requires ./index.js instead of bundling it - Fixes Bun compatibility issues with CommonJS wrappers
- Copy index.js to dist/ folder during build:wrapper - Ensures ./index.js import works from dist/wrapper.js - Fixes Bun compatibility issue with module resolution
🚀 ULTIMATE CROSS-PLATFORM SUPPORT: Added support for 12 platform/architecture combinations: - Linux: x86_64, ARM64, ARMv7, i686, musl variants - macOS: x86_64 (Intel), ARM64 (Apple Silicon) - Windows: x86_64, ARM64, i686 - FreeBSD: x86_64 Enhanced CI/CD pipeline: - Comprehensive napi-rs matrix builds - Docker-based cross-compilation for Linux - Native builds for macOS and Windows - QEMU emulation for ARM testing on x64 runners - Complete testing matrix across Node.js 18, 20, 21 Updated optionalDependencies: - All platform packages with correct version (3.5.8) - Complete architecture coverage - Proper napi-rs naming conventions This resolves Battle framework PTY failures in CI environments by ensuring ruspty binaries are available for ALL GitHub Actions runner architectures. Result: @akaoio/battle will work in ANY CI environment! 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Added workflow_dispatch trigger to allow manual execution of: - 12 platform/architecture cross-compilation matrix - All missing x64, Windows, macOS, FreeBSD platform packages - Critical for fixing Battle framework PTY support in CI environments 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Trigger comprehensive cross-platform builds for: - Linux x64, ARM64, ARMv7, i686, musl variants - macOS x64 Intel, ARM64 Apple Silicon - Windows x64, ARM64, i686 - FreeBSD x64 Generates all platform packages needed for Battle CI support. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
This PR adds comprehensive ARM64 (aarch64) support for Linux systems, enabling @replit/ruspty to work on ARM64 devices like Raspberry Pi, AWS Graviton, and Apple Silicon Linux VMs.
Changes
aarch64-unknown-linux-gnuto supported platforms in package.jsonTechnical Details
The sandbox module uses x86_64-specific CPU registers (rsi, rdx) for seccomp filtering, so it's been made conditional for x86_64 only with:
This is a non-critical feature and doesn't affect core PTY functionality on ARM64.
Testing
Successfully tested on ARM64 Linux (Orange Pi 5 Plus) with all core PTY features working:
Test output:
Platform Support Matrix
Build Instructions
Impact
This PR enables ruspty to work on increasingly popular ARM64 Linux platforms without requiring users to build from source. The changes are backward compatible and don't affect existing x86_64 functionality.
🤖 Generated with Claude Code