wrap-cli icon indicating copy to clipboard operation
wrap-cli copied to clipboard

Decouple Wrap, Plugin, & App Bindings From CLI

Open dOrgJelli opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. Currently, the wrap wasm & plugin bindings are bundled into the CLI. This means that every time bindings have an update, we have to create a new release of the CLI.

Describe the solution you'd like Ideally we could import bindings into the CLI through an external link of some sort. Since the schema-bind package is a JS package, we could use NPM package references, and import the binding module from there. Alternatively a github URL could be used.

Ultimately we'd like to have bindings be built as wraps, so it could be a wrap URI in the future.

dOrgJelli avatar Apr 18 '23 01:04 dOrgJelli

app/ and plugin/ project bindings can live in the client repos. For example:

  • rust-client => app/rust & plugin/rust
  • python-client => app/python & plugin/python
  • javascript-client => app/typescript & plugin/typescript

The wasm/ project bindings can live in a new "wrap" repo. For example:

  • rust-wrap => wasm/rust
  • assemblyscript-wrap => wasm/assemblyscript

NOTE: we should consider changing wasm/ to wrap/. NOTE: we should consider changing app/typescript to app/javascript, or alternatively javascript-client to typescript-client.

dOrgJelli avatar Apr 24 '23 15:04 dOrgJelli

Quick update: I started working on wrap port of the bindings here https://github.com/polywrap/wrap-abi-bindgen/tree/dev

I had some extra time today and thought this would be fun to get started on. Once implemented this will make the implementation of the above much simpler, as invoking wraps dynamically within the CLI is much easier than NPM packages.

dOrgJelli avatar May 10 '23 10:05 dOrgJelli