initial commit
This commit is contained in:
16
README.md
Normal file
16
README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# typst-plugin-compiler
|
||||
|
||||
This repository provides a simple docker image to easily compile Typst WASM plugins using EMCC and wasi-stub
|
||||
|
||||
The wasi-stub executable is taken from the [wasm-minimal-protocol repo](https://github.com/astrale-sharp/wasm-minimal-protocol).
|
||||
|
||||
## Compiling a plugin
|
||||
|
||||
1. Write your C plugin. You can start from the example provided in the [wasm-minimal-protocol repo](https://github.com/astrale-sharp/wasm-minimal-protocol).
|
||||
|
||||
2. Run the docker image:
|
||||
```bash
|
||||
docker run --rm -v $(pwd):/src git.kb28.ch/hel/typst-plugin-compiler:latest compile plugin.c
|
||||
```
|
||||
|
||||
3. Copy the output file (for the above example, `plugin.wasm`) to your Typst project
|
||||
Reference in New Issue
Block a user