summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerge Bazanski <q3k@q3k.org>2021-07-11 00:46:57 +0000
committerSerge Bazanski <q3k@q3k.org>2021-07-11 00:46:57 +0000
commit832218c6a54e3d9410f0610f5cc5d31728c3b7d7 (patch)
treeea1866776fa435256bab17cd6a83ee5245d04c01
parent982f5e23dbf77999889a4b02cd7836b5cfefee4a (diff)
downloadabrasion-832218c6a54e3d9410f0610f5cc5d31728c3b7d7.tar.gz
abrasion-832218c6a54e3d9410f0610f5cc5d31728c3b7d7.tar.bz2
abrasion-832218c6a54e3d9410f0610f5cc5d31728c3b7d7.tar.xz
abrasion-832218c6a54e3d9410f0610f5cc5d31728c3b7d7.zip
engine: flatten out src/
-rw-r--r--engine/BUILD54
-rw-r--r--engine/globals.rs (renamed from engine/src/globals.rs)0
-rw-r--r--engine/input.rs (renamed from engine/src/input.rs)0
-rw-r--r--engine/lib.rs (renamed from engine/src/lib.rs)0
-rw-r--r--engine/physics/color.rs (renamed from engine/src/physics/color.rs)0
-rw-r--r--engine/physics/mod.rs (renamed from engine/src/physics/mod.rs)0
-rw-r--r--engine/render/light.rs (renamed from engine/src/render/light.rs)2
-rw-r--r--engine/render/material.rs (renamed from engine/src/render/material.rs)0
-rw-r--r--engine/render/mesh.rs (renamed from engine/src/render/mesh.rs)0
-rw-r--r--engine/render/mod.rs (renamed from engine/src/render/mod.rs)0
-rw-r--r--engine/render/renderable.rs (renamed from engine/src/render/renderable.rs)0
-rw-r--r--engine/render/resource.rs (renamed from engine/src/render/resource.rs)0
-rw-r--r--engine/render/vulkan/data.rs (renamed from engine/src/render/vulkan/data.rs)0
-rw-r--r--engine/render/vulkan/material.rs (renamed from engine/src/render/vulkan/material.rs)0
-rw-r--r--engine/render/vulkan/mod.rs (renamed from engine/src/render/vulkan/mod.rs)0
-rw-r--r--engine/render/vulkan/pipeline.rs (renamed from engine/src/render/vulkan/pipeline.rs)0
-rw-r--r--engine/render/vulkan/pipeline_forward.rs (renamed from engine/src/render/vulkan/pipeline_forward.rs)0
-rw-r--r--engine/render/vulkan/qfi.rs (renamed from engine/src/render/vulkan/qfi.rs)0
-rw-r--r--engine/render/vulkan/shaders.rs (renamed from engine/src/render/vulkan/shaders.rs)0
-rw-r--r--engine/render/vulkan/surface_binding.rs (renamed from engine/src/render/vulkan/surface_binding.rs)0
-rw-r--r--engine/render/vulkan/swapchain_binding.rs (renamed from engine/src/render/vulkan/swapchain_binding.rs)0
-rw-r--r--engine/render/vulkan/worker.rs (renamed from engine/src/render/vulkan/worker.rs)0
-rw-r--r--engine/scripting.rs (renamed from engine/src/scripting.rs)0
-rw-r--r--engine/util/counter.rs (renamed from engine/src/util/counter.rs)0
-rw-r--r--engine/util/file.rs (renamed from engine/src/util/file.rs)2
-rw-r--r--engine/util/mod.rs (renamed from engine/src/util/mod.rs)0
-rw-r--r--engine/util/profiler.rs (renamed from engine/src/util/profiler.rs)0
-rw-r--r--engine/util/resourcemap.rs (renamed from engine/src/util/resourcemap.rs)0
-rw-r--r--hsvr/BUILD.bazel2
-rw-r--r--tools/release/BUILD.bazel (renamed from engine/release/BUILD.bazel)4
-rw-r--r--tools/release/defs.bzl (renamed from engine/release/defs.bzl)6
-rw-r--r--tools/release/pack.go (renamed from engine/release/pack.go)48
-rw-r--r--tools/release/proto/BUILD.bazel (renamed from engine/release/proto/BUILD.bazel)6
-rw-r--r--tools/release/proto/manifest.proto (renamed from engine/release/proto/manifest.proto)6
34 files changed, 65 insertions, 65 deletions
diff --git a/engine/BUILD b/engine/BUILD
index a1f89202..3a333c30 100644
--- a/engine/BUILD
+++ b/engine/BUILD
@@ -13,38 +13,38 @@ rust_library(
"-Zborrowck=mir",
],
srcs = [
- "src/lib.rs",
+ "lib.rs",
- "src/globals.rs",
- "src/input.rs",
- "src/scripting.rs",
+ "globals.rs",
+ "input.rs",
+ "scripting.rs",
- "src/physics/mod.rs",
- "src/physics/color.rs",
+ "physics/mod.rs",
+ "physics/color.rs",
- "src/render/mod.rs",
- "src/render/light.rs",
- "src/render/material.rs",
- "src/render/mesh.rs",
- "src/render/renderable.rs",
- "src/render/resource.rs",
+ "render/mod.rs",
+ "render/light.rs",
+ "render/material.rs",
+ "render/mesh.rs",
+ "render/renderable.rs",
+ "render/resource.rs",
- "src/render/vulkan/mod.rs",
- "src/render/vulkan/data.rs",
- "src/render/vulkan/material.rs",
- "src/render/vulkan/pipeline.rs",
- "src/render/vulkan/pipeline_forward.rs",
- "src/render/vulkan/qfi.rs",
- "src/render/vulkan/shaders.rs",
- "src/render/vulkan/surface_binding.rs",
- "src/render/vulkan/swapchain_binding.rs",
- "src/render/vulkan/worker.rs",
+ "render/vulkan/mod.rs",
+ "render/vulkan/data.rs",
+ "render/vulkan/material.rs",
+ "render/vulkan/pipeline.rs",
+ "render/vulkan/pipeline_forward.rs",
+ "render/vulkan/qfi.rs",
+ "render/vulkan/shaders.rs",
+ "render/vulkan/surface_binding.rs",
+ "render/vulkan/swapchain_binding.rs",
+ "render/vulkan/worker.rs",
- "src/util/mod.rs",
- "src/util/counter.rs",
- "src/util/file.rs",
- "src/util/profiler.rs",
- "src/util/resourcemap.rs",
+ "util/mod.rs",
+ "util/counter.rs",
+ "util/file.rs",
+ "util/profiler.rs",
+ "util/resourcemap.rs",
],
deps = [
"//lib/ecs",
diff --git a/engine/src/globals.rs b/engine/globals.rs
index 042d7d27..042d7d27 100644
--- a/engine/src/globals.rs
+++ b/engine/globals.rs
diff --git a/engine/src/input.rs b/engine/input.rs
index bfd417a5..bfd417a5 100644
--- a/engine/src/input.rs
+++ b/engine/input.rs
diff --git a/engine/src/lib.rs b/engine/lib.rs
index 2e93b9d6..2e93b9d6 100644
--- a/engine/src/lib.rs
+++ b/engine/lib.rs
diff --git a/engine/src/physics/color.rs b/engine/physics/color.rs
index 298e4ea9..298e4ea9 100644
--- a/engine/src/physics/color.rs
+++ b/engine/physics/color.rs
diff --git a/engine/src/physics/mod.rs b/engine/physics/mod.rs
index f0988c63..f0988c63 100644
--- a/engine/src/physics/mod.rs
+++ b/engine/physics/mod.rs
diff --git a/engine/src/render/light.rs b/engine/render/light.rs
index 1e66a14b..dfb04ac7 100644
--- a/engine/src/render/light.rs
+++ b/engine/render/light.rs
@@ -33,7 +33,7 @@ pub struct Omni {
impl Omni {
/// Make a test light. This has... a color. It's kinda yellow. And something close to 650
/// lumens of luminous power.
- // TODO(q3k): implement [Kry85] (eq. 68) somewhere in //engine/src/physics for generation
+ // TODO(q3k): implement [Kry85] (eq. 68) somewhere in //engine/physics for generation
// of nice lights colours from color temperature.
//
// [Kry85]
diff --git a/engine/src/render/material.rs b/engine/render/material.rs
index 96e07dbe..96e07dbe 100644
--- a/engine/src/render/material.rs
+++ b/engine/render/material.rs
diff --git a/engine/src/render/mesh.rs b/engine/render/mesh.rs
index e9a5ccad..e9a5ccad 100644
--- a/engine/src/render/mesh.rs
+++ b/engine/render/mesh.rs
diff --git a/engine/src/render/mod.rs b/engine/render/mod.rs
index b61e72d2..b61e72d2 100644
--- a/engine/src/render/mod.rs
+++ b/engine/render/mod.rs
diff --git a/engine/src/render/renderable.rs b/engine/render/renderable.rs
index f461875a..f461875a 100644
--- a/engine/src/render/renderable.rs
+++ b/engine/render/renderable.rs
diff --git a/engine/src/render/resource.rs b/engine/render/resource.rs
index 9172d5af..9172d5af 100644
--- a/engine/src/render/resource.rs
+++ b/engine/render/resource.rs
diff --git a/engine/src/render/vulkan/data.rs b/engine/render/vulkan/data.rs
index ae33116e..ae33116e 100644
--- a/engine/src/render/vulkan/data.rs
+++ b/engine/render/vulkan/data.rs
diff --git a/engine/src/render/vulkan/material.rs b/engine/render/vulkan/material.rs
index cbfea94e..cbfea94e 100644
--- a/engine/src/render/vulkan/material.rs
+++ b/engine/render/vulkan/material.rs
diff --git a/engine/src/render/vulkan/mod.rs b/engine/render/vulkan/mod.rs
index 6be69743..6be69743 100644
--- a/engine/src/render/vulkan/mod.rs
+++ b/engine/render/vulkan/mod.rs
diff --git a/engine/src/render/vulkan/pipeline.rs b/engine/render/vulkan/pipeline.rs
index 4b5f2568..4b5f2568 100644
--- a/engine/src/render/vulkan/pipeline.rs
+++ b/engine/render/vulkan/pipeline.rs
diff --git a/engine/src/render/vulkan/pipeline_forward.rs b/engine/render/vulkan/pipeline_forward.rs
index 09e3329b..09e3329b 100644
--- a/engine/src/render/vulkan/pipeline_forward.rs
+++ b/engine/render/vulkan/pipeline_forward.rs
diff --git a/engine/src/render/vulkan/qfi.rs b/engine/render/vulkan/qfi.rs
index ae8d634a..ae8d634a 100644
--- a/engine/src/render/vulkan/qfi.rs
+++ b/engine/render/vulkan/qfi.rs
diff --git a/engine/src/render/vulkan/shaders.rs b/engine/render/vulkan/shaders.rs
index 8ca26bed..8ca26bed 100644
--- a/engine/src/render/vulkan/shaders.rs
+++ b/engine/render/vulkan/shaders.rs
diff --git a/engine/src/render/vulkan/surface_binding.rs b/engine/render/vulkan/surface_binding.rs
index f7521420..f7521420 100644
--- a/engine/src/render/vulkan/surface_binding.rs
+++ b/engine/render/vulkan/surface_binding.rs
diff --git a/engine/src/render/vulkan/swapchain_binding.rs b/engine/render/vulkan/swapchain_binding.rs
index 1f58b271..1f58b271 100644
--- a/engine/src/render/vulkan/swapchain_binding.rs
+++ b/engine/render/vulkan/swapchain_binding.rs
diff --git a/engine/src/render/vulkan/worker.rs b/engine/render/vulkan/worker.rs
index 4cc5494d..4cc5494d 100644
--- a/engine/src/render/vulkan/worker.rs
+++ b/engine/render/vulkan/worker.rs
diff --git a/engine/src/scripting.rs b/engine/scripting.rs
index 8ea19a91..8ea19a91 100644
--- a/engine/src/scripting.rs
+++ b/engine/scripting.rs
diff --git a/engine/src/util/counter.rs b/engine/util/counter.rs
index 6303748d..6303748d 100644
--- a/engine/src/util/counter.rs
+++ b/engine/util/counter.rs
diff --git a/engine/src/util/file.rs b/engine/util/file.rs
index a82d59d4..490c5641 100644
--- a/engine/src/util/file.rs
+++ b/engine/util/file.rs
@@ -70,7 +70,7 @@ impl std::io::Seek for Resource {
}
/// ReleaseFiles is a file/resource accessible for abrasion releases build via
-/// //engine/release.
+/// //tools/release.
struct ReleaseFiles {
}
diff --git a/engine/src/util/mod.rs b/engine/util/mod.rs
index d0c752b9..d0c752b9 100644
--- a/engine/src/util/mod.rs
+++ b/engine/util/mod.rs
diff --git a/engine/src/util/profiler.rs b/engine/util/profiler.rs
index 4b1863c2..4b1863c2 100644
--- a/engine/src/util/profiler.rs
+++ b/engine/util/profiler.rs
diff --git a/engine/src/util/resourcemap.rs b/engine/util/resourcemap.rs
index 44fbf157..44fbf157 100644
--- a/engine/src/util/resourcemap.rs
+++ b/engine/util/resourcemap.rs
diff --git a/hsvr/BUILD.bazel b/hsvr/BUILD.bazel
index 74377138..dcff407e 100644
--- a/hsvr/BUILD.bazel
+++ b/hsvr/BUILD.bazel
@@ -1,5 +1,5 @@
load("@rules_rust//rust:rust.bzl", "rust_binary")
-load("//engine/release:defs.bzl", "abrasion_release")
+load("//tools/release:defs.bzl", "abrasion_release")
rust_binary(
name = "hsvr",
diff --git a/engine/release/BUILD.bazel b/tools/release/BUILD.bazel
index 1ad04009..fb9bf210 100644
--- a/engine/release/BUILD.bazel
+++ b/tools/release/BUILD.bazel
@@ -4,9 +4,9 @@ go_binary(
name = "pack",
srcs = ["pack.go"],
deps = [
- "//engine/release/proto:manifest_go_proto",
+ "//tools/release/proto:manifest_go_proto",
"@org_golang_google_protobuf//encoding/prototext",
"@org_golang_google_protobuf//proto",
],
visibility = ["//visibility:public"],
-) \ No newline at end of file
+)
diff --git a/engine/release/defs.bzl b/tools/release/defs.bzl
index b6774083..dcd2f40e 100644
--- a/engine/release/defs.bzl
+++ b/tools/release/defs.bzl
@@ -9,7 +9,7 @@ def _abrasion_release_impl(ctx):
runfiles = [rf for rf in runfiles if not rf.path.endswith(".rs")]
runfiles = [rf for rf in runfiles if not rf.path == main.path]
- # Proprietary little manifest format, for //engine/release/pack.go to use.
+ # Proprietary little manifest format, for //tools/release/pack.go to use.
runfile_manifest = ctx.actions.declare_file(ctx.attr.name + "-manifest.text.pb")
ctx.actions.write(runfile_manifest, proto.encode_text(struct(file = [
struct(short_path=rf.short_path, path=rf.path)
@@ -45,7 +45,7 @@ abrasion_release = rule(
"_pack": attr.label(
executable = True,
cfg = "exec",
- default = Label("//engine/release:pack"),
+ default = Label("//tools/release:pack"),
),
}
-) \ No newline at end of file
+)
diff --git a/engine/release/pack.go b/tools/release/pack.go
index 96fcc71d..001af6b0 100644
--- a/engine/release/pack.go
+++ b/tools/release/pack.go
@@ -5,42 +5,42 @@ import (
"crypto/sha256"
"flag"
"fmt"
+ "io/ioutil"
"log"
"os"
- "io/ioutil"
"sort"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/proto"
- pb "abrasion/engine/release/proto"
+ pb "abrasion/tools/release/proto"
)
var (
flagManifest string
- flagExe string
- flagZip string
+ flagExe string
+ flagZip string
)
func packFile(w *zip.Writer, file *pb.File) error {
- fo, err := w.Create(file.ShortPath)
- if err != nil {
- return fmt.Errorf("Create: %w", err)
- }
- // TODO(q3k): maybe don't read this into memory...
- data, err := ioutil.ReadFile(file.Path)
- if err != nil {
- return fmt.Errorf("Open: %w", err)
- }
- h := sha256.Sum256(data)
- file.Sha256 = h[:]
- _, err = fo.Write(data)
- if err != nil {
- return fmt.Errorf("Write: %w", err)
- }
- // We don't need this in the release manifest.
- file.Path = ""
- return nil
+ fo, err := w.Create(file.ShortPath)
+ if err != nil {
+ return fmt.Errorf("Create: %w", err)
+ }
+ // TODO(q3k): maybe don't read this into memory...
+ data, err := ioutil.ReadFile(file.Path)
+ if err != nil {
+ return fmt.Errorf("Open: %w", err)
+ }
+ h := sha256.Sum256(data)
+ file.Sha256 = h[:]
+ _, err = fo.Write(data)
+ if err != nil {
+ return fmt.Errorf("Write: %w", err)
+ }
+ // We don't need this in the release manifest.
+ file.Path = ""
+ return nil
}
func main() {
@@ -81,7 +81,7 @@ func main() {
// Pack engine
engine := pb.File{
ShortPath: "abrasion.exe",
- Path: flagExe,
+ Path: flagExe,
}
if err := packFile(w, &engine); err != nil {
log.Fatalf("Failed to pack engine: %v", err)
@@ -99,4 +99,4 @@ func main() {
if _, err := mo.Write(manifestBytes); err != nil {
log.Fatalf("Failed to write manifest: %v", err)
}
-} \ No newline at end of file
+}
diff --git a/engine/release/proto/BUILD.bazel b/tools/release/proto/BUILD.bazel
index ab67b8ab..304442b7 100644
--- a/engine/release/proto/BUILD.bazel
+++ b/tools/release/proto/BUILD.bazel
@@ -8,7 +8,7 @@ proto_library(
go_proto_library(
name = "manifest_go_proto",
- importpath = "abrasion/engine/release/proto",
+ importpath = "abrasion/tools/release/proto",
protos = [":manifest_proto"],
- visibility = ["//engine/release:__pkg__"],
-) \ No newline at end of file
+ visibility = ["//tools/release:__pkg__"],
+)
diff --git a/engine/release/proto/manifest.proto b/tools/release/proto/manifest.proto
index 10705313..1fbfb5f6 100644
--- a/engine/release/proto/manifest.proto
+++ b/tools/release/proto/manifest.proto
@@ -1,6 +1,6 @@
syntax = "proto3";
-package abrasion.engine.release.proto;
-option go_package = "abrasion/engine/release/proto";
+package abrasion.tools.release.proto;
+option go_package = "abrasion/tools/release/proto";
message File {
string short_path = 1;
@@ -15,4 +15,4 @@ message Manifest {
message ReleaseInfo {
string target = 1;
-} \ No newline at end of file
+}