~starkingdoms/starkingdoms

736f0910b66d2a8957dccd8a2a691073e03ba845 — core 29 days ago eb6884b
UNFINISHED: feat: hotpatching?
5 files changed, 242 insertions(+), 4 deletions(-)

M Cargo.lock
M README.md
M crates/unified/Cargo.toml
M crates/unified/src/server/mod.rs
M crates/xtask/src/main.rs
M Cargo.lock => Cargo.lock +208 -1
@@ 774,6 774,7 @@ version = "0.17.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "342f7e9335416dc98642d5747c4ed8a6ad9f7244a36d5b2b7a1b7910e4d8f524"
dependencies = [
 "bevy_dylib",
 "bevy_internal",
]



@@ 836,7 837,9 @@ dependencies = [
 "bevy_utils",
 "cfg-if",
 "console_error_panic_hook",
 "crossbeam-channel",
 "ctrlc",
 "dioxus-devtools",
 "downcast-rs 2.0.2",
 "log",
 "thiserror 2.0.17",


@@ 1038,6 1041,15 @@ dependencies = [
]

[[package]]
name = "bevy_dylib"
version = "0.17.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b7834bd6b49e3459b94fe2ee2f532de820fd8b91183976e375bf88098e48fe2"
dependencies = [
 "bevy_internal",
]

[[package]]
name = "bevy_ecs"
version = "0.17.2"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 1061,6 1073,7 @@ dependencies = [
 "serde",
 "slotmap",
 "smallvec",
 "subsecond",
 "thiserror 2.0.17",
 "variadics_please",
]


@@ 2472,6 2485,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca"

[[package]]
name = "const_format"
version = "0.2.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad"
dependencies = [
 "const_format_proc_macros",
]

[[package]]
name = "const_format_proc_macros"
version = "0.2.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744"
dependencies = [
 "proc-macro2",
 "quote",
 "unicode-xid",
]

[[package]]
name = "const_panic"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 2855,6 2888,87 @@ dependencies = [
]

[[package]]
name = "dioxus-cli-config"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "babc8eaf90379352bc4820830749fd231feb9312433d4094b4e7b79d912b3d96"

[[package]]
name = "dioxus-core"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75468d08468919f783b0f7ee826802f4e8e66c5b5a0451245d861c211ca18216"
dependencies = [
 "anyhow",
 "const_format",
 "dioxus-core-types",
 "futures-channel",
 "futures-util",
 "generational-box",
 "longest-increasing-subsequence",
 "rustc-hash 2.1.1",
 "rustversion",
 "serde",
 "slab",
 "slotmap",
 "subsecond",
 "tracing",
 "warnings",
]

[[package]]
name = "dioxus-core-types"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36f5ecf5a51de06d78aded3b5f7516a258f53117cba718bc5706317a3c04c844"

[[package]]
name = "dioxus-devtools"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4eb2c5019b7fa72e8e6b21ba99e9263bd390c9a30bbf09793b72f4b57ed7c3d7"
dependencies = [
 "dioxus-cli-config",
 "dioxus-core",
 "dioxus-devtools-types",
 "dioxus-signals",
 "serde",
 "serde_json",
 "subsecond",
 "thiserror 2.0.17",
 "tracing",
 "tungstenite 0.27.0",
 "warnings",
]

[[package]]
name = "dioxus-devtools-types"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b007cec5b8548281921c4e4678926a3936e9d6757e951380685cc6121a6f974"
dependencies = [
 "dioxus-core",
 "serde",
 "subsecond-types",
]

[[package]]
name = "dioxus-signals"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3895cc17ff5b43ada07743111be586e7a927ed7ec511457020e4235e13e63fe6"
dependencies = [
 "dioxus-core",
 "futures-channel",
 "futures-util",
 "generational-box",
 "parking_lot",
 "rustc-hash 2.1.1",
 "tracing",
 "warnings",
]

[[package]]
name = "dirs-next"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 3693,6 3807,16 @@ dependencies = [
]

[[package]]
name = "generational-box"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3c1ae09dfd2d455484a54b56129b9821241c4b0e412227806b6c3730cd18a29"
dependencies = [
 "parking_lot",
 "tracing",
]

[[package]]
name = "generic-array"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 4657,6 4781,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"

[[package]]
name = "longest-increasing-subsequence"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86"

[[package]]
name = "lzma-rs"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 4712,6 4842,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"

[[package]]
name = "memfd"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad38eb12aea514a0466ea40a80fd8cc83637065948eb4a426e4aa46261175227"
dependencies = [
 "rustix 1.1.2",
]

[[package]]
name = "memmap2"
version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 6862,6 7001,7 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a"
dependencies = [
 "serde",
 "version_check",
]



@@ 7086,6 7226,34 @@ dependencies = [
]

[[package]]
name = "subsecond"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "834e8caec50249083ee6972a2f7645c4baadcb39d49ea801da1dc1d5e1c2ccb9"
dependencies = [
 "js-sys",
 "libc",
 "libloading",
 "memfd",
 "memmap2",
 "serde",
 "subsecond-types",
 "thiserror 2.0.17",
 "wasm-bindgen",
 "wasm-bindgen-futures",
 "web-sys",
]

[[package]]
name = "subsecond-types"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6beffea67e72a7a530990b270fd0277971eae564fdc10c1e0080e928b477fab"
dependencies = [
 "serde",
]

[[package]]
name = "subtle"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 7398,7 7566,7 @@ dependencies = [
 "rustls-pki-types",
 "tokio",
 "tokio-rustls",
 "tungstenite",
 "tungstenite 0.26.2",
]

[[package]]


@@ 7643,6 7811,23 @@ dependencies = [
]

[[package]]
name = "tungstenite"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d"
dependencies = [
 "bytes",
 "data-encoding",
 "http",
 "httparse",
 "log",
 "rand 0.9.2",
 "sha1",
 "thiserror 2.0.17",
 "utf-8",
]

[[package]]
name = "twox-hash"
version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 7924,6 8109,28 @@ dependencies = [
]

[[package]]
name = "warnings"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64f68998838dab65727c9b30465595c6f7c953313559371ca8bf31759b3680ad"
dependencies = [
 "pin-project",
 "tracing",
 "warnings-macro",
]

[[package]]
name = "warnings-macro"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59195a1db0e95b920366d949ba5e0d3fc0e70b67c09be15ce5abb790106b0571"
dependencies = [
 "proc-macro2",
 "quote",
 "syn",
]

[[package]]
name = "wasi"
version = "0.11.1+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"

M README.md => README.md +6 -1
@@ 4,4 4,9 @@ a game about floating through space
## building
don't

documentation: https://man.srht.e3t.cc/~starkingdoms/starkingdoms
\ No newline at end of file
documentation: https://man.srht.e3t.cc/~starkingdoms/starkingdoms

HOW TO GET HOTRELOADING WORKING:
```
cargo install dioxus-cli@0.7.0-rc.0 --locked
```
\ No newline at end of file

M crates/unified/Cargo.toml => crates/unified/Cargo.toml +2 -0
@@ 9,6 9,8 @@ crate-type = ["cdylib", "rlib"]

[dependencies]
bevy = { version = "0.17", default-features = false, features = [
    "hotpatching",
    "dynamic_linking",
    "serialize",
    "tonemapping_luts",
    "bevy_window",

M crates/unified/src/server/mod.rs => crates/unified/src/server/mod.rs +1 -1
@@ 33,7 33,7 @@ impl Plugin for ServerPlugin {

        app.add_systems(Startup, move |mut commands: Commands| {
            let server = commands
                .spawn(Name::new("ws-server"))
                .spawn(Name::new("ws-server-stk"))
                .insert(AeronetRepliconServer)
                .insert(Transform::from_xyz(0.0, 0.0, 0.0))
                .queue(WebSocketServer::open(config.clone()))

M crates/xtask/src/main.rs => crates/xtask/src/main.rs +25 -1
@@ 133,6 133,31 @@ fn main() {
    let subcommand = args.nth(1).unwrap();

    match subcommand.as_str() {
        "hp:unified:native" => {
            let asset_dir = workspace_dir().join("crates/unified/");

            Command::new("dx")
                .args([
                    "serve",
                    "--package",
                    "starkingdoms",
                    "--hot-patch",
                    "--features",
                    "bevy/hotpatching",
                    "--features",
                    "native",
                    "--features",
                    "bevy/dynamic_linking",
                    "--args",
                    &args.collect::<Vec<_>>().join(" ")
                ])
                .env("BEVY_ASSET_ROOT", asset_dir.to_string_lossy().to_string())
                .env("RUST_LOG", "info,starkingdoms=trace")
                .spawn()
                .unwrap()
                .wait()
                .unwrap();
        },
        "client" => {
            if !try_build_client() {
                exit(1);


@@ 191,7 216,6 @@ fn main() {
                match res {
                    Ok(event) => {
                        if let EventKind::Modify(_) = event.kind {
                            let has_non_generated_update = false;
                            for path in &event.paths {
                                if !path.to_str().unwrap().contains("client/pkg")
                                    && !path.to_str().unwrap().ends_with("~")