SwiftEVM is a high-performance, open-source implementation of the Ethereum Virtual Machine, written entirely in Swift. Engineered to empower web3-developers, it enables seamless integration of EVM—execution into a diverse array of applications and platforms, including macOS, iOS, other Apple ecosystems, wasm32, Linux, and beyond.
Our focus is on:
- 🌐 Opensource: Fully open source, promoting transparency, community collaboration, and innovation.
- ⚡ Speed & Performance: Critical paths are highly optimized for blazing-fast execution.
- 🔒 Security & Reliability: 100% test coverage ensures predictable and robust behavior.
- 🔧 Extensibility & Maintainability: A modular architecture that facilitates ongoing improvements and customizations.
Modern development tools such as SwiftLint and swiftformat are part of our workflow, ensuring a clean, consistent codebase that is both developers-friendly.
- ✅ EVM Machine: Fully implemented
- ✅ EVM Core: ~90% complete
- ⏳ EVM Runtime: Under active development
- 🔜 Ethereum Hard Forks:
- Berlin
- London
- Shanghai
- Cancun
- Prague
- Blockchain Ecosystem: Planned integration with NEAR Protocol to broaden blockchain interoperability.
- Key Environments:
- Embedded Systems: Bring blockchain capabilities to resource-constrained devices.
- WebAssembly (WASM): Run the EVM directly in WASM environments.
- Mobile & Desktop: Seamlessly integrate decentralized functionalities into iOS, macOS, and other
Swift
-based platforms.
- Pure Swift Implementation: Leverage Swift’s performance and safety to integrate EVM directly into your projects.
- Cross-Platform Compatibility: Enjoy hassle-free deployment across multiple platforms.
- Open Source: Join a vibrant community—contribute, collaborate, and help shape the project’s future.
- Customization & Extensibility: Easily adapt and extend the EVM functionality to meet specific project needs.
-
🔢
PrimitiveTypes
Library: Implements high-performance math tailored specifically for Ethereum’s needs—offering functionalities that generic libraries likeBigInt
and other general-purpose solutions can’t provide. It’s designed and optimized for the unique demands of theEVM
. -
⚙️
EVM
Library: Contains the actual implementation of the Ethereum Virtual Machine, powering EVM bytecode execution seamlessly. -
🔍 EVM Tracing Support: Provides robust tracing capabilities to assist developers in debugging and optimizing EVM execution.
📱 Swift Support: Minimum supported version is Swift 6
.
This is due the new capabilities of Swift 6
, including support for the UInt128
type.
Use as dependency:
dependencies: [
.package(url: "https://github.com/mrLSD/evm-swift.git"
]
- ✅ All Tests Passing: Ensure that all tests run successfully.
- 📊 100% Test Coverage: Verify that your tests cover the entire codebase.
- 🛠️ SwiftFormat: Confirm that the
swiftformat
command completes. - 🔧 SwiftLint: Confirm that the
swiftlint
command executes successfully.
You can run:
swift test
./Tests/cli-test-runner
- simple but yet powerful tool to show tests errorsswift test | xcbeautify
- swift tests xcbeautify