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
Package deltachat-rpc-server to npm #4694
Comments
do we have a |
no desktop uses it over deltachat-node, then uses the bindings. the bindings don't care how you run or communicate with core, you just implement an interface for doing so and then you're ready to use the bindings: https://www.npmjs.com/package/@deltachat/jsonrpc-client |
- [x] figgure out how to build the packages (that it installs native optional package automatically) - [X] Make the gluecode - [x] expose both the lowerlevel api that desktop uses (~~send objects and receive objects~~, getting path of rpc-server is enough) - [X] and the higher level api needed for bots (jsonrpc client) - [X] typescript types - [x] automatically pick the right binary from npm or allow getting it from env var, or give out an error (throw error) - [x] find out how to dev locally (use local built core in dc desktop) - there is the question of how to link the typescript client and the task to add a search in the cargo target folder for a debug build or a different way, find out some good flow that we can use and document for dc desktop + locally built core development - [x] build the packages in ci - [x] fix that deltachat-rpc-server is not executable postponed: - [ ] publish from ci - [ ] add key/token to deploy to npm Closes #4694 ## Related prs - deltachat-bot/echo#69 - deltachat/deltachat-desktop#3567 --------- Co-authored-by: link2xt <link2xt@testrun.org>
Currently there are 3 ways to use JSON-RPC bindings from JavaScript:
deltachat-rpc-server
process and useStdioTransport
to communicate with it without any binary API.Eventually we would like to deprecate first approach and switch to the third approach. The disadvantage of using the stdio approach currently is that the core distributed in the form of
deltachat-rpc-server
cannot be automatically installed as a dependency withnpm install
.To close this issue we need to package deltachat-rpc-server to npm, so a single package can be installed that provide an API to spawn bundled
deltachat-rpc-server
for the host architecture and provide a JSON-RPC client that can be used.This issue is split out of more general #4524.
The text was updated successfully, but these errors were encountered: