-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cmd-api-server): web assembly plugin modules #1281
Labels
API_Server
dependencies
Pull requests that update a dependency file
enhancement
New feature or request
Security
Related to existing or potential security vulnerabilities
Significant_Change
Applying this label triggers the more stringent review of the maintainers and the 2+1 PR rule.
Milestone
Comments
petermetz
added
enhancement
New feature or request
API_Server
dependencies
Pull requests that update a dependency file
Security
Related to existing or potential security vulnerabilities
Significant_Change
Applying this label triggers the more stringent review of the maintainers and the 2+1 PR rule.
labels
Aug 30, 2021
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Oct 19, 2021
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 hyperledger-cacti#1281 Signed-off-by: Peter Somogyvari <[email protected]>
petermetz
added a commit
that referenced
this issue
Oct 25, 2021
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]>
Leeyoungone
pushed a commit
to Leeyoungone/cactus
that referenced
this issue
Oct 26, 2021
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 hyperledger-cacti#1281 Signed-off-by: Peter Somogyvari <[email protected]>
RafaelAPB
pushed a commit
to RafaelAPB/blockchain-integration-framework
that referenced
this issue
Mar 9, 2022
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 hyperledger-cacti#1281 Signed-off-by: Peter Somogyvari <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
API_Server
dependencies
Pull requests that update a dependency file
enhancement
New feature or request
Security
Related to existing or potential security vulnerabilities
Significant_Change
Applying this label triggers the more stringent review of the maintainers and the 2+1 PR rule.
Description
As a user of Cactus I want to be able to load plugins that are WASM modules, not just vanilla JS ones.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: