refactor(enclave): restructure enclave to use go-pdk and support WASM target
This commit is contained in:
22
AGENTS.md
22
AGENTS.md
@@ -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`:
|
||||
|
||||
Reference in New Issue
Block a user