Compare commits
26 Commits
v0.6.0+ven
...
9ee9ddaa29
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ee9ddaa29 | |||
| d36981fc0f | |||
| 7a5313c766 | |||
| 09cc2116b7 | |||
| 7c5d9c6af0 | |||
| 98212aa6bc | |||
| e6379af883 | |||
| a5734b0174 | |||
| c8cf70bd52 | |||
| 9dbd3d953e | |||
| 41ca417386 | |||
| 6e2482f68c | |||
| f383836c24 | |||
| de58cd8d7c | |||
| 3d9dc77837 | |||
| f7a49a2760 | |||
| 3cabfa46c3 | |||
| bb99cc8042 | |||
| 69db7afd8d | |||
| 57907c105a | |||
| 603b49da10 | |||
| fcdb0f6980 | |||
| 3fb81b504c | |||
| 47dc685ffb | |||
| 736f7ab260 | |||
| 2d5830d3bc |
14
debian/boids-webserver.service
vendored
Normal file
14
debian/boids-webserver.service
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=A website hosting a WASM build of Boids
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/env python3 -m http.server -d /usr/share/boids 8000
|
||||
Restart=never
|
||||
User=www-data
|
||||
Group=www-data
|
||||
WorkingDirectory=/usr/share/boids
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
185
debian/changelog
vendored
Normal file
185
debian/changelog
vendored
Normal file
@@ -0,0 +1,185 @@
|
||||
another-boids-in-rust (0.6.0-1~4.gbpd36981) UNRELEASED; urgency=medium
|
||||
|
||||
** SNAPSHOT build @d36981fc0f93d12421972c17e444a18f9ad540db **
|
||||
|
||||
* Fix: Missing destination in Docker copy instr.
|
||||
* Add a Makefile to make web builds more ergonomic
|
||||
* Rename WASM & JS output to match HTML
|
||||
* Drop extra suffix in wasm-bindgen output name
|
||||
* Turn output folder into an order-only prerequisite
|
||||
* Make wasm binary target depend on source files
|
||||
* Fix: use correct name suffix for the WASM file
|
||||
* Group the WASM & JS targets so they're built once
|
||||
* Use vars to hold target & profile in makefile_web
|
||||
* Add and use a custom canvas element on the page
|
||||
* Don't have Bevy resize to full-screen
|
||||
* Fix: WASM target needs to depend on Cargo.* files
|
||||
* First draft of page structure, basic styling
|
||||
* Fix: automatic var to use *all* deps, not first
|
||||
* Add a README to the project
|
||||
* Add a license file (AGPLv3)
|
||||
* Release v0.4.0
|
||||
* Remove fly.toml from repo
|
||||
* Rename the Makefile, add usage note at the top
|
||||
* Place Makefile 'configurables' up top
|
||||
* New build variants: "standalone" and "bundle-able"
|
||||
* HTML-installing targets remove the other one
|
||||
* Add the tarball-standalone recipe(s)
|
||||
* Update the README with new web build variant info
|
||||
* Set charset & viewport meta tags
|
||||
* Add an install target
|
||||
* Add a bunch of CSS
|
||||
* Update Dockerfile to use the new Make-based build
|
||||
* Remove bogus dependencies from build container
|
||||
* Release v0.5.0
|
||||
* Drop CI cargo-clippy check, can't run on Gitea
|
||||
* Drop CI semver check, this isn't a library
|
||||
* Update CI, the MSRV is 1.87
|
||||
* Fix: Syntax errors in README.md
|
||||
* Use compressed WASM for even smaller webroot size
|
||||
* Release v0.6.0
|
||||
* Pin transitive dep ruzstd=0.8.1
|
||||
* Lock the new dependencies and vendor them
|
||||
* Re-diff patch queue
|
||||
* Update changelog for 0.6.0-1~1.gbp57907c release
|
||||
* Add build dependency on the LLD linker
|
||||
* Build for WASM32 and use the LLD linker
|
||||
* Revert "Build for WASM32 and use the LLD linker"
|
||||
* Build-Depend on rust-llvm to get default linker
|
||||
* Mangle the rules file, trying to get WASM build
|
||||
* Fix branch name in d/gbp.conf
|
||||
* Update changelog for new snapshot
|
||||
* Drop unneeded build-dep
|
||||
* Add a Systemd service unit file for the server
|
||||
* Override d/rules install to pass web root along
|
||||
* Patch Makefile to have a var for web root
|
||||
* Rename service unit file to match package name
|
||||
* Add a runtime dependency on Python3 (http.server)
|
||||
* Switch arch from "any" to "all"
|
||||
* Update changelog for 0.6.0-1~3.gbp7c5d9c release
|
||||
* Use 'www-data' user & group for webserver
|
||||
* Rename binary package to not collide with native
|
||||
|
||||
-- Robert Garrett <robertgarrett404@gmail.com> Thu, 20 Nov 2025 08:55:14 -0600
|
||||
|
||||
another-boids-in-rust (0.3.0-1.1) unstable; urgency=medium
|
||||
|
||||
* Breakout game, from Bevy examples
|
||||
* Extract games into own modules as Bevy Plugins
|
||||
* Breakout game as plugin
|
||||
* Check-in a check.yml workflow: jonhoo/rust-ci-conf
|
||||
* Format all cargo source files.
|
||||
* Adjust workflow to install ALSA
|
||||
* GH Actions have prompts in non-interactive mode
|
||||
* Starting the Boids impl. Dot explosion
|
||||
* Add keyboard event handler. "Q" to quit program
|
||||
* Basic player character steering
|
||||
* Slightly better signature for keyboard handler
|
||||
* Delete unused entity spawn, add player color const
|
||||
* Border avoidance system
|
||||
* New Cargo.toml config & updated lock file
|
||||
* cargo-fmt
|
||||
* Apply cargo check fixes
|
||||
* Added bevy_spatial for boid interactions
|
||||
* Cohesion function... sorta. Cohesion *no* function
|
||||
* Fix cohesion force vector
|
||||
* Iterate over all boids instead of only the player
|
||||
* Just use a for loop in the cohesion function
|
||||
* Boids clumping (try for separation function)
|
||||
* Fix: force direction & magnitude for separation
|
||||
* Fix: Put the cohesion function back in
|
||||
* Fix over-application of cohesion forces
|
||||
* Further rewrite of cohesion to match separation
|
||||
* Make `cohesion()` affect the acceleration
|
||||
* Use 1.0 for steering, and small init velocity
|
||||
* Spawn boids in larger ring so they don't pop apart
|
||||
* Alignment function complete, seems off...
|
||||
* Braking function to slow all boids
|
||||
* This is only a Boids project, now. Drop others.
|
||||
* New DebugUI plugin
|
||||
* Scaffolding for selection & scanning modes
|
||||
* Cursor gizmo mode changing inputs are working
|
||||
* Debug draw CoM is working!... CoM has error
|
||||
* Fix: off-by-one in the boid count enumeration
|
||||
* Completed velocity pointer gizmo
|
||||
* Move util functions below systems functions
|
||||
* Refactor cohesion() to use center_of_boids()
|
||||
* Refactor alignment() to use velocity_of_boids
|
||||
* Fix: spatial tree update frequency is too low
|
||||
* Fix: Acceleration needs to be reset to 0
|
||||
* Crank up the forces to see the boids move!
|
||||
* `cargo fmt` again
|
||||
* Drop unneeded `use` line
|
||||
* Give space_brakes a const coefficient
|
||||
* Rename Acceleration to Force
|
||||
* Add cohesive_force function
|
||||
* Fix: Return Force instead of Vec2
|
||||
* Add separation_force function
|
||||
* Move separation_force down with cohesive_force
|
||||
* Add unit tests for force functions
|
||||
* Fix: Cohesion function was accepting bad input
|
||||
* Tests were missing the BOID_VIEW_RANGE
|
||||
* Placeholder for separation on div-0 error
|
||||
* Rename separation_force parameters
|
||||
* Update tests: Force return needs an Option<>
|
||||
* Update force functions to use Option<Force>
|
||||
* Run `cargo fmt` before merging branch
|
||||
* Pin grand-dependencies for -Zminimal-versions
|
||||
* Bump MSRV for named profiles to work
|
||||
* Full fat LTO for the very best size reduction
|
||||
* Add a "mini" build profile
|
||||
* Begin v0.2.0-dev and upgrade Bevy version
|
||||
* Adjust code for Bevy 0.14 -> 0.16 upgrade
|
||||
* Autoformat
|
||||
* Switch off deprecated functions, fix clippy lints
|
||||
* Rename & restructure birdoids module
|
||||
* Bump Rust edition to 2024
|
||||
* Move physics parts to a physics module
|
||||
* Make another new alignment system
|
||||
* Fix the physics integrator
|
||||
* Remove BoidBundle, use required-components instead
|
||||
* Make keyboard control forces, not velocities
|
||||
* Filter-map the entities to avoid self-alignment
|
||||
* New `separation` rule function
|
||||
* New `cohesion` rule function
|
||||
* Fix: off-by-one error in `alignment` averaging
|
||||
* Fix: `alignment` should align to vel, not impulse
|
||||
* Add speed_controller to maintain system energy
|
||||
* Put the boid separation range back to 1/4 not 1/8
|
||||
* Autoformat
|
||||
* Add a WASM build configuration
|
||||
* Mark v0.2.0, update lockfile
|
||||
* Use whole browser window
|
||||
* Make the WASM build profile even smaller
|
||||
* Add an index.html file, taken from Bevy Cheatbook
|
||||
* Dockerfile for WASM build's webserver
|
||||
* Check-in the fly.toml config file
|
||||
* Build using the locked dependency versions
|
||||
* Use busybox:musl to save a couple more MB
|
||||
* Disable the minimal-version pins
|
||||
* Mark crate version 0.3.0, upadate lockfile
|
||||
* Fix casing in Dockerfile
|
||||
* Vendor dependencies for 0.3.0 release
|
||||
* Begin package for Debian Trixie
|
||||
* Add missing build-depends
|
||||
* Rediff patches
|
||||
* Add "+vendor" to upstream tag name
|
||||
* Add missing build-depends
|
||||
* Rediff patches
|
||||
* Add "+vendor" to upstream tag name
|
||||
|
||||
* WARN: The previous version, 0.3.0-1, can no longer be built without making
|
||||
corrections. It's debian/gbp.conf file will try to use "v0.3.0" as the up-
|
||||
stream release tag, but that is no longer correct. I moved that tag to mark
|
||||
the real Crate release and replaced it with the tag "v0.3.0+vendor".
|
||||
.
|
||||
I've chosen to increment the version by a minor release because I uploaded
|
||||
a build of 0.3.0-1 to my GitHub. I don't think anyone has used it or will
|
||||
care if the "true" original vanishes, but I'm choosing to operate as if
|
||||
there is.
|
||||
.
|
||||
If you are trying to rebuild that version, you must either patch gbp.conf
|
||||
or manually build a tarball from the new tag name. GBP doesn't validate the
|
||||
tarball so if it finds one named appropriately, then it will just use it.
|
||||
|
||||
-- Robert Garrett <robertgarrett404@gmail.com> Tue, 18 Nov 2025 12:13:41 -0600
|
||||
26
debian/control
vendored
Normal file
26
debian/control
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
Source: another-boids-in-rust
|
||||
Maintainer: Robert Garrett <robertgarrett404@gmail.com>
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Standards-Version: 4.6.2
|
||||
Build-Depends:
|
||||
debhelper-compat (= 13),
|
||||
dh-cargo,
|
||||
pkg-config,
|
||||
libasound2-dev,
|
||||
libudev-dev,
|
||||
rust-llvm,
|
||||
Homepage: https://git.gelvin.dev/robert/boids
|
||||
Vcs-Git: https://git.gelvin.dev/robert/boids
|
||||
Vcs-Browser: https://git.gelvin.dev/robert/boids
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: boids-webserver
|
||||
Architecture: all
|
||||
Depends:
|
||||
${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
python3,
|
||||
Description: Another Boids implementation in Rust.
|
||||
Boids is a flocking algorithm. This one is built in Rust using the Bevy game
|
||||
engine.
|
||||
26
debian/copyright
vendored
Normal file
26
debian/copyright
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: boids
|
||||
Upstream-Contact: Robert Garrett <robertgarrett404@gmail.com>
|
||||
Source: https://git.gelvin.dev/robert/boids
|
||||
|
||||
Files: *
|
||||
Copyright: 2025 Robert Garrett <robertgarrett404@gmail.com>
|
||||
License: GPL-3+
|
||||
|
||||
License: GPL-3+
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
It is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with it. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public License version 3
|
||||
can be found in the file /usr/share/common-licenses/GPL-3.
|
||||
|
||||
6
debian/gbp.conf
vendored
Normal file
6
debian/gbp.conf
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
[DEFAULT]
|
||||
compression = xz
|
||||
compression-level = 9
|
||||
upstream-tag = v%(version)s+vendor
|
||||
debian-branch = deb/trixie-web
|
||||
|
||||
70
debian/patches/0001-Alter-blake3-to-emit-Built-Using-info.patch
vendored
Normal file
70
debian/patches/0001-Alter-blake3-to-emit-Built-Using-info.patch
vendored
Normal file
File diff suppressed because one or more lines are too long
28
debian/patches/0002-Use-pure-Rust-implementation-of-Blake3-parts.patch
vendored
Normal file
28
debian/patches/0002-Use-pure-Rust-implementation-of-Blake3-parts.patch
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
From: Robert Garrett <robertgarrett404@gmail.com>
|
||||
Date: Fri, 26 Sep 2025 11:02:04 -0500
|
||||
Subject: Use pure Rust implementation of Blake3 parts
|
||||
|
||||
I can't figure out how to get Debian's build system to tell the blake3
|
||||
crate what CPU features are available. It's possible the answer is that
|
||||
I'm not supposed to, or that I simply do not.
|
||||
|
||||
Rather than figure it out, I'll just avoid the question by not using
|
||||
C, C++, or assembly through the conditional compilation systems.
|
||||
---
|
||||
Cargo.toml | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 952ddd3..4b2cf49 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -9,6 +9,9 @@ bevy = "0.16.0"
|
||||
|
||||
ruzstd = "=0.8.1"
|
||||
|
||||
+# Use pure-Rust impl. to dodge problems with CPU feature set availability.
|
||||
+blake3 = { version = "1.8.2", features = ["pure"] }
|
||||
+
|
||||
# Grand-dependency pins
|
||||
# ab_glyph = "0.2.16"
|
||||
# fnv = "1.0.6"
|
||||
25
debian/patches/0003-Use-mini-as-release-profile.patch
vendored
Normal file
25
debian/patches/0003-Use-mini-as-release-profile.patch
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
From: Robert Garrett <robertgarrett404@gmail.com>
|
||||
Date: Sat, 27 Sep 2025 22:01:16 -0500
|
||||
Subject: Use "mini" as "release" profile
|
||||
|
||||
---
|
||||
Cargo.toml | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 4b2cf49..192533d 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -39,8 +39,11 @@ opt-level = 1
|
||||
opt-level = 3
|
||||
|
||||
[profile.release]
|
||||
-# codegen-units = 1
|
||||
lto = "fat"
|
||||
+opt-level = "z"
|
||||
+codegen-units = 1
|
||||
+strip = "symbols"
|
||||
+panic = "abort"
|
||||
|
||||
[profile.mini]
|
||||
inherits = "release"
|
||||
35
debian/patches/0004-Patch-Makefile-to-have-a-var-for-web-root.patch
vendored
Normal file
35
debian/patches/0004-Patch-Makefile-to-have-a-var-for-web-root.patch
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
From: Robert Garrett <robertgarrett404@gmail.com>
|
||||
Date: Wed, 19 Nov 2025 12:49:33 -0600
|
||||
Subject: Patch Makefile to have a var for web root
|
||||
|
||||
---
|
||||
Makefile | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 742d029..8935b7e 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -7,8 +7,9 @@
|
||||
CARGO_TARGET := wasm32-unknown-unknown
|
||||
CARGO_PROFILE := wasm-release
|
||||
|
||||
-# Override DESTDIR to set a custom install path (such as your web root)
|
||||
+# Actually, this is so Debian can install the program into it's "build home"
|
||||
DESTDIR ?= .
|
||||
+WEBROOT ?= boids # THIS is the web root
|
||||
|
||||
SRC_DIR = ./src
|
||||
SRCS := $(wildcard $(SRC_DIR)/**)
|
||||
@@ -67,7 +68,7 @@ full-clean: clean
|
||||
# Installation goal. It's meant to be a helper utility for moving the built
|
||||
# output into the web root. Only supports the "bundle-able" mode.
|
||||
install: web
|
||||
- install -dm0755 $(DESTDIR)
|
||||
- install -m0644 out/boids.js $(DESTDIR)/
|
||||
- install -m0644 out/boids_bg.wasm.gz $(DESTDIR)/
|
||||
- install -m0644 out/boids.html $(DESTDIR)/
|
||||
+ install -dm0755 $(DESTDIR)/$(WEBROOT)
|
||||
+ install -m0644 out/boids.js $(DESTDIR)/$(WEBROOT)/
|
||||
+ install -m0644 out/boids_bg.wasm.gz $(DESTDIR)/$(WEBROOT)/
|
||||
+ install -m0644 out/boids.html $(DESTDIR)/$(WEBROOT)/
|
||||
4
debian/patches/series
vendored
Normal file
4
debian/patches/series
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
0001-Alter-blake3-to-emit-Built-Using-info.patch
|
||||
0002-Use-pure-Rust-implementation-of-Blake3-parts.patch
|
||||
0003-Use-mini-as-release-profile.patch
|
||||
0004-Patch-Makefile-to-have-a-var-for-web-root.patch
|
||||
48
debian/rules
vendored
Executable file
48
debian/rules
vendored
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
DH_VERBOSE = 1
|
||||
|
||||
# export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
# DPKG_EXPORT_BUILDFLAGS = 1
|
||||
|
||||
# Remove because they're for normal builds, not "cross" builds, or what ever
|
||||
# WASM is considered to be. Sort-of a cross-compile, but it isn't self hosting,
|
||||
# so I'm not sure what to call it.
|
||||
# include /usr/share/dpkg/default.mk
|
||||
# include /usr/share/rustc/architecture.mk
|
||||
|
||||
# finds package info and puts it in vars like DEB_VERSION_UPSTREAM
|
||||
include /usr/share/dpkg/pkg-info.mk
|
||||
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
|
||||
CARGO=/usr/share/cargo/bin/cargo
|
||||
export CARGO_HOME=$(CURDIR)/debian/cargo_home
|
||||
CARGO_REGISTRY=$(CURDIR)/debian/cargo_registry
|
||||
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
|
||||
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
||||
|
||||
WEBROOT=/usr/share/boids/
|
||||
export WEBROOT
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
execute_after_dh_auto_clean:
|
||||
# $(CARGO) clean
|
||||
rm -rf $(CARGO_HOME)
|
||||
rm -rf $(CARGO_REGISTRY)
|
||||
rm -f debian/cargo-checksum.json
|
||||
|
||||
override_dh_auto_configure:
|
||||
$(CARGO) prepare-debian $(CARGO_REGISTRY) --link-from-system
|
||||
touch debian/cargo-checksum.json
|
||||
# patch cargo_home config to use lld with wasm, otherwise the build fails
|
||||
echo "\n[target.wasm32-unknown-unknown]" >> debian/cargo_home/config.toml
|
||||
cat debian/cargo_home/config.toml | sed "s/linker=[^']\+/linker=rust-lld/" | grep "^rustflags = " >> debian/cargo_home/config.toml
|
||||
dh_auto_configure
|
||||
|
||||
override_dh_auto_test:
|
||||
# No tests. Can't execute a WASM binary
|
||||
echo "Skipping tests, can't run WASM files"
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install WEBROOT=$(WEBROOT)
|
||||
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
Reference in New Issue
Block a user