Split horizon-command and horizon-client-core out of horizon-client

A pure move, the first slice of splitting the client lib into crates:

- horizon-command: the command/ module (Brigadier port, vanilla tree, argument types, selectors), as is.
- horizon-client-core: what command needs from the lib, with no other dependency inside it: text, lang, snbt,
  nbt_path, component, scoreboard, bossbar, gamerules, block_entity_nbt, fastutil_order; plus items moved out of
  lib modules that sit in the cycle, unchanged: ParticleType (particles.rs), the key display name (keybinds.rs),
  SOUND_SOURCES (settings.rs), uuid_text/uuid_from_text (save.rs), Registries/RegistryIds and parse_identifier
  (command/args.rs).

horizon-client re-exports every module and item under its old path (`horizon_client::text`,
`crate::command::Registries`, `particles::ParticleType`...), so no caller changes. Inside the moved files only
paths changed (`crate::snbt` -> `horizon_client_core::snbt` in command, `crate::command::args::parse_identifier`
-> `crate::identifier::parse_identifier`...), `sign_side` became pub, lang.rs includes the lang files from
horizon-client's assets, and gamerules' test that saves a Level moved to save.rs (it needs the client's save).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-26 13:34:31 +01:00
parent ebf3c1567c
commit 0a116d9523
54 changed files with 678 additions and 562 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Generate crates/horizon-client/src/command/vanilla_order.rs: the order of
"""Generate crates/horizon-command/src/vanilla_order.rs: the order of
the children of each node of vanilla's command tree where Horizon's tree
registers them in a different order. Brigadier keeps children in
registration order, and /help (smart usage) lists them that way.
@@ -19,7 +19,7 @@ def main():
parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("vanilla", type=Path)
parser.add_argument("rust", type=Path)
parser.add_argument("--out", type=Path, default=ROOT / "crates/horizon-client/src/command/vanilla_order.rs")
parser.add_argument("--out", type=Path, default=ROOT / "crates/horizon-command/src/vanilla_order.rs")
args = parser.parse_args()
vanilla = json.loads(args.vanilla.read_text())
rust = json.loads(args.rust.read_text())