Skip to content

Commit

Permalink
Merge pull request #101 from zama-ai/davidk/native-fhevm-go
Browse files Browse the repository at this point in the history
feat: sketch for the initial native api of go ethereum
  • Loading branch information
david-zk authored Nov 12, 2024
2 parents c2800c3 + 66f3eba commit 104b413
Show file tree
Hide file tree
Showing 11 changed files with 2,798 additions and 0 deletions.
26 changes: 26 additions & 0 deletions fhevm-engine/fhevm-go-native/.github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Run Tests

on:
push:
branches:
- 'main'
tags:
- '*'
pull_request:

jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22.0'

- name: Run tests
run: make test
1 change: 1 addition & 0 deletions fhevm-engine/fhevm-go-native/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
3 changes: 3 additions & 0 deletions fhevm-engine/fhevm-go-native/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "tfhe-rs"]
path = tfhe-rs
url = https://github.com/zama-ai/tfhe-rs.git
21 changes: 21 additions & 0 deletions fhevm-engine/fhevm-go-native/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
fhevm/executor.pb.go: ../../proto/executor.proto ../../proto/common.proto
protoc \
--proto_path=../../proto/ \
--go_opt=paths=source_relative \
--go_opt=Mprotos/executor.proto=github.com/zama-ai/fhevm-backend/fhevm-engine/fhevm-go-native \
--go_opt=Mprotos/common.proto=github.com/zama-ai/fhevm-backend/fhevm-engine/fhevm-go-native \
--go-grpc_out=./fhevm/ --go-grpc_opt=paths=source_relative \
--go_out=./fhevm/ \
executor.proto common.proto

.PHONY: build
build: fhevm/executor.pb.go
cd fhevm && go build .

.PHONY: run
run: fhevm/executor.pb.go
cd fhevm && go run .

.PHONY: test
test: fhevm/executor.pb.go
cd fhevm && go test ./...
1 change: 1 addition & 0 deletions fhevm-engine/fhevm-go-native/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# fhevm-go-native
Loading

0 comments on commit 104b413

Please sign in to comment.