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

Add section on reproducing RISC-V Codewars runtime locally #440

Open
DonaldKellett opened this issue Aug 11, 2022 · 1 comment
Open

Add section on reproducing RISC-V Codewars runtime locally #440

DonaldKellett opened this issue Aug 11, 2022 · 1 comment

Comments

@DonaldKellett
Copy link
Member

Depends: #438

Solvers may wish to develop RISC-V solutions and/or translations locally. It isn't immediately obvious how to do so, since it differs from the native architecture of most consumer devices at the time of writing. At least it would be nice to mention that one does not need to purchase their own RISC-V SoC and load Linux on it in order to reproduce the Codewars environment locally ;-)

We could simply mention that Codewars uses ghcr.io/codewars/riscv for the execution environment and have the solver figure out the rest, but since it outputs Codewars output format which isn't very human-friendly, perhaps we should guide users on setting up a similar environment using the text reporter instead which gives human-friendly output, e.g. docker.io/donaldsebleung/cgreen

@kazk
Copy link
Member

kazk commented Aug 11, 2022

but since it outputs Codewars output format which isn't very human-friendly, perhaps we should guide users on setting up a similar environment using the text reporter instead which gives human-friendly output

I think we can change the main to use human-friendly output based on an environment variable or a flag. Then change bin/run to support it.

https://github.com/codewars/riscv/blob/0679125cdd8326acf398c617909a681e06191c71/workspace/tests.c#L6-L8

int main(int argc, char **argv) {
  return run_test_suite(solution_tests(), create_codewars_reporter());
}

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