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
We are starting to build applications now with JS/TS for the Raindex app. A lot of the functionality needed for these apps has already been built as part of Raindex, however the code is Rust.
Ideally we would:
resuse as much of the same code as possible
only have one place to maintain the core functionality required for the Raindex app, CLI applications and JS applications.
Solution
Set up an NPM package for Raindex that is a thin wrapper on our existing crates. It doesn't need all of the functionality that we already have, just a clear path/pattern to follow, and we can add things as we need.
However, the first thing we need is a function that takes:
a dotrain order with frontmatter YAML following the order spec
a deployment (just the name as a string)
any binding overrides
@rouzwelt can you please flesh out the plan for this?
firstly need to figure out a way move things into segments with optional deps and using cfg flags to be able to build for a wasm32 target, that would include to ideally isolate the main functionalities required for this scope in a way that a wasm32 target can be built, that is most important and difficult part, we need to make all of rain repos that deps washable as the first part of this, ie all of our repos that deps should be able to build for wasm individually, and then we can try wasming the ob crates
next we would need to build an js API for it, something similar that we have in dotrain, might not be necessarily necessary for this scope depending on how easily we can bring the things into wasm bindgen.
lastly need to have a proper npm package setup and also formatting the final js/ts output to be esm/cjs compatible (example of that is dotrain), as well as some js test and a npm build script
todo:
- make ob crates' deps that are rain repos to build natively for wasm target:
Problem
We are starting to build applications now with JS/TS for the Raindex app. A lot of the functionality needed for these apps has already been built as part of Raindex, however the code is Rust.
Ideally we would:
Solution
Set up an NPM package for Raindex that is a thin wrapper on our existing crates. It doesn't need all of the functionality that we already have, just a clear path/pattern to follow, and we can add things as we need.
However, the first thing we need is a function that takes:
@rouzwelt can you please flesh out the plan for this?
todo:
The text was updated successfully, but these errors were encountered: