You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a new keychain in-memory plugin that has it's implementation
written in Rust that is then compiled down to WebAssmebly via wasm-pack
and used by the wrapper Typescript code.
This is NOT meant for production because it stores everything in plain
text and also provides zero durability/persistence guarantees given that
it's only storing everything in memory.
The actual news here is that we have a plugin now written in Rust which
is the pre-cursor to us being able to do something similar with the
Weaver relay component as the next phase of a bigger PoC.
The reason why not the entire plugin is implemented in Rust is because
we are unable to hook up ExpressJS request handlers from the Rust code
as far as I could determine. See this link for further details on this:
https://rustwasm.github.io/book/reference/js-ffi.html#from-the-rust-side
Because of the above, the way it works is this:
+--------+ API Request +----------+
| HTTP |-------------->| ExpressJS|
| Client | +----------+
+--------+ Method|
Call |
v
+---------+ Method Call +----------+
| Calling |------------->|JS Plugin |
| Module | |Module |
+---------+ +----------+
|get()
|set()
|has()
|delete()
+-------------+ |
| Wasm Plugin |<---+
| Module |
+-------------+
^
|
|
v
+------------------------+
|Rust Native |
|HashMap<String, String> |
+------------------------+
Resolves#1281
Signed-off-by: Peter Somogyvari <[email protected]>
# `@hyperledger/cactus-plugin-keychain-memory-wasm`<!-- omit in toc -->
2
+
3
+
## Table of Contents <!-- omit in toc -->
4
+
5
+
-[1. Summary](#1-summary)
6
+
-[Usage](#usage)
7
+
8
+
## Summary
9
+
10
+
Dummy keychain implementation doing NO encryption and storing everything in-memory. Only suitable for development and testing. Same as the non-wasm version but this one has the backing implementation written in Rust and compiled down to WebAssembly.
11
+
12
+
> **Do not use this in production. It does not encrypt the stored data at all. It stores everything in plain text!**
13
+
## Usage
14
+
15
+
Can be used the same way as the non-WASM implementation in the package: `@hyperledger/cactus-plugin-keychain-memory`
16
+
The only difference is that this one is backed by code written in Rust that is compiled down to WebAssembly modules to be loaded instead of the usual TS->JS transpilation process.
"description": "Dummy keychain implementation doing NO encryption and storing everything in-memory. Only suitable for development and testing. Same as the non-wasm version but this one has the backing implementation written in Rust and compiled down to WebAssembly.",
"description": "Contains/describes the Hyperledger Cactus Keychain Memory WASM plugin which is designed to help with testing and development and is implemented in Rust instead of Typescript.",
0 commit comments