peuler
peuler is a Rust crate with solutions to the Project Euler problems.
It contains solutions to the problems that I have solved so far, and I plan to add more solutions as I solve more problems.
Many general-purpose mathematical functions are offloaded to the pmath crate.
Example
use ;
let peuler = new;
assert_eq!;
No-std support
There is currently no support for no-std environments.
WebAssembly support
Since this crate depends on pmath,
which in turn depends on getrandom,
wasm32-unknown-unknown target is supported, but requires --cfg getrandom_backend="wasm_js" flag to be passed to the compiler.
See getrandom crate's documentation for more details.
Other WASM targets should work out of the box.
Command Line Interface
This crate also provides a command line interface (CLI) binary named peuler.
You can install it via cargo:
Then, to solve the first Project Euler problem, run:
For more information, run:
Features
This crate has the following optional (disabled by default) features:
cli: Enables the optional dependencies for building the CLI binary.
License
This project is licensed under the MIT License.
Contributing
Contributions to the currently available problems are welcome!
Please open an issue or a pull request in the GitHub repository.
Don't submit solutions to the currently unsolved problems, as I plan to solve them on my own.