Skip to content

Commit 0c6e212

Browse files
authored
Merge pull request #4 from 10d9e/feat/impl-precompiles
Feat/impl precompiles
2 parents e9b2de6 + ba2bae8 commit 0c6e212

File tree

12 files changed

+2788
-299
lines changed

12 files changed

+2788
-299
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,34 @@ jobs:
2828
run: zig version
2929

3030
- name: Check formatting
31-
run: zig fmt --check .
32-
33-
- name: Build project
34-
run: zig build
35-
36-
- name: Run tests
37-
run: ./zig-out/bin/zevm-test
31+
run: zig fmt --check src/
3832

3933
- name: Install dependencies
34+
run: make install-deps
35+
36+
- name: Verify blst headers (macOS)
37+
if: runner.os == 'macOS'
4038
run: |
41-
if [ "${{ runner.os }}" == "Linux" ]; then
42-
sudo apt-get update
43-
sudo apt-get install -y libsecp256k1-dev libssl-dev
44-
elif [ "${{ runner.os }}" == "macOS" ]; then
45-
brew install libsecp256k1 openssl
39+
if [ -f /tmp/blst/bindings/blst.h ]; then
40+
echo "✓ blst.h found at /tmp/blst/bindings/blst.h"
41+
ls -la /tmp/blst/bindings/blst.h
42+
elif [ -f /opt/homebrew/include/blst/blst.h ]; then
43+
echo "✓ blst.h found at /opt/homebrew/include/blst/blst.h"
44+
elif [ -f /usr/local/include/blst/blst.h ]; then
45+
echo "✓ blst.h found at /usr/local/include/blst/blst.h"
46+
else
47+
echo "✗ blst.h not found in expected locations"
48+
find /tmp/blst -name "blst.h" 2>/dev/null || echo "No blst.h in /tmp/blst"
49+
exit 1
4650
fi
4751
48-
- name: Run precompile unit tests
49-
run: zig test src/precompile/tests.zig -I src
52+
- name: Build project
53+
run: make build
54+
55+
- name: Run tests
56+
env:
57+
DYLD_LIBRARY_PATH: /opt/homebrew/lib:/usr/local/lib
58+
run: make test
5059

5160
- name: Run examples
5261
run: |
@@ -76,7 +85,7 @@ jobs:
7685
version: '0.15.1'
7786

7887
- name: Format check
79-
run: zig fmt --check .
88+
run: zig fmt --check src/
8089

8190
security:
8291
name: Security Scan
@@ -91,8 +100,12 @@ jobs:
91100
with:
92101
version: '0.15.1'
93102

103+
- name: Install dependencies
104+
run: make install-deps
105+
94106
- name: Build with security checks
95107
run: |
108+
make build
96109
zig build -Doptimize=ReleaseSafe
97110
zig build -Doptimize=ReleaseFast
98111
@@ -110,8 +123,13 @@ jobs:
110123
with:
111124
version: '0.15.1'
112125

126+
- name: Install dependencies
127+
run: make install-deps
128+
113129
- name: Build optimized version
114-
run: zig build -Doptimize=ReleaseFast
130+
run: |
131+
make build
132+
zig build -Doptimize=ReleaseFast
115133
116134
- name: Run benchmarks
117135
run: ./zig-out/bin/zevm-bench

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
### Security
2626
- Nothing yet
2727

28+
## [0.3.0] - 2025-12-20
29+
30+
### Added
31+
- **Cross-Platform Makefile**: Comprehensive build system with OS detection and automated dependency installation
32+
- **Static Linking Support**: All binaries now statically link `blst` and `mcl` libraries for self-contained deployment
33+
- **Automated Dependency Management**: Makefile targets for installing dependencies on macOS, Linux, and Windows
34+
- **Source-Based Library Installation**: Automatic cloning and building of `blst` and `mcl` from source if not found
35+
- **Dependency Verification**: `make check-deps` target to verify all required dependencies before building
36+
- **CROSS_PLATFORM.md**: Comprehensive guide for building on all supported platforms
37+
- **PRECOMPILE_FEATURE_PARITY.md**: Detailed feature parity comparison with Rust revm implementation
38+
39+
### Changed
40+
- **Build System**: Enhanced `build.zig` to support static linking with proper C++ standard library handling
41+
- **CI Workflow**: Simplified CI to use Makefile for consistent builds across platforms
42+
- **Library Linking**: Improved library detection and linking order for static libraries
43+
- **Documentation**: Updated README with new Makefile-based build instructions
44+
45+
### Fixed
46+
- **Linux Static Linking**: Fixed C++ standard library linking to use `libstdc++` instead of `libc++` on Linux
47+
- **Ubuntu CI Build**: Resolved undefined symbol errors related to C++ standard library on Ubuntu CI runners
48+
- **macOS Dynamic Library Loading**: Fixed runtime library path issues on macOS CI
49+
- **Library Path Handling**: Improved handling of absolute vs relative library paths in build system
50+
51+
### Security
52+
- **Static Linking**: Improved security posture with self-contained binaries that don't depend on system libraries
53+
2854
## [0.1.0] - 2024-10-27
2955

3056
### Added

0 commit comments

Comments
 (0)