# Objective - Contributes to #15460 ## Solution - Removed `petgraph` as a dependency from the `bevy_ecs` crate. - Replaced `TarjanScc` and `GraphMap` with specialised in-tree alternatives. ## Testing - Ran CI locally. - Added new unit tests to check ordering invariants. - Confirmed `petgraph` is no longer present in `cargo tree -p bevy_ecs` ## Migration Guide The `Dag::graph` method no longer returns a `petgraph` `DiGraph` and instead returns the new `DiGraph` type within `bevy_ecs`. Edge and node iteration methods are provided so conversion to the `petgraph` type should be trivial if required. ## Notes - `indexmap` was already in the dependency graph for `bevy_ecs`, so its inclusion here makes no difference to compilation time for Bevy. - The implementation for `Graph` is heavily inspired from the `petgraph` original, with specialisations added to simplify and improve the type. - `petgraph` does have public plans for `no_std` support, however there is no timeframe on if or when that functionality will be available. Moving to an in-house solution in the interim allows Bevy to continue developing its `no_std` offerings and further explore alternate graphing options. --------- Co-authored-by: Lixou <82600264+DasLixou@users.noreply.github.com> Co-authored-by: vero <11307157+atlv24@users.noreply.github.com>
		
			
				
	
	
		
			70 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			TOML
		
	
	
	
	
	
			
		
		
	
	
			70 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			TOML
		
	
	
	
	
	
[package]
 | 
						|
name = "bevy_ecs"
 | 
						|
version = "0.15.0-dev"
 | 
						|
edition = "2021"
 | 
						|
description = "Bevy Engine's entity component system"
 | 
						|
homepage = "https://bevyengine.org"
 | 
						|
repository = "https://github.com/bevyengine/bevy"
 | 
						|
license = "MIT OR Apache-2.0"
 | 
						|
keywords = ["ecs", "game", "bevy"]
 | 
						|
categories = ["game-engines", "data-structures"]
 | 
						|
rust-version = "1.81.0"
 | 
						|
 | 
						|
[features]
 | 
						|
default = ["bevy_reflect"]
 | 
						|
trace = []
 | 
						|
multi_threaded = ["bevy_tasks/multi_threaded", "arrayvec"]
 | 
						|
bevy_debug_stepping = []
 | 
						|
serialize = ["dep:serde"]
 | 
						|
track_change_detection = []
 | 
						|
reflect_functions = ["bevy_reflect", "bevy_reflect/functions"]
 | 
						|
detailed_trace = []
 | 
						|
 | 
						|
[dependencies]
 | 
						|
bevy_ptr = { path = "../bevy_ptr", version = "0.15.0-dev" }
 | 
						|
bevy_reflect = { path = "../bevy_reflect", version = "0.15.0-dev", optional = true }
 | 
						|
bevy_tasks = { path = "../bevy_tasks", version = "0.15.0-dev" }
 | 
						|
bevy_utils = { path = "../bevy_utils", version = "0.15.0-dev" }
 | 
						|
bevy_ecs_macros = { path = "macros", version = "0.15.0-dev" }
 | 
						|
 | 
						|
bitflags = "2.3"
 | 
						|
concurrent-queue = "2.5.0"
 | 
						|
disqualified = "1.0"
 | 
						|
fixedbitset = "0.5"
 | 
						|
serde = { version = "1", optional = true, default-features = false }
 | 
						|
derive_more = { version = "1", default-features = false, features = [
 | 
						|
  "error",
 | 
						|
  "from",
 | 
						|
  "display",
 | 
						|
  "into",
 | 
						|
  "as_ref",
 | 
						|
] }
 | 
						|
nonmax = "0.5"
 | 
						|
arrayvec = { version = "0.7.4", optional = true }
 | 
						|
smallvec = { version = "1", features = ["union"] }
 | 
						|
indexmap = { version = "2.5.0", default-features = false, features = ["std"] }
 | 
						|
variadics_please = "1.0"
 | 
						|
 | 
						|
[dev-dependencies]
 | 
						|
rand = "0.8"
 | 
						|
static_assertions = "1.1.0"
 | 
						|
 | 
						|
[[example]]
 | 
						|
name = "events"
 | 
						|
path = "examples/events.rs"
 | 
						|
 | 
						|
[[example]]
 | 
						|
name = "resources"
 | 
						|
path = "examples/resources.rs"
 | 
						|
 | 
						|
[[example]]
 | 
						|
name = "change_detection"
 | 
						|
path = "examples/change_detection.rs"
 | 
						|
 | 
						|
[lints]
 | 
						|
workspace = true
 | 
						|
 | 
						|
[package.metadata.docs.rs]
 | 
						|
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
 | 
						|
all-features = true
 |