Skip to content

Commit 6a66852

Browse files
Add a basic README
1 parent 6d9d70e commit 6a66852

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,30 @@
1-
# lind-wasm-example-grates
2-
Example grates for Lind Wasm
1+
# Example Grates for Lind
2+
3+
This reposistory contains a collection of sample grate implementations that can be used with the [Lind runtime](https://github.com/Lind-Project/lind-wasm)
4+
5+
Grates provide custom syscall wrappers for cages. Each example grate here overrides one or more syscalls with a custom implementation.
6+
7+
For more details on Lind and grates, refer to the official [documentation.](https://lind-project.github.io/lind-wasm/)
8+
9+
## Repository Structure
10+
11+
Each subfolder in the `examples/` directory contains a standalone grate implementation.
12+
13+
A typical grate consists of:
14+
15+
```
16+
- *.c // C source files for the grate implementation
17+
- *.h // Header files for exports
18+
- compile_grate.sh // Build script
19+
- README.md // Documentation speciic to the grate
20+
```
21+
22+
Currently, grates can only be implemented in C.
23+
24+
## Running a Grate
25+
26+
To run a cage under a grate use the helper script like so:
27+
28+
`./scripts/lind_run <grate>.wasm <cage>.wasm`
29+
30+
This runs the cage inside lind, with the grate providing custom syscall handling.

0 commit comments

Comments
 (0)