diff options
| author | Sophie Forrest <git@sophieforrest.com> | 2024-08-30 23:35:45 +1200 |
|---|---|---|
| committer | Sophie Forrest <git@sophieforrest.com> | 2024-08-30 23:35:45 +1200 |
| commit | 17b78f8cb127817b93f7e6ced7e55d8748806a80 (patch) | |
| tree | 22bccb1307c078da4fc6e0873c8a8c2d081408ab /src/engine.rs | |
| parent | 13b95941183666fadd090314e4e9af33283084cd (diff) | |
feat: bar engines behind features, optimise release and small profiles
Diffstat (limited to 'src/engine.rs')
| -rw-r--r-- | src/engine.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/engine.rs b/src/engine.rs index 6c69bc1..3269dff 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -2,8 +2,11 @@ //! //! This predominantly allows implementation of a [`u16`] executor. -use std::io::{Cursor, Read}; +#[cfg(feature = "bigint-engine")] +use std::io::Cursor; +use std::io::Read; +#[cfg(feature = "bigint-engine")] use byteorder::{BigEndian, ReadBytesExt}; use num_traits::{One, Unsigned, WrappingAdd, WrappingSub, Zero}; use thiserror::Error; @@ -66,6 +69,7 @@ impl Engine for executor::U8 { } } +#[cfg(feature = "engine-u16")] impl Engine for executor::U16 { type TapeInner = u16; @@ -89,6 +93,7 @@ impl Engine for executor::U16 { } } +#[cfg(feature = "engine-u32")] impl Engine for executor::U32 { type TapeInner = u32; |