From 55eb0bd42437cf070512454cb1104104cc06b72d Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Mon, 13 May 2024 17:05:47 -0700 Subject: [PATCH] feat: add ecasct bazel build recipe --- BUILD.bazel | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) diff --git a/BUILD.bazel b/BUILD.bazel index 1597d93..4705339 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,4 +1,5 @@ load("@rules_cc//cc:defs.bzl", "cc_library") +load("@rules_ecsact//ecsact:defs.bzl", "ecsact_build_recipe") load("//bazel:copts.bzl", "copts") package(default_visibility = ["//visibility:public"]) @@ -14,4 +15,154 @@ cc_library( copts = copts, ) +ecsact_build_recipe( + name = "ecsact_rt_entt", + codegen_plugins = { + "@ecsact_lang_cpp//cpp_header_codegen": "src", + "//rt_entt_codegen": "src", + }, + srcs = [ + ":headers", + "//runtime:sources", + ], + fetch_srcs = { + "include/entt": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entt.hpp", + ], + "include/entt/graph": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/graph/adjacency_matrix.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/graph/flow.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/graph/dot.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/graph/fwd.hpp", + ], + "include/entt/locator": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/locator/locator.hpp", + ], + "include/entt/poly": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/poly/fwd.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/poly/poly.hpp", + ], + "include/entt/process": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/process/fwd.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/process/process.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/process/scheduler.hpp", + ], + "include/entt/resource": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/resource/cache.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/resource/fwd.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/resource/loader.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/resource/resource.hpp", + ], + "include/entt/entity": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/registry.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/storage.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/entity.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/group.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/fwd.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/sparse_set.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/group.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/storage.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/component.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/mixin.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/view.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/handle.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/helper.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/observer.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/organizer.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/runtime_view.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/entity/snapshot.hpp", + ], + "include/entt/meta": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/adl_pointer.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/container.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/context.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/factory.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/fwd.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/meta.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/node.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/pointer.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/policy.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/range.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/resolve.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/template.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/type_traits.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/meta/utility.hpp", + ], + "include/entt/platform": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/platform/android-ndk-r17.hpp", + ], + "include/entt/signal": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/signal/sigh.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/signal/delegate.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/signal/dispatcher.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/signal/emitter.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/signal/fwd.hpp", + ], + "include/entt/config": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/config/version.h", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/config/macro.h", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/config/config.h", + ], + "include/entt/container": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/container/dense_map.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/container/fwd.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/container/dense_set.hpp", + ], + "include/entt/core": [ + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/compressed_pair.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/type_traits.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/fwd.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/iterator.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/memory.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/algorithm.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/utility.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/any.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/type_info.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/attribute.h", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/hashed_string.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/enum.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/family.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/ident.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/monostate.hpp", + "https://raw.githubusercontent.com/skypjack/entt/v3.12.2/src/entt/core/tuple.hpp", + ], + "include": [ + "https://raw.githubusercontent.com/Cyan4973/xxHash/v0.8.2/xxhash.h", + "https://raw.githubusercontent.com/Cyan4973/xxHash/v0.8.2/xxhash.c", + ], + }, + exports = [ + # core + "ecsact_execute_systems", + "ecsact_destroy_registry", + "ecsact_clear_registry", + "ecsact_create_entity", + "ecsact_ensure_entity", + "ecsact_entity_exists", + "ecsact_destroy_entity", + "ecsact_count_entities", + "ecsact_get_entities", + "ecsact_add_component", + "ecsact_has_component", + "ecsact_get_component", + "ecsact_count_components", + "ecsact_each_component", + "ecsact_get_components", + "ecsact_update_component", + "ecsact_remove_component", + # dynamic + "ecsact_system_execution_context_same", + "ecsact_system_execution_context_entity", + "ecsact_system_execution_context_generate", + "ecsact_system_execution_context_id", + "ecsact_system_execution_context_other", + "ecsact_system_execution_context_add", + "ecsact_system_execution_context_remove", + "ecsact_system_execution_context_get", + "ecsact_system_execution_context_update", + "ecsact_system_execution_context_has", + "ecsact_system_execution_context_action", + ], +) + exports_files(["build_recipe.yml"])