~starkingdoms/starkingdoms

8b73dedd1235db9cfccede7734de0501aec0fb3e — core 2 years ago 70a2f49
fix SLP
5 files changed, 9 insertions(+), 27 deletions(-)

M Cargo.lock
M justfile
M server/Cargo.toml
M server/build.rs
M server/src/main.rs
M Cargo.lock => Cargo.lock +2 -19
@@ 113,25 113,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "client"
version = "0.1.0"
dependencies = [
 "console_log",
 "futures",
 "js-sys",
 "lazy_static",
 "log",
 "protocol",
 "rmp-serde",
 "serde",
 "url",
 "wasm-bindgen",
 "wasm-bindgen-futures",
 "web-sys",
 "ws_stream_wasm",
]

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


@@ 743,11 724,13 @@ dependencies = [
name = "starkingdoms-client"
version = "0.1.0"
dependencies = [
 "async-recursion",
 "console_log",
 "futures",
 "js-sys",
 "lazy_static",
 "log",
 "markdown",
 "rmp-serde",
 "serde",
 "starkingdoms-protocol",

M justfile => justfile +2 -2
@@ 1,12 1,12 @@
run_server:
    cargo run --bin server
    cargo run --bin starkingdoms-server

run_http: build_client_bundle
    cd web && python3 -m http.server

build_client_bundle:
    rm -rf web/dist
    RUST_BACKTRACE=1 wasm-pack build --target web client
    RUST_BACKTRACE=1 wasm-pack build --target web starkingdoms-client
    cp -r client/pkg web/dist

install_tooling:

M server/Cargo.toml => server/Cargo.toml +1 -1
@@ 3,7 3,7 @@ name = "starkingdoms-server"
version = "0.0.1"
edition = "2021"

[metadata]
[package.metadata]
version-name = "Super Duper Ultra Alpha"
slp-description = "A StarKingdoms.TK server"


M server/build.rs => server/build.rs +3 -3
@@ 12,11 12,11 @@ fn main() {
    let root = meta.root_package().unwrap();

    let version = root.version.to_string();
    let version_name = root.metadata["version-name"].to_string();
    let description = root.metadata["slp-description"].to_string();
    let version_name = root.metadata["version-name"].to_string().replace('"', "");
    let description = root.metadata["slp-description"].to_string().replace('"', "");

    println!("cargo:rustc-env=STK_VERSION={}", version);
    println!("cargo:rustc-env=STK_VERSION_NAME={}", version_name);
    println!("cargo:rustc-env=STK_SLP_DESCRIPTION={}", description);
    println!("cargo:rerun-if-changed:Cargo.toml");
    println!("cargo:rerun-if-changed=Cargo.toml");
}
\ No newline at end of file

M server/src/main.rs => server/src/main.rs +1 -2
@@ 10,8 10,7 @@ use lazy_static::lazy_static;
use log::{error, info, Level};
use serde::{Deserialize, Serialize};
use tokio::sync::RwLock;
use protocol::{PROTOCOL_VERSION, State};
use starkingdoms_protocol::PROTOCOL_VERSION;
use starkingdoms_protocol::{PROTOCOL_VERSION, State};
use crate::handler::{ClientHandler, ClientManager};
use crate::client_handler::handle_client;
use crate::timer::timer_main;