Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srenatus/opa-wasi-experiment
experimenting with wrapping OPA's Wasm modules into something WASI-compatible
https://github.com/srenatus/opa-wasi-experiment
Last synced: 11 days ago
JSON representation
experimenting with wrapping OPA's Wasm modules into something WASI-compatible
- Host: GitHub
- URL: https://github.com/srenatus/opa-wasi-experiment
- Owner: srenatus
- License: apache-2.0
- Created: 2022-07-28T14:01:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-03T19:21:59.000Z (over 2 years ago)
- Last Synced: 2024-11-05T22:47:08.528Z (about 2 months ago)
- Language: Zig
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OPA Wasm and WASI experiment
## What?
This is the scratchpad for rewrapping OPA's wasm modules into a format that can
be run with a plain WASI host.## How?
Requirements:
- `export-audit` and `wasmlink` from https://github.com/fixpointOS/wasm-tools/
- [zig](https://ziglang.org/)`run.sh` contains a set of steps that lead to a successful call of `wasmtime output.wasm`.
The policy.wasm has to be supplied out of band, there's no example here (yet).
The one I had used was
```rego
package playallow := { "one": 1 }
```- compiled to wasm via `opa build -t wasm x.rego -e play/allow`
- extracted via `tar zxvf bundle.tar.gz /policy.wasm`
`