From 191725f70064acef5e235371bb2979fe5d96782a Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Sat, 2 Sep 2023 10:19:13 -0400 Subject: [PATCH] Now it's choking on slog --- BUILD.bazel | 8 ++++++++ cmd/echo/BUILD.bazel | 8 +++++--- cmd/ecs/BUILD.bazel | 18 ++++++++++++++++++ engine/BUILD.bazel | 12 ++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 cmd/ecs/BUILD.bazel diff --git a/BUILD.bazel b/BUILD.bazel index 48632e3..882a659 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,3 +1,4 @@ +load("@rules_go//go:def.bzl", "go_library") load("@gazelle//:def.bzl", "gazelle") gazelle(name = "gazelle") @@ -11,3 +12,10 @@ gazelle( ], command = "update-repos", ) + +go_library( + name = "gomud", + srcs = ["version.go"], + importpath = "code.ndumas.com/ndumas/gomud", + visibility = ["//visibility:public"], +) diff --git a/cmd/echo/BUILD.bazel b/cmd/echo/BUILD.bazel index 94dae79..3ce5677 100644 --- a/cmd/echo/BUILD.bazel +++ b/cmd/echo/BUILD.bazel @@ -6,9 +6,11 @@ go_library( importpath = "code.ndumas.com/ndumas/gomud/cmd/echo", visibility = ["//visibility:private"], deps = [ + "//:gomud", + "//engine", "//logger", "//telnet", - "@com_github_threedotslabs_watermill//:watermill", + "@com_github_engoengine_ecs//:ecs", "@com_github_threedotslabs_watermill//message", "@com_github_threedotslabs_watermill//message/router/middleware", "@com_github_threedotslabs_watermill//message/router/plugin", @@ -21,8 +23,8 @@ go_binary( embed = [":echo_lib"], visibility = ["//visibility:public"], x_defs = { - "code.ndumas.com/ndumas/gomud.Version":"STABLE_GIT_VERSION", - "code.ndumas.com/ndumas/gomud.Build":"STABLE_GIT_COMMIT", + "code.ndumas.com/ndumas/gomud.Version": "STABLE_GIT_VERSION", + "code.ndumas.com/ndumas/gomud.Build": "STABLE_GIT_COMMIT", }, ) diff --git a/cmd/ecs/BUILD.bazel b/cmd/ecs/BUILD.bazel new file mode 100644 index 0000000..c70be4b --- /dev/null +++ b/cmd/ecs/BUILD.bazel @@ -0,0 +1,18 @@ +load("@rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "ecs_lib", + srcs = ["main.go"], + importpath = "code.ndumas.com/ndumas/gomud/cmd/ecs", + visibility = ["//visibility:private"], + deps = [ + "//engine", + "@com_github_engoengine_ecs//:ecs", + ], +) + +go_binary( + name = "ecs", + embed = [":ecs_lib"], + visibility = ["//visibility:public"], +) diff --git a/engine/BUILD.bazel b/engine/BUILD.bazel index 387030c..0be711c 100644 --- a/engine/BUILD.bazel +++ b/engine/BUILD.bazel @@ -7,3 +7,15 @@ go_library( visibility = ["//visibility:public"], deps = ["@com_github_engoengine_engo//:engo"], ) + +go_library( + name = "engine", + srcs = [ + "components.go", + "telnetrenderer.go", + "world.go", + ], + importpath = "code.ndumas.com/ndumas/gomud/engine", + visibility = ["//visibility:public"], + deps = ["@com_github_engoengine_ecs//:ecs"], +)