DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

65b7abb87036032b3b820c7d4ce346cf712be11b — Jonni Liljamo 1 year, 11 months ago d0aae5f
feat(sdbclient): lua ready to be used
M Cargo.lock => Cargo.lock +532 -1
@@ 31,6 31,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"

[[package]]
name = "aes"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8"
dependencies = [
 "cfg-if",
 "cipher",
 "cpufeatures",
 "opaque-debug",
]

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


@@ 226,6 238,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"

[[package]]
name = "base64ct"
version = "1.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf"

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


@@ 680,6 698,24 @@ checksum = "f1d302342816aa0c5e7d75f6c51858a9b3b7592e8246fbc2702d31825b625f52"
dependencies = [
 "bevy",
 "bevy_mod_scripting_core",
 "bevy_mod_scripting_lua",
 "bevy_script_api",
]

[[package]]
name = "bevy_mod_scripting_common"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3d50a1dc3c8b652916d333f85d4f965a06c0f891abf0631120fc03527bc8a68"
dependencies = [
 "convert_case",
 "indexmap",
 "paste",
 "proc-macro2",
 "quote",
 "serde",
 "serde_derive",
 "syn",
]

[[package]]


@@ 696,6 732,56 @@ dependencies = [
]

[[package]]
name = "bevy_mod_scripting_derive"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a69dabc17f2c86c1e8a9c2cab5c4956943dd4a9b364d0f11dc4e199e22935a8"
dependencies = [
 "bevy_mod_scripting_common",
 "convert_case",
 "indexmap",
 "paste",
 "proc-macro2",
 "quote",
 "rustdoc-types",
 "serde",
 "serde_derive",
 "syn",
]

[[package]]
name = "bevy_mod_scripting_lua"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9d7cc0e5aedfee58c5e8f7d29776805f3ee3a66fb6ec9bc7c4225e8d5564284"
dependencies = [
 "bevy",
 "bevy_mod_scripting_core",
 "parking_lot",
 "serde",
 "serde_json",
 "tealr",
]

[[package]]
name = "bevy_mod_scripting_lua_derive"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3b7f5e9ff5b1545b75ef5c7dc177d0b42fb0a311cb3f787ca85a72f29956978"
dependencies = [
 "bevy_mod_scripting_common",
 "convert_case",
 "indexmap",
 "paste",
 "proc-macro2",
 "quote",
 "rustdoc-types",
 "serde",
 "serde_derive",
 "syn",
]

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


@@ 834,6 920,22 @@ dependencies = [
]

[[package]]
name = "bevy_script_api"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "458e2dd2d5cd0236fef86de3c583fcf5afb2b4fe76aef99f2c9af21ac3bc8bc7"
dependencies = [
 "bevy",
 "bevy_mod_scripting_core",
 "bevy_mod_scripting_derive",
 "bevy_mod_scripting_lua",
 "bevy_mod_scripting_lua_derive",
 "parking_lot",
 "paste",
 "thiserror",
]

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


@@ 1048,6 1150,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"

[[package]]
name = "block-buffer"
version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e"
dependencies = [
 "generic-array",
]

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


@@ 1057,6 1168,15 @@ dependencies = [
]

[[package]]
name = "bstr"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
dependencies = [
 "memchr",
]

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


@@ 1095,6 1215,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c"

[[package]]
name = "bzip2"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
dependencies = [
 "bzip2-sys",
 "libc",
]

[[package]]
name = "bzip2-sys"
version = "0.1.11+1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
dependencies = [
 "cc",
 "libc",
 "pkg-config",
]

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


@@ 1137,6 1278,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"

[[package]]
name = "cipher"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
dependencies = [
 "generic-array",
]

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


@@ 1250,6 1400,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58baae561b85ca19b3122a9ddd35c8ec40c3bcd14fe89921824eae73f7baffbf"

[[package]]
name = "constant_time_eq"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"

[[package]]
name = "convert_case"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8"

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


@@ 1336,6 1498,15 @@ dependencies = [
]

[[package]]
name = "cpufeatures"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320"
dependencies = [
 "libc",
]

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


@@ 1364,6 1535,16 @@ dependencies = [
]

[[package]]
name = "crypto-common"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
 "generic-array",
 "typenum",
]

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


@@ 1426,6 1607,17 @@ dependencies = [
]

[[package]]
name = "digest"
version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
dependencies = [
 "block-buffer",
 "crypto-common",
 "subtle",
]

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


@@ 1475,6 1667,12 @@ dependencies = [
]

[[package]]
name = "either"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"

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


@@ 1732,6 1930,16 @@ dependencies = [
]

[[package]]
name = "generic-array"
version = "0.14.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9"
dependencies = [
 "typenum",
 "version_check",
]

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


@@ 1997,6 2205,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df"

[[package]]
name = "hmac"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
dependencies = [
 "digest",
]

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


@@ 2128,6 2345,7 @@ checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
dependencies = [
 "autocfg",
 "hashbrown",
 "serde",
]

[[package]]


@@ 2185,6 2403,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e"

[[package]]
name = "itertools"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
 "either",
]

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


@@ 2354,6 2581,24 @@ dependencies = [
]

[[package]]
name = "lua-src"
version = "544.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "708ba3c844d5e9d38def4a09dd871c17c370f519b3c4b7261fbabe4a613a814c"
dependencies = [
 "cc",
]

[[package]]
name = "luajit-src"
version = "210.4.4+restydf15b79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41f081de0df368f97e5d8bb60e435caa078bd5d42797a8c9f0bb8d5192dcdcc1"
dependencies = [
 "cc",
]

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


@@ 2462,6 2707,22 @@ dependencies = [
]

[[package]]
name = "mlua"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ee2ad7a9aa69056b148d9d590344bc155d3ce0d2200e3b2838f7034f6ba33c1"
dependencies = [
 "bstr",
 "cc",
 "lua-src",
 "luajit-src",
 "num-traits",
 "once_cell",
 "pkg-config",
 "rustc-hash",
]

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


@@ 2851,6 3112,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"

[[package]]
name = "opaque-debug"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"

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


@@ 2940,12 3207,35 @@ dependencies = [
]

[[package]]
name = "password-hash"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700"
dependencies = [
 "base64ct",
 "rand_core",
 "subtle",
]

[[package]]
name = "paste"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba"

[[package]]
name = "pbkdf2"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
dependencies = [
 "digest",
 "hmac",
 "password-hash",
 "sha2",
]

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


@@ 3090,6 3380,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17fd96390ed3feda12e1dfe2645ed587e0bea749e319333f104a33ff62f77a0b"

[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"

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


@@ 3218,6 3514,21 @@ dependencies = [
]

[[package]]
name = "ring"
version = "0.16.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
dependencies = [
 "cc",
 "libc",
 "once_cell",
 "spin",
 "untrusted",
 "web-sys",
 "winapi",
]

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


@@ 3254,6 3565,27 @@ dependencies = [
]

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

[[package]]
name = "rustls"
version = "0.20.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c"
dependencies = [
 "log",
 "ring",
 "sct",
 "webpki",
]

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


@@ 3291,6 3623,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"

[[package]]
name = "sct"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
dependencies = [
 "ring",
 "untrusted",
]

[[package]]
name = "sdbclient"
version = "0.1.0"
dependencies = [


@@ 3397,12 3739,34 @@ dependencies = [
]

[[package]]
name = "sha1"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
dependencies = [
 "cfg-if",
 "cpufeatures",
 "digest",
]

[[package]]
name = "sha1_smol"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"

[[package]]
name = "sha2"
version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0"
dependencies = [
 "cfg-if",
 "cpufeatures",
 "digest",
]

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


@@ 3455,6 3819,12 @@ dependencies = [
]

[[package]]
name = "spin"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"

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


@@ 3509,7 3879,7 @@ dependencies = [
 "serde",
 "serde_derive",
 "serde_json",
 "sha1",
 "sha1 0.6.1",
 "syn",
]



@@ 3532,6 3902,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"

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

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


@@ 3562,6 3938,34 @@ dependencies = [
]

[[package]]
name = "tealr"
version = "0.9.0-alpha3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6409f8b2166971894874e57bbc82a273836753dfdfaeef410e6b99ab9ff322c"
dependencies = [
 "bstr",
 "itertools",
 "mlua",
 "serde",
 "tealr_derive",
]

[[package]]
name = "tealr_derive"
version = "0.9.0-alpha4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ea6af26b81a957d10a2a65fce8be3bf47d401cbc154ad113339d0edeb6af782"
dependencies = [
 "proc-macro2",
 "quote",
 "syn",
 "tempfile",
 "ureq",
 "venial",
 "zip",
]

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


@@ 3625,6 4029,33 @@ dependencies = [
]

[[package]]
name = "time"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
dependencies = [
 "itoa",
 "serde",
 "time-core",
 "time-macros",
]

[[package]]
name = "time-core"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"

[[package]]
name = "time-macros"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2"
dependencies = [
 "time-core",
]

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


@@ 3820,6 4251,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"

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

[[package]]
name = "ureq"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "733b5ad78377302af52c0dbcb2623d78fe50e4b3bf215948ff29e9ee031d8566"
dependencies = [
 "base64",
 "flate2",
 "log",
 "once_cell",
 "rustls",
 "url",
 "webpki",
 "webpki-roots",
]

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


@@ 3859,6 4312,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"

[[package]]
name = "venial"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3d723d4b0ebf523971bc63776095798272df2873910f16d53bb680aa2f4d609"
dependencies = [
 "proc-macro2",
 "quote",
]

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


@@ 3990,6 4453,25 @@ dependencies = [
]

[[package]]
name = "webpki"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
dependencies = [
 "ring",
 "untrusted",
]

[[package]]
name = "webpki-roots"
version = "0.22.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
dependencies = [
 "webpki",
]

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


@@ 4359,3 4841,52 @@ name = "xi-unicode"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a"

[[package]]
name = "zip"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080"
dependencies = [
 "aes",
 "byteorder",
 "bzip2",
 "constant_time_eq",
 "crc32fast",
 "crossbeam-utils",
 "flate2",
 "hmac",
 "pbkdf2",
 "sha1 0.10.5",
 "time",
 "zstd",
]

[[package]]
name = "zstd"
version = "0.11.2+zstd.1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"
dependencies = [
 "zstd-safe",
]

[[package]]
name = "zstd-safe"
version = "5.0.2+zstd.1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db"
dependencies = [
 "libc",
 "zstd-sys",
]

[[package]]
name = "zstd-sys"
version = "2.0.4+zstd.1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fa202f2ef00074143e219d15b62ffc317d17cc33909feac471c044087cad7b0"
dependencies = [
 "cc",
 "libc",
]

A sdbclient/assets/scripts/ui_play.lua => sdbclient/assets/scripts/ui_play.lua +14 -0
@@ 0,0 1,14 @@
--[[
 * This file is part of sdbclient
 * Copyright (C) 2022 Jonni Liljamo <jonni@liljamo.com>
 *
 * Licensed under GPL-3.0-only.
 * See LICENSE for licensing information.
]]

function on_start()
    print_to_console("hello from lua")
    print("hello from lua")

    print(world)
end

A sdbclient/src/lua/mod.rs => sdbclient/src/lua/mod.rs +83 -0
@@ 0,0 1,83 @@
/*
 * This file is part of sdbclient
 * Copyright (C) 2022 Jonni Liljamo <jonni@liljamo.com>
 *
 * Licensed under GPL-3.0-only.
 * See LICENSE for licensing information.
 */

use std::sync::Mutex;

use bevy_mod_scripting::prelude::*;

use bevy::prelude::*;
use bevy_console::PrintConsoleLine;

pub struct LuaPlugin;

impl Plugin for LuaPlugin {
    fn build(&self, app: &mut App) {
        app.add_startup_system(load_scripts)
            .add_script_handler_stage::<LuaScriptHost<()>, _, 0, 30>(CoreStage::PostUpdate)
            .add_script_host::<LuaScriptHost<()>, _>(CoreStage::PostUpdate)
            .add_api_provider::<LuaScriptHost<()>>(Box::new(LuaAPIProvider))
            .add_api_provider::<LuaScriptHost<()>>(Box::new(LuaBevyAPIProvider));
    }
}

fn load_scripts(asset_server: Res<AssetServer>, mut commands: Commands) {
    let script_paths = vec!["ui_play.lua"];
    let mut scripts = vec![];

    for path in script_paths {
        let handle = asset_server.load::<LuaFile, &str>(&format!("scripts/{}", path));
        scripts.push(Script::<LuaFile>::new(path.to_string(), handle));
    }

    commands
        .spawn(())
        .insert(ScriptCollection::<LuaFile> { scripts });
}

pub struct LuaAPIProvider;

impl APIProvider for LuaAPIProvider {
    type APITarget = Mutex<Lua>;
    type DocTarget = LuaDocFragment;
    type ScriptContext = Mutex<Lua>;

    fn attach_api(&mut self, api: &mut Self::APITarget) -> Result<(), ScriptError> {
        let api = api.get_mut().unwrap();

        api.globals()
            .set(
                "print_to_console",
                api.create_function(|ctx, msg: String| {
                    // retrieve the world pointer
                    let world = ctx.get_world()?;
                    let mut world = world.write();

                    let mut events: Mut<Events<PrintConsoleLine>> =
                        world.get_resource_mut().unwrap();
                    events.send(PrintConsoleLine { line: msg });

                    Ok(())
                })
                .map_err(ScriptError::new_other)?,
            )
            .map_err(ScriptError::new_other)?;

        api.globals()
            .set(
                "print",
                api.create_function(|_ctx, msg: String| {
                    info!("{}", msg);
                    Ok(())
                })
                .map_err(ScriptError::new_other)?,
            )
            .map_err(ScriptError::new_other)?;

        Ok(())
    }
}

M sdbclient/src/main.rs => sdbclient/src/main.rs +3 -2
@@ 20,6 20,7 @@ use bevy_mod_scripting::prelude::*;
mod api;
mod cfg;
mod constants;
mod lua;
mod plugins;
mod util;



@@ 63,8 64,6 @@ fn main() {
        ..Default::default()
    }));

    app.add_plugin(ScriptingPlugin);

    app.add_plugin(EguiPlugin);
    app.add_plugin(WorldInspectorPlugin::new());
    app.add_plugin(ConsolePlugin);


@@ 76,6 75,8 @@ fn main() {
        ..Default::default()
    });

    app.add_plugin(ScriptingPlugin).add_plugin(lua::LuaPlugin);

    app.insert_resource(cfg::CfgDirs(
        directories::ProjectDirs::from("com", "liljamo", "deckbuilder")
            .expect("failed to get project directories"),

M sdbclient/src/plugins/menu/mod.rs => sdbclient/src/plugins/menu/mod.rs +8 -1
@@ 33,6 33,9 @@ use accountscreenloggedout::*;
mod accountscreenloggedin;
use accountscreenloggedin::*;

mod playscreen;
use playscreen::*;

use super::config::{SaveEvent, SaveEventValue};

mod accountlogin;


@@ 67,6 70,9 @@ impl Plugin for MenuPlugin {
            // Systems for account loggedin screen
            .add_system_set(SystemSet::on_enter(MenuState::AccountLoggedIn).with_system(account_loggedin_setup))
            .add_system_set(SystemSet::on_exit(MenuState::AccountLoggedIn).with_system(despawn_screen::<OnAccountLoggedInScreen>))
            // Systems for play screen
            .add_system_set(SystemSet::on_enter(MenuState::Play).with_system(play_setup))
            .add_system_set(SystemSet::on_exit(MenuState::Play).with_system(despawn_screen::<OnPlayScreen>))
            // Common systems
            .add_system_set(SystemSet::on_update(GameState::MainMenu).with_system(menu_action).with_system(button_system));



@@ 80,6 86,7 @@ impl Plugin for MenuPlugin {
pub enum MenuState {
    None,
    Main,
    Play,
    Settings,
    SettingsDisplay,
    SettingsAudio,


@@ 137,7 144,7 @@ fn menu_action(
        if *interaction == Interaction::Clicked {
            match menu_button_action {
                MenuButtonAction::Exit => app_exit_events.send(AppExit),
                MenuButtonAction::Play => warn!("todo"),
                MenuButtonAction::Play => menu_state.set(MenuState::Play).unwrap(),
                MenuButtonAction::Settings => menu_state.set(MenuState::Settings).unwrap(),
                MenuButtonAction::SettingsDisplay => {
                    menu_state.set(MenuState::SettingsDisplay).unwrap()

A sdbclient/src/plugins/menu/playscreen.rs => sdbclient/src/plugins/menu/playscreen.rs +111 -0
@@ 0,0 1,111 @@
/*
 * This file is part of sdbclient
 * Copyright (C) 2022 Jonni Liljamo <jonni@liljamo.com>
 *
 * Licensed under GPL-3.0-only.
 * See LICENSE for licensing information.
 */

use bevy::{
    prelude::*,
    ui::{JustifyContent, Size, Style, Val},
};
use bevy_mod_scripting::prelude::*;

use crate::constants::TEXT_COLOR;

use super::{MenuButtonAction, NORMAL_BUTTON};

/// Tag component for tagging entities on the play screen
#[derive(Component)]
pub struct OnPlayScreen;

pub fn play_setup(
    mut commands: Commands,
    asset_server: Res<AssetServer>,
    mut lua_writer: PriorityEventWriter<LuaEvent<()>>,
) {
    let event = LuaEvent {
        hook_name: "on_start".to_string(),
        args: (),
        recipients: Recipients::All,
    };

    lua_writer.send(event, 0);

    let font = asset_server.load("fonts/FiraMono-Regular.ttf");

    let button_style = Style {
        size: Size::new(Val::Px(200.0), Val::Px(65.0)),
        margin: UiRect::all(Val::Px(20.0)),
        justify_content: JustifyContent::Center,
        align_items: AlignItems::Center,
        ..default()
    };

    let button_text_style = TextStyle {
        font: font.clone(),
        font_size: 40.0,
        color: TEXT_COLOR,
    };

    commands
        .spawn((
            NodeBundle {
                style: Style {
                    size: Size::new(Val::Percent(100.0), Val::Percent(100.0)),
                    align_items: AlignItems::Center,
                    justify_content: JustifyContent::Center,
                    flex_direction: FlexDirection::Column,
                    ..default()
                },
                ..default()
            },
            OnPlayScreen,
        ))
        .with_children(|parent| {
            parent.spawn(
                TextBundle::from_section(
                    "Play",
                    TextStyle {
                        font: font.clone(),
                        font_size: 60.0,
                        color: TEXT_COLOR,
                    },
                )
                .with_style(Style {
                    margin: UiRect::all(Val::Px(50.)),
                    ..Default::default()
                }),
            );
            parent
                .spawn(NodeBundle {
                    style: Style {
                        flex_direction: FlexDirection::Column,
                        align_items: AlignItems::Center,
                        ..default()
                    },
                    background_color: Color::GRAY.into(),
                    ..default()
                })
                .with_children(|parent| {
                    for (action, text) in [(MenuButtonAction::BackToMainMenu, "Back")] {
                        parent
                            .spawn((
                                ButtonBundle {
                                    style: button_style.clone(),
                                    background_color: NORMAL_BUTTON.into(),
                                    ..default()
                                },
                                action,
                            ))
                            .with_children(|parent| {
                                parent.spawn(TextBundle::from_section(
                                    text,
                                    button_text_style.clone(),
                                ));
                            });
                    }
                });
        });
}