#![allow(dead_code)]
use link_cli::protocol::{
ArityRange, BinaryLinoOptions, BinaryLinoProtocol, LinoProtocol, TextLinoProtocol,
};
pub fn binary_options() -> Vec<BinaryLinoOptions> {
let mut options = Vec::new();
for external_references in [false, true] {
for arity in [
ArityRange::DOUBLETS,
ArityRange::between(2, 3),
ArityRange::at_least(1),
] {
for packed_widths in [false, true] {
options.push(BinaryLinoOptions {
external_references,
arity,
packed_widths,
});
}
}
}
options
}
pub fn protocols() -> Vec<Box<dyn LinoProtocol>> {
let mut protocols: Vec<Box<dyn LinoProtocol>> = vec![Box::new(TextLinoProtocol::new())];
for options in binary_options() {
protocols.push(Box::new(BinaryLinoProtocol::with_options(options)));
}
protocols
}