Problem
Users on Apple Silicon Macs (M1/M2/M3) currently face issues with our Docker-based abigen tool due to AMD64 architecture incompatibility. While Rosetta 2 provides a workaround, it's not ideal and can cause performance overhead and occasional stability issues.
Proposed Solution
Implement a fallback mechanism that downloads solc binaries directly instead of relying on Docker containers:
- First attempt to use Docker-based solution
- If Docker fails or we detect Apple Silicon architecture:
- Download appropriate
solc binary from ethereum/solc-bin repository
- Store in local cache (e.g.,
~/.cache/solc/)
- Use binary directly for compilation
Benefits
- Eliminates Rosetta dependency on Apple Silicon
- Potentially faster compilation (no Docker overhead)
- More reliable cross-platform support
- Simpler setup for new developers
Implementation Notes
- Use solc-bin as source for binaries
- Cache downloaded versions to avoid repeated downloads
- Verify checksums for security
- Support version selection similar to current Docker implementation
Related
Problem
Users on Apple Silicon Macs (M1/M2/M3) currently face issues with our Docker-based
abigentool due to AMD64 architecture incompatibility. While Rosetta 2 provides a workaround, it's not ideal and can cause performance overhead and occasional stability issues.Proposed Solution
Implement a fallback mechanism that downloads
solcbinaries directly instead of relying on Docker containers:solcbinary from ethereum/solc-bin repository~/.cache/solc/)Benefits
Implementation Notes
Related