Skip to content

Commit 5533256

Browse files
docs(vrl playground): document macOS wasm build workaround
1 parent dc5b76d commit 5533256

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

‎lib/vector-vrl/web-playground/README.md‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,18 @@ with this [issue filter][vrl-wasm-unsupported-filter].
7272

7373
### macOS Troubleshooting
7474

75-
If you are getting compilation errors on macOS here are some things to check:
75+
On macOS the `zstd-sys` dependency (pulled in by VRL's stdlib) must compile C
76+
code for WebAssembly, but the system Apple `clang` has no WebAssembly backend.
77+
Point the build at a clang that has one, for example LLVM from Homebrew
78+
(`brew install llvm`):
79+
80+
```shell
81+
CC_wasm32_unknown_unknown="$(brew --prefix llvm)/bin/clang" \
82+
AR_wasm32_unknown_unknown="$(brew --prefix llvm)/bin/llvm-ar" \
83+
wasm-pack build --target web --out-dir public/pkg
84+
```
85+
86+
If you are getting other compilation errors on macOS here are some things to check:
7687

7788
```shell
7889
xcode-select -p
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../LICENSE

0 commit comments

Comments
 (0)