papagaio 0.32.5 → 0.32.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/wasm/papagaio_wasm.js +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -254,7 +254,7 @@ char* papagaio_greet(int argc, char **argv)
|
|
|
254
254
|
}
|
|
255
255
|
```
|
|
256
256
|
|
|
257
|
-
To use the Papagaio Wasm SDK (`lib.c`), copy it from `
|
|
257
|
+
To use the Papagaio Wasm SDK (`lib.c`), copy it from `examples/lib.c` into your project and include it explicitly:
|
|
258
258
|
```c
|
|
259
259
|
#include "lib.c"
|
|
260
260
|
|
|
@@ -284,7 +284,7 @@ If your plugin uses `lib.c`, pass the directory containing it via `-I`:
|
|
|
284
284
|
Or simply place `lib.c` in the same directory as `greet.c`:
|
|
285
285
|
```sh
|
|
286
286
|
# Copy the SDK alongside your source
|
|
287
|
-
cp
|
|
287
|
+
cp examples/lib.c .
|
|
288
288
|
./papagaiocc greet.c
|
|
289
289
|
```
|
|
290
290
|
|
|
@@ -297,7 +297,7 @@ $greet{Papagaio}
|
|
|
297
297
|
*Output: Hello, Papagaio!*
|
|
298
298
|
|
|
299
299
|
### Wasm SDK (lib.c)
|
|
300
|
-
The Wasm SDK lives at `
|
|
300
|
+
The Wasm SDK lives at `examples/lib.c` inside the repository. It is **not** automatically embedded into `papagaiocc` — you supply it to your plugin's build as needed. It provides a curated, zero-dependency C standard library for WebAssembly, including:
|
|
301
301
|
- **Memory Management**: `malloc`, `free`, `realloc`
|
|
302
302
|
- **String Processing**: `strlen`, `strcpy`, `sprintf`, `strrev`, etc.
|
|
303
303
|
- **Formatted I/O**: `printf`, `snprintf`, `sscanf`
|
|
Binary file
|