-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
The Docker-based distribution works well for CI environments, but causes issues when running locally on Apple Silicon (arm64) Macs due to Rosetta emulation. Specifically, .NET's HttpClient fails to connect to host services even when the network is reachable (wget/curl work, but HttpClient doesn't).
Problem
When running sim6502 v3.10.0 with --backend vice on an Apple Silicon Mac:
docker run --rm -v "$(pwd)":/code ghcr.io/barryw/sim6502:v3.10.0 \
/app/Sim6502TestRunner -s /code/tests/test.6502 \
--backend vice --vice-host host.docker.internal --vice-port 6510
The connection fails with:
Could not connect to VICE MCP server at host.docker.internal:6510. Is VICE running with -mcpserver?
However, wget from inside the same container successfully connects to the same endpoint. This appears to be a .NET HttpClient issue under Rosetta emulation.
Proposed Solution
Publish native AOT-compiled binaries for common platforms:
- macOS arm64 (Apple Silicon)
- macOS x86_64
- Linux arm64
- Linux x86_64
- Windows x86_64
.NET 8+ has excellent native AOT support that would:
- Eliminate Rosetta emulation issues on Apple Silicon
- Remove Docker networking complexity for local development
- Provide faster startup (no JIT warmup)
- Simplify local testing with VICE MCP backend
Suggested Implementation
Add a GitHub Actions workflow or extend the existing release process to publish AOT binaries:
dotnet publish -c Release -r osx-arm64 --self-contained -p:PublishAot=true
dotnet publish -c Release -r osx-x64 --self-contained -p:PublishAot=true
dotnet publish -c Release -r linux-arm64 --self-contained -p:PublishAot=true
dotnet publish -c Release -r linux-x64 --self-contained -p:PublishAot=true
dotnet publish -c Release -r win-x64 --self-contained -p:PublishAot=trueAttach the resulting binaries to GitHub releases alongside the Docker image.