Skip to content

Commit 4f966f6

Browse files
Update Wasm README (open-policy-agent#5303)
Signed-off-by: Anders Eknert <[email protected]> Co-authored-by: Stephan Renatus <[email protected]>
1 parent a6bc34d commit 4f966f6

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

wasm/README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
# OPA-WASM
22

33
This directory contains a library that implements various low-level
4-
operations for policies compiled into WebAssembly (WASM). Specifically, the
5-
library implements:
6-
7-
* JSON parsing
8-
* JSON AST (e.g., comparison, iteration, lookup, etc.)
9-
* String operations
10-
* Memory allocation
4+
operations for policies compiled into WebAssembly (Wasm). Specifically, the
5+
library implements most of the built-in functions provided by OPA. See the "Wasm"
6+
tag next to each function listed in the
7+
[built-in function reference](https://www.openpolicyagent.org/docs/latest/policy-reference/#built-in-functions)
8+
for the complete list, or the
9+
[builtin_metadata.json](https://github.com/open-policy-agent/opa/blob/main/builtin_metadata.json) file for programmatic purposes.
1110

1211
This library does not make any backwards compatibility guarantees.
1312

13+
## Documentation
14+
15+
See the [OPA docs](https://www.openpolicyagent.org/docs/latest/wasm/) on Wasm for an overview of the integration,
16+
compilation options, and more.
17+
1418
## Development
1519

1620
You should have Docker installed to build and test changes to the library. We
17-
commit the output of the build (`opa.wasm`) into the repository so it's
21+
commit the output of the build (`opa.wasm`) into the repository, so it's
1822
important for the build output to be reproducible.
1923

2024
You can build the library by running `make build`. This will produce WASM
2125
executables under the `_obj` directory.
2226

23-
You can test the library by running `make test`. By default the test runner
27+
You can test the library by running `make test`. By default, the test runner
2428
does not print messages when tests pass. If you run `make test VERBOSE=1` it
2529
will log all of the tests that were run.
2630

@@ -44,4 +48,4 @@ target will:
4448

4549
1. Build the OPA-WASM library
4650
2. Copy the library into the [internal/compiler/wasm/opa](../internal/compiler/wasm/opa) directory.
47-
3. Run the tool to generate the [internal/compiler/wasm/opa/opa.go](../internal/compiler/wasm/opa/opa.go) file.
51+
3. Run the tool to generate the [internal/compiler/wasm/opa/opa.go](../internal/compiler/wasm/opa/opa.go) file.

0 commit comments

Comments
 (0)