[package] name = "chuot" version = "0.3.1" edition = "2021" authors = ["Thomas Versteeg "] license = "AGPL-3.0" readme = "README.md" description = "AGPL licensed and opinionated game engine for pixel-art games" homepage = "https://tversteeg.nl/chuot" documentation = "https://docs.rs/chuot" repository = "https://github.com/tversteeg/chuot.git" keywords = ["gamedev", "utility"] categories = [ "games", "game-engines", ] rust-version = "1.79.0" include = ["/src", "build.rs", "/shaders"] [package.metadata.docs.rs] # Only enable features that actually expose APIs features = ["read-texture"] # Supported platforms targets = [ # Linux (X11 & Wayland) "x86_64-unknown-linux-gnu", # Web "wasm32-unknown-unknown", # Windows "x86_64-pc-windows-msvc", # MacOS "x86_64-apple-darwin", ] rustdoc-args = ["--cfg", "docsrs"] [features] default = ["read-texture"] # Process and embed all assets into the binary for producing an optimized single binary. # # This is the only way to load "external" assets when building for the web. embed-assets = ["chuot-macros/embed-assets", "dep:imgref"] # Keep the texture data in memory so the pixel data can be retrieved. # # If disabled some texture functionality is not available because all textures are uploaded to the GPU and then removed from memory. read-texture = [] [dependencies] chuot-macros = { path = "crates/macros", version = "0.2.3" } chuot-packer = { path = "crates/packer", version = "0.2.1" } bytemuck = { version = "1.20.0", features = ["derive"] } downcast-rs = "1.2.1" fastrand = "2.2.0" gilrs = "0.11.0" glam = { version = "0.29.2", features = ["bytemuck", "fast-math"] } hashbrown = "0.15.1" imgref = { version = "1.11.0", default-features = false, optional = true } kira = { version = "0.9.6", default-features = false, features = ["cpal", "ogg"] } nanoserde = "0.1.37" num-integer = "0.1.46" phf = "0.11.2" png = "0.17.14" rgb = { version = "0.8.50", features = ["bytemuck"], default-features = false } smallvec = { version = "1.13.2", features = ["const_new", "union"] } smol_str = "0.3.2" web-time = "1.1.0" winit = "0.30.5" # Dependencies specifically for non-web platforms [target.'cfg(not(target_arch = "wasm32"))'.dependencies] notify-debouncer-mini = "0.5.0" pollster = "0.4.0" wgpu = { version = "23.0.0", default-features = false, features = ["wgsl"] } # Dependencies specifically for the web platform [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.7" wasm-bindgen-futures = "0.4.45" web-sys = { version = "0.3.72", features = ["Document", "Window", "Element"] } wgpu = { version = "23.0.0", default-features = false, features = ["webgl", "wgsl"] } [build-dependencies] naga = { version = "23.0.0", default-features = false, features = ["wgsl-in", "wgsl-out"] } wgsl-minifier = "0.6.0" [workspace] members = ["crates/macros", "crates/packer", "run-wasm"] # Ensure audio performance is not too poor when running in dev mode [profile.dev.package] png.opt-level = 3 kira.opt-level = 3 cpal.opt-level = 3 symphonia.opt-level = 3 symphonia-format-ogg.opt-level = 3 symphonia-codec-vorbis.opt-level = 3 # Create small WASM binaries [profile.release] panic = "abort" codegen-units = 1 opt-level = "z" lto = true strip = true # Extra lints that must be adhered to [workspace.lints.rust] unsafe_code = "forbid" [workspace.lints.clippy] # Nursery branches_sharing_code = "warn" clear_with_drain = "warn" cognitive_complexity = "warn" collection_is_never_read = "warn" debug_assert_with_mut_call = "warn" derive_partial_eq_without_eq = "warn" empty_line_after_doc_comments = "warn" empty_line_after_outer_attr = "warn" equatable_if_let = "warn" fallible_impl_from = "warn" imprecise_flops = "warn" iter_on_empty_collections = "warn" iter_on_single_items = "warn" iter_with_drain = "warn" large_stack_frames = "warn" missing_const_for_fn = "warn" mutex_integer = "warn" needless_collect = "warn" needless_pass_by_ref_mut = "warn" non_send_fields_in_send_ty = "warn" nonstandard_macro_braces = "warn" option_if_let_else = "warn" or_fun_call = "warn" path_buf_push_overwrite = "warn" read_zero_byte_vec = "warn" redundant_clone = "warn" set_contains_or_insert = "warn" significant_drop_in_scrutinee = "warn" significant_drop_tightening = "warn" string_lit_as_bytes = "warn" suboptimal_flops = "warn" suspicious_operation_groupings = "warn" too_long_first_doc_paragraph = "warn" trailing_empty_array = "warn" trait_duplication_in_bounds = "warn" trivial_regex = "warn" tuple_array_conversions = "warn" type_repetition_in_bounds = "warn" unnecessary_struct_initialization = "warn" unused_peekable = "warn" unused_rounding = "warn" use_self = "warn" useless_let_if_seq = "warn" # Restriction assertions_on_result_states = "warn" clone_on_ref_ptr = "warn" create_dir = "warn" dbg_macro = "warn" decimal_literal_representation = "warn" empty_drop = "warn" empty_structs_with_brackets = "warn" exhaustive_enums = "warn" exhaustive_structs = "warn" exit = "warn" filetype_is_file = "warn" float_cmp_const = "warn" fn_to_numeric_cast_any = "warn" format_push_string = "warn" get_unwrap = "warn" if_then_some_else_none = "warn" lossy_float_literal = "warn" map_err_ignore = "warn" mem_forget = "warn" missing_asserts_for_indexing = "warn" missing_inline_in_public_items = "warn" mixed_read_write_in_expression = "warn" mutex_atomic = "warn" needless_raw_strings = "warn" print_stdout = "warn" pub_without_shorthand = "warn" rc_buffer = "warn" rc_mutex = "warn" redundant_type_annotations = "warn" ref_patterns = "warn" rest_pat_in_fully_bound_structs = "warn" same_name_method = "warn" self_named_module_files = "warn" semicolon_inside_block = "warn" str_to_string = "warn" string_add = "warn" string_lit_chars_any = "warn" string_slice = "warn" string_to_string = "warn" suspicious_xor_used_as_pow = "warn" todo = "warn" try_err = "warn" unimplemented = "warn" unnecessary_self_imports = "warn" unneeded_field_pattern = "warn" unseparated_literal_suffix = "warn" unused_trait_names = "warn" use_debug = "warn" verbose_file_reads = "warn" # Cargo negative_feature_names = "warn" redundant_feature_names = "warn" wildcard_dependencies = "warn" # Pedantic bool_to_int_with_if = "warn" case_sensitive_file_extension_comparisons = "warn" cloned_instead_of_copied = "warn" copy_iterator = "warn" doc_link_with_quotes = "warn" doc_markdown = "warn" empty_enum_variants_with_brackets = "warn" enum_glob_use = "warn" expl_impl_clone_on_copy = "warn" explicit_deref_methods = "warn" explicit_into_iter_loop = "warn" explicit_iter_loop = "warn" filter_map_next = "warn" flat_map_option = "warn" float_cmp = "warn" fn_params_excessive_bools = "warn" from_iter_instead_of_collect = "warn" if_not_else = "warn" ignored_unit_patterns = "warn" inconsistent_struct_constructor = "warn" index_refutable_slice = "warn" inefficient_to_string = "warn" into_iter_without_iter = "warn" invalid_upcast_comparisons = "warn" iter_filter_is_ok = "warn" iter_filter_is_some = "warn" iter_not_returning_iterator = "warn" iter_without_into_iter = "warn" large_futures = "warn" large_stack_arrays = "warn" large_types_passed_by_value = "warn" linkedlist = "warn" macro_use_imports = "warn" manual_assert = "warn" manual_instant_elapsed = "warn" manual_is_variant_and = "warn" manual_let_else = "warn" manual_ok_or = "warn" manual_string_new = "warn" many_single_char_names = "warn" map_unwrap_or = "warn" match_bool = "warn" match_on_vec_items = "warn" match_same_arms = "warn" mismatching_type_param_order = "warn" missing_errors_doc = "warn" missing_panics_doc = "warn" must_use_candidate = "warn" mut_mut = "warn" naive_bytecount = "warn" needless_bitwise_bool = "warn" needless_continue = "warn" needless_for_each = "warn" needless_pass_by_value = "warn" needless_raw_string_hashes = "warn" no_effect_underscore_binding = "warn" no_mangle_with_rust_abi = "warn" option_as_ref_cloned = "warn" option_option = "warn" pub_underscore_fields = "warn" range_minus_one = "warn" range_plus_one = "warn" redundant_closure_for_method_calls = "warn" redundant_else = "warn" ref_binding_to_reference = "warn" ref_option = "warn" ref_option_ref = "warn" return_self_not_must_use = "warn" same_functions_in_if_condition = "warn" semicolon_if_nothing_returned = "warn" single_char_pattern = "warn" single_match_else = "warn" stable_sort_primitive = "warn" str_split_at_newline = "warn" string_add_assign = "warn" struct_excessive_bools = "warn" struct_field_names = "warn" trivially_copy_pass_by_ref = "warn" uninlined_format_args = "warn" unnecessary_box_returns = "warn" unnecessary_join = "warn" unnecessary_literal_bound = "warn" unnecessary_wraps = "warn" unnested_or_patterns = "warn" unused_async = "warn" unused_result_ok = "warn" unused_self = "warn" used_underscore_binding = "warn" wildcard_imports = "warn" zero_sized_map_values = "warn" [lints] workspace = true