[package] name = "flecs_ecs" version = "0.1.3" edition.workspace = true license.workspace = true repository.workspace = true authors = ["Indra de Backere "] description = "Rust API for the C/CPP flecs ECS library " keywords = ["ecs", "flecs", "ECS", "game-development", "gamedev"] categories = ["game-development", "api-bindings", "simulation", "data-structures"] exclude = ["assets/"] [lints] workspace = true # When updating this, also update the `fdocs` task in `Makefile.toml` [package.metadata.docs.rs] rustdoc-args = [ "-Zunstable-options", "--generate-link-to-definition"] cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"] [dependencies] flecs_ecs_derive = { version = "0.1.0", path = "../flecs_ecs_derive" } flecs_ecs_sys = { version = "0.1.2", path = "../flecs_ecs_sys" } bitflags = "2.6.0" compact_str = "0.8.0" fxhash = "0.2.1" [dev-dependencies] criterion = "0.5.1" seq-macro = "0.3.5" rand = "0.8.5" ctor = "0.2.7" insta = { version = "1.38.0", features = ["yaml","filters"] } # used for capturing stdout in the examples test cases. Works only on Nightly, meant # to be used with flecs_nightly_tests feature flag #capture-stdio = "0.1.1" [features] ###################### # sys feature flags ###################### # Regenerate the C binding for flecs C flecs_regenerate_binding_c = ["flecs_ecs_sys/regenerate_binding"] # force build debug for flecs C, even in release mode flecs_force_build_debug_c = ["flecs_ecs_sys/force_build_debug"] # force build release for C flecs, even in debug mode flecs_force_build_release_c = ["flecs_ecs_sys/force_build_release"] # force enables both rust and c ecs asserts, useful when running release mode, but wanting the asserts for safety flecs_force_enable_ecs_asserts = ["flecs_ecs_sys/flecs_force_enable_ecs_asserts"] # tell C flecs to use the OS allocator instead of its own flecs_use_os_alloc = ["flecs_ecs_sys/use_os_alloc"] # Enabling this will not build a copy of flecs into this library. # Instead, the executable that this is linked with will need to # provide the symbols required. This is useful when using both # Rust and C++ code in an application and a copy of flecs is # already being linked into the executable via other means. flecs_disable_build_c = ["flecs_ecs_sys/disable_build_c"] ###################### # Flecs feature flags ###################### # When set, the Rust API will require that components are registered before they # are used. This is useful in multithreaded applications, where components need # to be registered beforehand, and to catch issues in projects where component # registration is mandatory. Disabling automatic component registration also # improves performance, more so in multi-world applications. # The C API is not affected by this feature. flecs_manual_registration = [] # Adjust the maximum number of terms in queries to 64. Default is 32. flecs_term_count_64 = ["flecs_ecs_sys/flecs_term_count_64"] # Module support flecs_module = ["flecs_ecs_sys/flecs_module"] # ECS data definition format flecs_script = ["flecs_ecs_sys/flecs_script", "flecs_meta", "flecs_doc", "flecs_module"] # Snapshot & restore ECS data flecs_snapshot = ["flecs_ecs_sys/flecs_snapshot"] # Access runtime statistics flecs_stats = ["flecs_ecs_sys/flecs_stats", "flecs_pipeline", "flecs_timer", "flecs_module"] # Expose component data as statistics flecs_metrics = ["flecs_ecs_sys/flecs_metrics", "flecs_meta", "flecs_units", "flecs_pipeline"] # Monitor conditions for errors flecs_alerts = ["flecs_ecs_sys/flecs_alerts", "flecs_pipeline"] # System support flecs_system = ["flecs_ecs_sys/flecs_system", "flecs_module"] # Pipeline support flecs_pipeline = ["flecs_ecs_sys/flecs_pipeline", "flecs_module", "flecs_system"] # Timer support flecs_timer = ["flecs_ecs_sys/flecs_timer", "flecs_module", "flecs_pipeline"] # Reflection support flecs_meta = ["flecs_ecs_sys/flecs_meta", "flecs_module"] # Builtin standard units flecs_units = ["flecs_ecs_sys/flecs_units", "flecs_module", "flecs_meta"] # Parsing JSON to/from component values flecs_json = ["flecs_ecs_sys/flecs_json", "flecs_meta"] # Document entities & components flecs_doc = ["flecs_ecs_sys/flecs_doc", "flecs_module"] # When enabled ECS provides more detailed logs flecs_log = ["flecs_ecs_sys/flecs_log"] # Application addon flecs_app = ["flecs_ecs_sys/flecs_app", "flecs_pipeline"] # Default implementation for OS API flecs_os_api_impl = ["flecs_ecs_sys/flecs_os_api_impl"] # Tiny HTTP server for connecting to remote UI flecs_http = ["flecs_ecs_sys/flecs_http"] # REST API for querying application data flecs_rest = ["flecs_ecs_sys/flecs_rest", "flecs_http", "flecs_json", "flecs_pipeline"] # Journaling addon (disabled by default) flecs_journal = ["flecs_ecs_sys/flecs_journal","flecs_log"] # When enabled, flecs ecs library will run examples as test cases. Works only in Nightly flecs_nightly_tests = [] default = [ #"flecs_regenerate_binding_c", #"flecs_nightly_tests", "flecs_module", "flecs_script", "flecs_snapshot", "flecs_stats", "flecs_metrics", "flecs_alerts", "flecs_system", "flecs_pipeline", "flecs_timer", "flecs_meta", "flecs_units", "flecs_json", "flecs_doc", "flecs_log", "flecs_app", "flecs_os_api_impl", "flecs_http", "flecs_rest", ] ###################### # Examples ###################### [[example]] name = "examples" path = "examples/flecs/z_ignore_main_test.rs" test = true doc-scrape-examples = true