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

Support Rust #176

Closed
eldipa opened this issue Jun 20, 2021 · 2 comments · Fixed by #197
Closed

Support Rust #176

eldipa opened this issue Jun 20, 2021 · 2 comments · Fixed by #197
Labels
enhancement something nice to have but it is not neither critical nor urgent
Milestone

Comments

@eldipa
Copy link
Collaborator

eldipa commented Jun 20, 2021

Describe the feature you'd like
byexample supports C/C++ so Rust is the reasonable next step. A quick PoC with evcxr, the interpreter for rust, shows that it is viable but not without some hard corners.

Additional context (optional)
We need a way to disable the color from the output. Perhaps a simplified processing with pyte ? #180

@eldipa eldipa added the enhancement something nice to have but it is not neither critical nor urgent label Jun 20, 2021
@eldipa
Copy link
Collaborator Author

eldipa commented Jun 25, 2021

The first PoC gave really good results. evcxr works quite well with byexample but there are still some unresolved issues:

  • stdout/stderr output from the example is printed by evcxr in background so in some cases the output arrives after the prompt. A quick hack is to add a delay after the prompt and a subsequent output read trying to get the missing few bits (-x-delayafterprompt flag). But it is fragile, see Use last line of the expected output to sync with the interpreter in addition to the prompt #181
  • evcxr is very slow. In theory the compiled examples could be cached using sccache but I couldn't make it work:sccache keeps saying that the compiled snippets are Non-cacheable calls.

@eldipa
Copy link
Collaborator Author

eldipa commented Jun 25, 2021

About sccache, evcxr/evcxr#184

@eldipa eldipa mentioned this issue Jul 4, 2021
@eldipa eldipa added this to the 10.2.0 milestone Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement something nice to have but it is not neither critical nor urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant