From bef3d6baf59eb232e43ceca6e45cbec06ff9746a Mon Sep 17 00:00:00 2001 From: Pedro Ferreira Date: Sun, 27 Jul 2025 09:45:42 +0200 Subject: [PATCH 1/4] Fix spelling of "transparency" --- embedded-sprites/src/image.rs | 8 ++++---- embedded-sprites/src/sprite.rs | 10 +++++----- proc-macro/src/lib.rs | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/embedded-sprites/src/image.rs b/embedded-sprites/src/image.rs index b0cb402..26d5ba3 100644 --- a/embedded-sprites/src/image.rs +++ b/embedded-sprites/src/image.rs @@ -11,7 +11,7 @@ use embedded_graphics::pixelcolor::PixelColor; #[derive(Debug)] pub struct Image<'a, C: PixelColor> { pub(crate) width: u16, - pub(crate) transparenty: &'a [u8], + pub(crate) transparency: &'a [u8], pub(crate) colors: &'a [C], } @@ -50,7 +50,7 @@ impl Error { } impl<'a, C: PixelColor> Image<'a, C> { - /// create a new [Image] from a array of [PixelColor]s, a transparenty map. + /// create a new [Image] from a array of [PixelColor]s, a transparency map. /// /// Return an error, if the length of `colors` does not fit to the widht and height. /// You can unwrap the error in a const contexts, @@ -77,7 +77,7 @@ impl<'a, C: PixelColor> Image<'a, C> { /// unwrap_ctx!(Image::new(&IMAGE_DATA, &transparency![0, 0, 0, 1, 0], 3, 2)); /// ``` - pub const fn new(colors: &'a [C], transparenty: &'a [u8], width: u16, height: u16) -> Result { + pub const fn new(colors: &'a [C], transparency: &'a [u8], width: u16, height: u16) -> Result { if colors.len() % width as usize != 0 { return Err(Error::WrongPixelLength(Dimension::Width)); }; @@ -86,7 +86,7 @@ impl<'a, C: PixelColor> Image<'a, C> { }; Ok(Image { colors, - transparenty, + transparency, width, }) } diff --git a/embedded-sprites/src/sprite.rs b/embedded-sprites/src/sprite.rs index a1cd2d2..a660e36 100644 --- a/embedded-sprites/src/sprite.rs +++ b/embedded-sprites/src/sprite.rs @@ -1,6 +1,6 @@ use crate::image::Image; use core::fmt::Debug; -use embedded_graphics::{geometry::Point, pixelcolor::PixelColor, prelude::DrawTarget, Drawable, Pixel}; +use embedded_graphics::{geometry::Point, pixelcolor::PixelColor, prelude::{DrawTarget, Size}, Drawable, Pixel}; /// A [`Sprite`] given a [`Image`](crate::image::Image) a postion and make it draw able. /// @@ -30,11 +30,11 @@ pub struct PixelIter<'a, C: PixelColor> { impl<'a, C: PixelColor> Iterator for PixelIter<'a, C> { type Item = Pixel; fn next(&mut self) -> Option { - // allow also empty / shorter transparenty map + // allow also empty / shorter transparency map while self.next < self.tm_lengt - && (self.sprite.image.transparenty[self.next / 8] & (0b10000000 >> (self.next % 8))) != 0 + && (self.sprite.image.transparency[self.next / 8] & (0b10000000 >> (self.next % 8))) != 0 { - // simple skipt transparenty pixel + // simple skipt transparency pixel self.next += 1; } if self.next < self.sprite.image.colors.len() { @@ -60,7 +60,7 @@ impl<'a, C: PixelColor> Drawable for Sprite<'a, C> { { target.draw_iter(PixelIter { next: 0, - tm_lengt: self.image.transparenty.len() * 8, + tm_lengt: self.image.transparency.len() * 8, sprite: self, }) } diff --git a/proc-macro/src/lib.rs b/proc-macro/src/lib.rs index 4a1f10d..48a4378 100644 --- a/proc-macro/src/lib.rs +++ b/proc-macro/src/lib.rs @@ -79,9 +79,9 @@ fn expand( const _: &[u8] = ::core::include_bytes!(#path); const COLOR_ARRAY: &[#color_ty] = &#color_array; - const TRANSPARENTY_MAP: &[u8] = &#tmap_array; + const TRANSPARENCY_MAP: &[u8] = &#tmap_array; match ::embedded_sprites::image::Image::<'static, #color_ty>::new( - COLOR_ARRAY, TRANSPARENTY_MAP, #width, #height + COLOR_ARRAY, TRANSPARENCY_MAP, #width, #height ) { ::core::result::Result::Ok(img) => img, _ => panic!("Failed to construct image") From 80bc2e85ebda20214dafc04c2ca534bf5e427eca Mon Sep 17 00:00:00 2001 From: Pedro Ferreira Date: Sun, 27 Jul 2025 09:49:08 +0200 Subject: [PATCH 2/4] A few clippy/rustfmt fixes --- embedded-sprites/src/image.rs | 49 +++++++++++++++++----------------- embedded-sprites/src/sprite.rs | 2 +- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/embedded-sprites/src/image.rs b/embedded-sprites/src/image.rs index 26d5ba3..f2e3147 100644 --- a/embedded-sprites/src/image.rs +++ b/embedded-sprites/src/image.rs @@ -76,9 +76,8 @@ impl<'a, C: PixelColor> Image<'a, C> { /// const IMAGE: Image = /// unwrap_ctx!(Image::new(&IMAGE_DATA, &transparency![0, 0, 0, 1, 0], 3, 2)); /// ``` - pub const fn new(colors: &'a [C], transparency: &'a [u8], width: u16, height: u16) -> Result { - if colors.len() % width as usize != 0 { + if !colors.len().is_multiple_of(width as usize) { return Err(Error::WrongPixelLength(Dimension::Width)); }; if colors.len() / width as usize != height as usize { @@ -104,29 +103,29 @@ impl<'a, C: PixelColor> Image<'a, C> { /// The result is that the 3rd pixel is transparent, and all other pixels are opaque. #[macro_export] macro_rules! transparency { - ($($x:expr),*) => { - { - const N: usize = [$($x),*].len(); - const LEN: usize = N / 8 + if N % 8 > 0 { 1 } else { 0 }; - const T: [u8; LEN] = { - let mut t = [0u8; LEN]; - let mut i = 0; - let mut j = 7; - $( - t[i] |= ($x & 1 ) << j; - #[allow(unused_assignments)] - if j == 0 { - j = 7; - i += 1; - } else { - j -= 1; - } - )* - t - }; - T - } - }; + ($($x:expr),*) => { + { + const N: usize = [$($x),*].len(); + const LEN: usize = N / 8 + if N % 8 > 0 { 1 } else { 0 }; + const T: [u8; LEN] = { + let mut t = [0u8; LEN]; + let mut i = 0; + let mut j = 7; + $( + t[i] |= ($x & 1 ) << j; + #[allow(unused_assignments)] + if j == 0 { + j = 7; + i += 1; + } else { + j -= 1; + } + )* + t + }; + T + } + }; } #[cfg(test)] diff --git a/embedded-sprites/src/sprite.rs b/embedded-sprites/src/sprite.rs index a660e36..5e12360 100644 --- a/embedded-sprites/src/sprite.rs +++ b/embedded-sprites/src/sprite.rs @@ -1,6 +1,6 @@ use crate::image::Image; use core::fmt::Debug; -use embedded_graphics::{geometry::Point, pixelcolor::PixelColor, prelude::{DrawTarget, Size}, Drawable, Pixel}; +use embedded_graphics::{geometry::Point, pixelcolor::PixelColor, prelude::DrawTarget, Drawable, Pixel}; /// A [`Sprite`] given a [`Image`](crate::image::Image) a postion and make it draw able. /// From 45cdfb26cb5bd3c9696692c87e7e15c9723e8ee2 Mon Sep 17 00:00:00 2001 From: Pedro Ferreira Date: Sun, 27 Jul 2025 15:03:34 +0200 Subject: [PATCH 3/4] Optimize include_image macro --- proc-macro/src/lib.rs | 108 ++++++++++++++++++++++++++++-------------- 1 file changed, 73 insertions(+), 35 deletions(-) diff --git a/proc-macro/src/lib.rs b/proc-macro/src/lib.rs index 48a4378..6c45427 100644 --- a/proc-macro/src/lib.rs +++ b/proc-macro/src/lib.rs @@ -1,11 +1,32 @@ -use embedded_graphics::pixelcolor::{Bgr888, RgbColor as _}; -use image::{io::Reader as ImageReader, Pixel, RgbaImage}; +use embedded_graphics::pixelcolor::{raw::ToBytes, Rgb888}; +use image::{buffer::Pixels, io::Reader as ImageReader, Pixel, Rgba, RgbaImage}; use proc_macro::TokenStream; use proc_macro2::TokenStream as TokenStream2; use quote::quote; use std::path::PathBuf; use syn::{parse_macro_input, spanned::Spanned as _, Expr, ExprLit, ItemConst, Lit}; +fn pixels_to_rgb888(pixels: Pixels>) -> syn::Result<(Vec, Vec)> { + let mut colors = Vec::new(); + let mut transparency = Vec::new(); + + for pixel in pixels { + let mut channels = pixel.channels().iter(); + let r = *channels.next().unwrap_or(&0); + let g = *channels.next().unwrap_or(&0); + let b = *channels.next().unwrap_or(&0); + let a = *channels.next().unwrap_or(&255); + + // Create base color + let color = Rgb888::new(r, g, b); + + // Store transparency (true if alpha is 0) + transparency.push((a == 0) as u8); + colors.extend_from_slice(&color.to_be_bytes()); + } + Ok((colors, transparency)) +} + fn expand( ItemConst { attrs, @@ -39,49 +60,66 @@ fn expand( // convert input image to vec of colors let image: RgbaImage = image.into_rgba8(); - let pixels = image.pixels(); - let mut colors: Vec = Vec::new(); - let mut transparency = Vec::new(); - for pixel in pixels.into_iter() { - let mut chanel = pixel.channels().iter(); - // `Color::new()` only cuts bits; so we create a Bgr888 and convert it to - // our target color type - let color = Bgr888::new( - chanel.next().unwrap_or(&0).to_owned(), - chanel.next().unwrap_or(&0).to_owned(), - chanel.next().unwrap_or(&0).to_owned(), - ); - let a = chanel.next().map(|value| value == &0).unwrap_or(false); - transparency.push(a as u8); - colors.push(color); - } - - // contruct output; - let tmap_array = quote!(embedded_sprites::transparency![#(#transparency),*]); let color_ty = quote!(<#ty as ::embedded_sprites::private::Image>::Color); - let colors = colors.into_iter().map(|color| { - let r = color.r(); - let g = color.g(); - let b = color.b(); - quote!({ - let (r, g, b) = ::embedded_sprites::private::convert_from_bgr888:: - <#color_ty>(#r, #g, #b); - #color_ty::new(r, g, b) - }) - }); + let (colors, transparency) = pixels_to_rgb888(image.pixels())?; let color_array = quote!([#(#colors),*]); + + // this is a transparency array which represents each bit as a byte + let tmap_byte_array: TokenStream2 = quote!([#(#transparency),*]); + // size of an equivalent array which compresses 8bits into a single byte + let tmap_bit_array_len = transparency.len().div_ceil(8); + let width = image.width() as u16; let height = image.height() as u16; + let output = quote! { #(#attrs)* #vis #const_token #ident #colon_token #ty #eq_token { // include the bytes so that the compiler knows to recompile when the // image file changes const _: &[u8] = ::core::include_bytes!(#path); + const IMAGE_SIZE: usize = (#width * #height) as usize; + + const COLOR_BYTE_ARRAY: [u8; IMAGE_SIZE * 3] = #color_array; + const COLOR_ARRAY: [#color_ty; IMAGE_SIZE] = { + let mut colors = [#color_ty::new(0, 0, 0); IMAGE_SIZE]; + let mut idx = 0; + + // const loop + while idx < IMAGE_SIZE { + let base = idx * 3; + let (r, g, b) = ::embedded_sprites::private::convert_from_bgr888::<#color_ty>( + COLOR_BYTE_ARRAY[base], COLOR_BYTE_ARRAY[base + 1], COLOR_BYTE_ARRAY[base + 2] + ); + + colors[idx] = #color_ty::new(r, g, b); + idx += 1; + } + colors + }; + + const TRANSPARENCY_BYTE_ARRAY: [u8; IMAGE_SIZE] = #tmap_byte_array; + const TRANSPARENCY_MAP: [u8; #tmap_bit_array_len] = { + let mut TMAP = [0u8; #tmap_bit_array_len]; + let mut i = 0; + let mut j = 7; + let mut n = 0; + + // const loop + while n < IMAGE_SIZE { + TMAP[i] |= (TRANSPARENCY_BYTE_ARRAY[n] & 1 ) << j; + if j == 0 { + j = 7; + i += 1; + } else { + j -= 1; + } + n += 1; + } + TMAP + }; - const COLOR_ARRAY: &[#color_ty] = &#color_array; - const TRANSPARENCY_MAP: &[u8] = &#tmap_array; match ::embedded_sprites::image::Image::<'static, #color_ty>::new( - COLOR_ARRAY, TRANSPARENCY_MAP, #width, #height + &COLOR_ARRAY, &TRANSPARENCY_MAP, #width, #height ) { ::core::result::Result::Ok(img) => img, _ => panic!("Failed to construct image") @@ -89,7 +127,7 @@ fn expand( } #semi_token }; - //eprintln!("{output}"); + Ok(output) } From 3463fd42d7f87c3cfc3a27680b28fbf1781dd904 Mon Sep 17 00:00:00 2001 From: Pedro Ferreira Date: Sun, 27 Jul 2025 15:06:38 +0200 Subject: [PATCH 4/4] Update dependency --- Cargo.lock | 207 ++++++++++------------------------------------------- Cargo.toml | 2 +- 2 files changed, 40 insertions(+), 169 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b6a273..3de0e88 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "adler" @@ -8,12 +8,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - [[package]] name = "aliasable" version = "0.1.3" @@ -71,7 +65,7 @@ dependencies = [ "arrayvec", "log", "nom", - "num-rational 0.4.1", + "num-rational", "v_frame", ] @@ -92,9 +86,9 @@ checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" [[package]] name = "base64" -version = "0.13.1" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bit_field" @@ -216,16 +210,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "deflate" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" -dependencies = [ - "adler32", - "byteorder", -] - [[package]] name = "either" version = "1.11.0" @@ -257,13 +241,13 @@ dependencies = [ [[package]] name = "embedded-graphics-simulator" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aae99accd90e0eef8bd47648a85246e0ad2027219ed4121b048c3bf6988c069" +checksum = "a31606a4fb7d9d3a79a38d27bc2954cfa98682c8fea4b22c09a442785a80424e" dependencies = [ "base64", "embedded-graphics", - "image 0.23.14", + "image", "ouroboros", "sdl2", ] @@ -283,7 +267,7 @@ name = "embedded-sprites-proc-macro" version = "0.2.0" dependencies = [ "embedded-graphics", - "image 0.25.1", + "image", "proc-macro2", "quote", "syn 1.0.109", @@ -305,7 +289,7 @@ dependencies = [ "flume", "half", "lebe", - "miniz_oxide 0.7.2", + "miniz_oxide", "rayon-core", "smallvec", "zune-inflate", @@ -327,7 +311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", - "miniz_oxide 0.7.2", + "miniz_oxide", ] [[package]] @@ -359,16 +343,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "gif" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06" -dependencies = [ - "color_quant", - "weezl", -] - [[package]] name = "gif" version = "0.13.1" @@ -407,25 +381,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "image" -version = "0.23.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "gif 0.11.4", - "jpeg-decoder 0.1.22", - "num-iter", - "num-rational 0.3.2", - "num-traits", - "png 0.16.8", - "scoped_threadpool", - "tiff 0.6.1", -] - [[package]] name = "image" version = "0.25.1" @@ -436,15 +391,15 @@ dependencies = [ "byteorder", "color_quant", "exr", - "gif 0.13.1", + "gif", "image-webp", "num-traits", - "png 0.17.13", + "png", "qoi", "ravif", "rayon", "rgb", - "tiff 0.9.1", + "tiff", "zune-core", "zune-jpeg", ] @@ -504,15 +459,6 @@ dependencies = [ "libc", ] -[[package]] -name = "jpeg-decoder" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" -dependencies = [ - "rayon", -] - [[package]] name = "jpeg-decoder" version = "0.3.1" @@ -628,25 +574,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" -dependencies = [ - "adler32", -] - -[[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg", -] - [[package]] name = "miniz_oxide" version = "0.7.2" @@ -710,28 +637,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-rational" version = "0.4.1" @@ -761,9 +666,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "ouroboros" -version = "0.17.2" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ba07320d39dfea882faa70554b4bd342a5f273ed59ba7c1c6b4c840492c954" +checksum = "1e0f050db9c44b97a94723127e6be766ac5c340c48f2c4bb3ffa11713744be59" dependencies = [ "aliasable", "ouroboros_macro", @@ -772,13 +677,13 @@ dependencies = [ [[package]] name = "ouroboros_macro" -version = "0.17.2" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4c6225c69b4ca778c0aea097321a64c421cf4577b331c61b229267edabb6f8" +checksum = "3c7028bdd3d43083f6d8d4d5187680d0d3560d54df4cc9d752005268b41e64d0" dependencies = [ "heck 0.4.1", - "proc-macro-error", "proc-macro2", + "proc-macro2-diagnostics", "quote", "syn 2.0.58", ] @@ -795,18 +700,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "png" -version = "0.16.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" -dependencies = [ - "bitflags", - "crc32fast", - "deflate", - "miniz_oxide 0.3.7", -] - [[package]] name = "png" version = "0.17.13" @@ -817,7 +710,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.7.2", + "miniz_oxide", ] [[package]] @@ -827,36 +720,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "proc-macro2" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", + "unicode-ident", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro2-diagnostics" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", + "syn 2.0.58", "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" -dependencies = [ - "unicode-ident", + "yansi", ] [[package]] @@ -1011,12 +893,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "scoped_threadpool" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" - [[package]] name = "scopeguard" version = "1.2.0" @@ -1025,9 +901,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sdl2" -version = "0.35.2" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7959277b623f1fb9e04aea73686c3ca52f01b2145f8ea16f4ff30d8b7623b1a" +checksum = "3b498da7d14d1ad6c839729bd4ad6fc11d90a57583605f3b4df2cd709a9cd380" dependencies = [ "bitflags", "lazy_static", @@ -1037,9 +913,9 @@ dependencies = [ [[package]] name = "sdl2-sys" -version = "0.35.2" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3586be2cf6c0a8099a79a12b4084357aa9b3e0b0d7980e3b67aaf7a9d55f9f0" +checksum = "951deab27af08ed9c6068b7b0d05a93c91f0a8eb16b6b816a5e73452a43521d3" dependencies = [ "cfg-if", "libc", @@ -1191,17 +1067,6 @@ dependencies = [ "syn 2.0.58", ] -[[package]] -name = "tiff" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437" -dependencies = [ - "jpeg-decoder 0.1.22", - "miniz_oxide 0.4.4", - "weezl", -] - [[package]] name = "tiff" version = "0.9.1" @@ -1209,7 +1074,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" dependencies = [ "flate2", - "jpeg-decoder 0.3.1", + "jpeg-decoder", "weezl", ] @@ -1372,6 +1237,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + [[package]] name = "zune-core" version = "0.4.12" diff --git a/Cargo.toml b/Cargo.toml index aa10e3c..540f472 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,6 @@ repository = "https://github.com/LuckyTurtleDev/embedded-sprites" [workspace.dependencies] embedded-graphics = "0.8.1" -embedded-graphics-simulator = "0.6.0" +embedded-graphics-simulator = "0.7.0" embedded-sprites = {version = "0.2.0", path = "embedded-sprites"} embedded-sprites-proc-macro = {version = "0.2.0", path = "proc-macro"} \ No newline at end of file