staticsort-0.1.2 has been yanked.
Implements a macro providing a compile-time quicksort function for arrays of any type and length.
Contributions/suggestions/etc. very welcome!
Minimum supported Rust version: due to the use of unstable const fn features, this is a nightly-only crate at the moment.
Fully #![no_std] compatible by default.
A basic usage example:
use staticsort;
static X: = ;
static Y: = ;
// The macro takes the following parameters in the order they're listed:
// type to sort, index to start at, index to end at, total array length, and name of existing
// const / static array variable (or directly-passed "anonymous" array).
// Sort all of X:
static XX: = staticsort!;
// Just sort half of Y:
static YY: = staticsort!;
// Sort all of an array that's the same as X, but passed directly as a parameter:
static ZZ: = staticsort!;
License:
Licensed under either the MIT license or version 2.0 of the Apache License. Your choice as to which! Any source code contributions will be dual-licensed in the same fashion.