Feat/Add Crypto Libs #3

Merged
pn merged 35 commits from feat/add-crypto-libs into main 2026-01-10 21:59:18 +00:00
4 changed files with 17 additions and 1027 deletions
Showing only changes of commit 527dfee7f6 - Show all commits

View File

@@ -170,16 +170,22 @@ if err != nil {
```
motr-enclave/
├── main.go # Plugin entry point, exported functions
├── db/
├── schema.sql # Database schema
│ ├── query.sql # SQLC query definitions
── *.go # Generated SQLC code
├── sqlc.yaml # SQLC configuration
├── Makefile # Build commands
└── go.mod # Go module
├── cmd/
│ └── enclave/
└── main.go # Plugin entry point (WASM-only, go-pdk imports)
├── internal/
── keybase/ # Database access layer
│ ├── crypto/ # Cryptographic operations
│ ├── state/ # Plugin state management (WASM-only)
│ ├── types/ # Input/output type definitions
│ └── migrations/ # Database migrations
├── sqlc.yaml # SQLC configuration
├── Makefile # Build commands
└── go.mod # Go module
```
Note: Files with `//go:build wasip1` constraint (cmd/enclave/, internal/state/) only compile for WASM target.
## Dependencies
Install with `make deps`:

View File

@@ -15,7 +15,7 @@ deps:
build:
@echo "Building WASM plugin..."
@GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o $(BUILD_DIR)/$(BINARY) .
@GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o $(BUILD_DIR)/$(BINARY) ./cmd/enclave
@echo "Built $(BUILD_DIR)/$(BINARY)"
sdk:

View File

@@ -1,3 +1,5 @@
//go:build wasip1
// Package state contains the state of the enclave.
package state

1018
main.go

File diff suppressed because it is too large Load Diff