From ab0db69a7b11ba1a9dc52d50c94e9e321b70ebf0 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 6 Jun 2025 09:13:54 +0200 Subject: Added example 6 --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 582cd4d..84b0066 100644 --- a/README.md +++ b/README.md @@ -75,3 +75,16 @@ thread by using a web worker. ## 5. Callback functions In `05_callback` the example is extended to include a callback function. + +## 6. Storage + +In `06_storage` we show how to use Emscripten's +[file system API](https://emscripten.org/docs/api_reference/Filesystem-API.html) +using as backend the +[indexed DB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API). +This example only works in the browser, as other runtimes (such as +Node.js) require different backends. + +In this example we make use for the first time of the `--pre-js` option of +the compiler to include custom JavaScript code that is run when our module +loads. Moreover, the C code is split into multiple files for convenience. -- cgit v1.3