Euler Rust Implementation

Rust Rs-Cov RustClippy

Organization

All files share a common prefix with their problem number. All shared functions are moved to files in the include subfolder

Tests

Generic Problems

For each problem it will check the answer against a known dictionary. If the problem is not in the "known slow" category (meaning that I generate the correct answer with a poor solution), it will run it as many times as the benchmark plugin wants. Otherwise it is run exactly once.

A test fails if it gets the wrong answer or if it takes more than 1 minute.

Dependencies

I try to keep the dependencies of this project as small as possible, except for test plugins. At the moment there are no non-test dependencies for this section.

Usage

This folder contains a Makefile with several recipes, most of which are aliases to cargo commands. This facilitates the root Makefile dispatching tasks to each language, many of which have more complex build or test processes.

test

Alias for cargo test.

test_auto

Runs tests in parallel with one less thread than you have CPUs. Alias for cargo test -j.

test_%

Runs tests in parallel with the specified number of threads. Alias for cargo test -j $*.

clean

Alias for cargo clean.

Live Tests

To run these problems in your browser, click here!

Library Code

Problems Solved