Skip to content

Commit 4d4f912

Browse files
committed
docs: add local build instructions to README
Adds detailed build instructions explaining the build order: 1. WASM packages (ONNX Runtime, Yoga) 2. Main CLI package 3. SEA binary (optional) Includes quick build commands and full build examples.
1 parent a699c1c commit 4d4f912

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,45 @@ pnpm run build
110110
pnpm exec socket --version
111111
```
112112

113+
### Building locally
114+
115+
Socket CLI consists of multiple packages that need to be built in a specific order:
116+
117+
1. **Build WASM packages** (ONNX Runtime, Yoga):
118+
```bash
119+
# Build ONNX Runtime WASM (for AI features)
120+
pnpm --filter @socketsecurity/onnxruntime run build
121+
122+
# Build Yoga WASM (for terminal layouts)
123+
pnpm --filter @socketsecurity/yoga run build
124+
```
125+
126+
2. **Build the main CLI package**:
127+
```bash
128+
# Build packages/cli (includes TypeScript compilation and bundling)
129+
pnpm --filter @socketsecurity/cli run build
130+
```
131+
132+
3. **Build the SEA (Single Executable Application) binary** (optional):
133+
```bash
134+
# Build packages/socket as a Node.js SEA binary
135+
pnpm --filter @socketsecurity/socket run build
136+
```
137+
138+
**Full build command** (all packages):
139+
```bash
140+
pnpm run build
141+
```
142+
143+
**Quick builds** (skip WASM):
144+
```bash
145+
# Build only the CLI package
146+
pnpm --filter @socketsecurity/cli run build
147+
148+
# Build and run
149+
pnpm --filter @socketsecurity/cli run build && pnpm exec socket --version
150+
```
151+
113152
See [docs/development/](docs/development/) for detailed development guides.
114153

115154
### Development environment variables

0 commit comments

Comments
 (0)