commit c721887320814568d680e7f85118bec74fc6436b
parent d013ac35e0e47509d24e09834078e00dcb9060e6
Author: Florian Dold <florian@dold.me>
Date: Tue, 3 Jan 2023 11:22:53 +0100
readme
Diffstat:
| M | README.md | | | 41 | ++++++++++++++++++++++++++++++++--------- |
1 file changed, 32 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
@@ -5,11 +5,15 @@ based on Fabrice Bellard's QuickJS. The runtime is statically linked.
## Building
-Prerequisites:
+Prerequisite dependencies:
- `meson`
- `ninja`
- `gcc` or `clang`
+Building also requires the `taler-wallet-core-qjs.mjs` file. You can
+either build it yourself or download if from `taler.net` via the `./download_wallet_core_js.sh`
+script.
+
The following commands build the project and place resulting files
in the `build/` directory:
@@ -18,7 +22,32 @@ $ meson setup build
$ meson compile -C build
```
-## Project Structure
+## Architecture
+
+Infra:
+
+- The `tart` native quickjs module provides Taler-specific runtime functionalty for the wallet.
+- The `std` and `os` modules are extended with functionality needed by the wallet,
+ such as a curl-based HTTP client and file access.
+- `prelude.js` adapts the global environment to enable the wallet JS to run
+- `taler-wallet-core-qjs.mjs` is the bundled taler-wallet-core.
+
+Programs/interfaces:
+- `$builddir/qtart` provides a JS interpreter and REPL with a bundled taler-wallet-core.
+ It is mainly used for testing and benchmarking.
+- `$builddir/libtalerwalletcore.so`
+- `taler_wallet_core_lib.h` declares the symbols exported by `libtalerwalletcore.so`
+- `wallet-client-example.c` is an example client for `libtalerwalletcore.so`
+
+## To Do
+
+- curl is not used asynchronously, but HTTP requests block
+- TLS certificate verification is disabled, because some platforms (Apple!)
+ don't have trusted CAs in the file system. Eventually, we will
+ ship with our own certificate store.
+- We might leak memory in some places
+
+## Repository Structure
- `quickjs/`: A slightly modified version of Fabrice Bellard's QuickJS interpreter.
We try to keep modifications as small as possible in this part of the code.
@@ -30,11 +59,5 @@ should be modified, not any of the code, if at all possible.
Run test:
```
-./qtart -I prelude.js -I ~/repos/taler/wallet-core/packages/taler-wallet-embedded/dist/taler-wallet-core-qjs.mjs -e 'testWithLocal()'
-```
-
-Wallet REPL:
-
-```
-./qtart -I prelude.js -I ~/repos/taler/wallet-core/packages/taler-wallet-embedded/dist/taler-wallet-core-qjs.mjs -I wallet-setup.js
+./qtart 'testWithLocal()'
```