Skip to content
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

rust language support #2401

Open
mash-graz opened this issue Oct 30, 2019 · 2 comments
Open

rust language support #2401

mash-graz opened this issue Oct 30, 2019 · 2 comments

Comments

@mash-graz
Copy link

mash-graz commented Oct 30, 2019

i'm just curious, if someone already has started to develop support for the rust language for iodide?

for jupyter there is evcxr available to evaluate little rust fragments in a notebook like manner. using its core library in iodide/pyodide would IMHO make a lot of sense, because rust and its WASM retated features are already used for the developement of this software. it would also help to make the extensibility and self-documetation of iodide more powerful. better integration and support for rust- resp. WASM-based components like plotters could significantly improve the performance of iodide in comparison to traditional java script based approaches.

@wlach
Copy link
Contributor

wlach commented Oct 30, 2019

This would be interesting, I guess the main question would be how to compile rust to webassembly should that it could be executed in the browser. There's two options here:

  1. Porting emscripten itself to webassembly (sounds really hard) and compile rust inside the brwoser
  2. Having a server-side process for accepting code fragments and returning webassembly as a response (also hard, but probably far more tractable)

If you just wanted to run a specific WASM component inside Iodide, that's far easier: the process should be basically the same as it is for any other JavaScript library. You can either import it directly inside the notebook or write a language plugin to make that more convenient. The vegaLite plugin that I've been experimenting with would be an example of the latter:

https://definitely-staging.iodide.io/notebooks/173/

@mash-graz
Copy link
Author

yes -- you are right! it doesn't look like an easy task to prepare the necessary tools as web/wasi components. all the practical implementaions, which try to solve similar tasks (evcxr, rust-playground and webassembly studio) actually handle it in a client-server manner by utilizing native tools on the host side. but eliminating this requirement is IMHO exactly the most fascinating feature of your software.

i just wrote a question concerning this topic on the relative vivid reddit rust board. maybe someone else can give us a hint, how to solve this desire.

but thanks for your kind reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants