diff options
| -rw-r--r-- | alligator_render/Cargo.toml | 5 | ||||
| -rw-r--r-- | alligator_render/examples/bunnymark.rs | 7 | ||||
| -rw-r--r-- | alligator_render/src/lib.rs | 1 | ||||
| -rw-r--r-- | alligator_render/src/renderer.rs | 4 |
4 files changed, 7 insertions, 10 deletions
diff --git a/alligator_render/Cargo.toml b/alligator_render/Cargo.toml index e633fb9..cefb924 100644 --- a/alligator_render/Cargo.toml +++ b/alligator_render/Cargo.toml @@ -2,6 +2,7 @@ name = "alligator_render" version = "0.1.0" edition = "2021" +rust-version = "1.65" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,13 +18,13 @@ image = "0.24" texture_packer = "0.24" profiling = "1" tracy-client = { version = "0.14", optional = true } -dhat = "0.3" +dhat = { version = "0.3", optional = true } [lib] crate-type = ["cdylib", "lib"] [features] -dhat = [] +dhat = ["dep:dhat"] profile-with-tracy = ["tracy-client", "profiling/profile-with-tracy"] [[example]] diff --git a/alligator_render/examples/bunnymark.rs b/alligator_render/examples/bunnymark.rs index a343ce5..7ef97b7 100644 --- a/alligator_render/examples/bunnymark.rs +++ b/alligator_render/examples/bunnymark.rs @@ -1,6 +1,3 @@ -#![feature(once_cell)] -#![feature(let_else)] - use std::{num::NonZeroU32, time::Instant}; use alligator_render::{ @@ -105,6 +102,10 @@ struct Bunny { } fn main() { + #[cfg(feature = "profile-with-tracy")] + profiling::tracy_client::Client::start(); + profiling::register_thread!("main"); + // configure the render window let config = RenderWindowConfig { title: "BunnyMark", diff --git a/alligator_render/src/lib.rs b/alligator_render/src/lib.rs index debb68c..5e0aab6 100644 --- a/alligator_render/src/lib.rs +++ b/alligator_render/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(let_else)] #![feature(nonzero_min_max)] #![feature(type_alias_impl_trait)] #![warn(clippy::pedantic)] diff --git a/alligator_render/src/renderer.rs b/alligator_render/src/renderer.rs index 9f4aad1..064ff31 100644 --- a/alligator_render/src/renderer.rs +++ b/alligator_render/src/renderer.rs @@ -130,10 +130,6 @@ impl Renderer { // TODO make it possible to use without a window (ie, use a bitmap in memory as a surface) // TODO this function needs to be smaller pub fn new(config: &RenderWindowConfig) -> Result<Self, NewRendererError> { - #[cfg(feature = "profile-with-tracy")] - profiling::tracy_client::Client::start(); - profiling::register_thread!("main"); - // build the window let event_loop = EventLoop::new(); let window = config.to_window().build(&event_loop)?; |
