Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.1.3 #14

Merged
merged 13 commits into from
Dec 29, 2024
412 changes: 165 additions & 247 deletions Cargo.lock

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ anyhow = "1.0.94"
argon2 = "0.5.3"
chrono = { version = "0.4.34", default-features = false, features = ["clock", "serde"] }
clap = "4.2.4"
config = { version = "0.14", default-features = false, features = ["toml"] }
config = { version = "0.15.4", default-features = false, features = ["toml"] }
db-types = { version = "*", path = "crates/db-types", default-features = false }
eframe = "0.29.1"
egui = { version = "0.29.1", default-features = false }
egui_extras = "0.29.1"
eframe = "0.30.0"
egui = { version = "0.30.0", default-features = false }
egui_extras = "0.30.0"
ewebsock = "0.8.0"
futures = "0.3.28"
futures-util = "0.3.30"
Expand All @@ -45,15 +45,15 @@ ringbuffer = "0.15.0"
ron = "0.8.1"
rstest = "0.23.0"
secrecy = { version = "0.10.3", features = ["serde"] }
serde = { version = "1.0.215", features = ["derive"] }
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.113"
serde-aux = "4.5.0"
shuttle-runtime = { version = "0.49.0", default-features = false }
shuttle-shared-db = "0.49.0"
sqlx = { version = "0.8.2", default-features = false }
static_assertions = "1.1.0"
strum = "0.26.2"
thiserror = "2.0.7"
strum = "0.26.3"
thiserror = "2.0.9"
tokio = { version = "1.42.0", default-features = false }
tokio-util = "0.7.13"
tracing = "0.1.41"
Expand All @@ -72,10 +72,13 @@ wykies-server = { version = "*", path = "crates/wykies-server", default-features
wykies-server-test-helper = { version = "*", path = "crates/wykies-server-test-helper" }
wykies-shared = { version = "*", path = "crates/wykies-shared" }
wykies-time = { version = "*", path = "crates/wykies-time" }
version-control-clean-check = "0.1.4"

[profile.release]
opt-level = 2 # fast and small wasm

# https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#testing-a-bugfix
[patch.crates-io]
reqwest = { git = "https://github.com/c-git/reqwest.git", branch = "wasm-cookies" }
shuttle-runtime = { git = "https://github.com/shuttle-hq/shuttle" }
shuttle-shared-db = { git = "https://github.com/shuttle-hq/shuttle" }
166 changes: 44 additions & 122 deletions bacon.toml
Original file line number Diff line number Diff line change
@@ -1,125 +1,75 @@
# This is a configuration file for the bacon tool
#
# Bacon repository: https://github.com/Canop/bacon
# Complete help on configuration: https://dystroy.org/bacon/config/
# You can also check bacon's own bacon.toml file
# as an example: https://github.com/Canop/bacon/blob/main/bacon.toml

default_job = "check"
default_job = "clippy-all"

[jobs.check]
command = ["cargo", "check", "--color", "always"]
need_stdout = false

[jobs.check-all]
[jobs.run-server-standalone-mysql]
command = [
"cargo",
"check",
"--all-features",
"--all-targets",
"--color",
"always",
]
need_stdout = false

[jobs.clippy]
command = [
"cargo",
"clippy",
"--all-features",
"--all-targets",
"--color",
"always",
"run",
"--bin",
"chat-app-server",
"--no-default-features",
"--features",
"standalone,mysql,running-from-workspace-root",
]
need_stdout = false
need_stdout = true
allow_warnings = true
background = false
on_change_strategy = "kill_then_restart"

# This job lets you run
# - all tests: bacon test
# - a specific test: bacon test -- config::test_default_files
# - the tests of a package: bacon test -- -- -p config
[jobs.test]
[jobs.run-server-standalone-postgres]
command = [
"cargo",
"test",
"--color",
"always",
"--",
"--color",
"always",
"run",
"--bin",
"chat-app-server",
"--no-default-features",
"--features",
"standalone,postgres,running-from-workspace-root",
]
need_stdout = true
allow_warnings = true
background = false
on_change_strategy = "kill_then_restart"

[jobs.test-all]
[jobs.run-server-shuttle]
command = [
"cargo",
"test",
"--all-features",
"--color",
"always",
"--",
"--color",
"always",
"shuttle",
"run",
]
need_stdout = true
allow_warnings = true
background = false
on_change_strategy = "kill_then_restart"

[jobs.doc]
command = ["cargo", "doc", "--color", "always", "--no-deps"]
need_stdout = false

# If the doc compiles, then it opens in your browser and bacon switches
# to the previous job
[jobs.doc-open]
command = ["cargo", "doc", "--color", "always", "--no-deps", "--open"]
need_stdout = false
on_success = "back" # so that we don't open the browser at each change

# You can run your application and have the result displayed in bacon,
# *if* it makes sense for this crate.
# Don't forget the `--color always` part or the errors won't be
# properly parsed.
# If your program never stops (eg a server), you may set `background`
# to false to have the cargo run output immediately displayed instead
# of waiting for program's end.
[jobs.run]
[jobs.run-client-egui]
command = [
"cargo",
"run",
"--color",
"always",
# put launch parameters for your program behind a `--` separator
"--bin",
"chat-app-client",
"--all-features",
]
need_stdout = true
allow_warnings = true
background = true

# This parameterized job runs the example of your choice, as soon
# as the code compiles.
# Call it as
# bacon ex -- my-example
[jobs.ex]
command = ["cargo", "run", "--color", "always", "--example"]
need_stdout = true
allow_warnings = true
background = false
on_change_strategy = "kill_then_restart"

[jobs.include-ignored]
command = [
"cargo",
"test",
"--all-features",
"--all-targets",
"--color",
"always",
"--",
"--include-ignored",
"--color",
"always",
]
need_stdout = true
background = false
env.TEST_LOG = "true"

[jobs.test-trace]
command = ["cargo", "test", "--color", "always", "--", "--color", "always"]
command = ["cargo", "test"]
need_stdout = true
env.TEST_LOG = "true"

Expand All @@ -129,45 +79,32 @@ command = [
"check",
"--target",
"wasm32-unknown-unknown",
"--color",
"always",
"--package",
"chat-app-client",
]
need_stdout = false

# To test Standalone mode
[jobs.test-chat-server-standalone-mysql]
command = [
"cargo",
"test",
"--color",
"always",
"--package",
"chat-app-server",
"--no-default-features",
"--features",
"standalone,mysql",
"--",
"--color",
"always",
]
need_stdout = true

[jobs.test-chat-server-standalone-mysql-trace]
command = [
"cargo",
"test",
"--color",
"always",
"--package",
"chat-app-server",
"--no-default-features",
"--features",
"standalone,mysql",
"--",
"--color",
"always",
]
need_stdout = true
env.TEST_LOG = "true"
Expand All @@ -177,33 +114,23 @@ env.TEST_LOG = "true"
command = [
"cargo",
"test",
"--color",
"always",
"--package",
"chat-app-server",
"--no-default-features",
"--features",
"standalone,postgres",
"--",
"--color",
"always",
]
need_stdout = true

[jobs.test-chat-server-standalone-pg-trace]
command = [
"cargo",
"test",
"--color",
"always",
"--package",
"chat-app-server",
"--no-default-features",
"--features",
"standalone,postgres",
"--",
"--color",
"always",
]
need_stdout = true
env.TEST_LOG = "true"
Expand All @@ -217,8 +144,6 @@ command = [
"--no-default-features",
"--features",
"shuttle",
"--color",
"always",
]
need_stdout = false

Expand All @@ -231,23 +156,20 @@ command = [
"--no-default-features",
"--features",
"shuttle",
"--color",
"always",
]
need_stdout = false

# You may define here keybindings that would be specific to
# a project, for example a shortcut to launch a specific job.
# Shortcuts to internal functions (scrolling, toggling, etc.)
# should go in your personal global prefs.toml file instead.
[keybindings]
i = "job:include-ignored"
alt-t = "job:test-trace"
alt-q = "job:check" # Provides a way to do a quick check without including clippy like I normally want
w = "job:check-wasm-client"
s = "job:test-chat-server-standalone-mysql"
alt-s = "job:test-chat-server-standalone-mysql-trace"
e = "job:run-client-egui"
i = "job:include-ignored"
p = "job:test-chat-server-standalone-pg"
alt-p = "job:test-chat-server-standalone-pg-trace"
alt-v = "job:check-shuttle"
r = "job:run-server-standalone-mysql"
alt-r = "job:run-server-standalone-postgres"
ctrl-r = "job:run-server-shuttle"
s = "job:test-chat-server-standalone-mysql"
alt-s = "job:test-chat-server-standalone-mysql-trace"
v = "job:clippy-shuttle"
alt-v = "job:check-shuttle"
w = "job:check-wasm-client"
2 changes: 1 addition & 1 deletion crates/chat-app-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chat-app-client"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
publish = false
description = "EGUI Client for the Demo Chat App"
Expand Down
6 changes: 3 additions & 3 deletions crates/chat-app-client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@


<link data-trunk rel="copy-file" href="assets/sw.js"/>
<link data-trunk rel="copy-file" href="assets/manifest.json" data-target-path="assets"/>
<link data-trunk rel="copy-file" href="assets/manifest.json"/>
<link data-trunk rel="copy-file" href="assets/icon-32.png" data-target-path="assets"/>
<link data-trunk rel="copy-file" href="assets/icon-256.png" data-target-path="assets"/>
<link data-trunk rel="copy-file" href="assets/maskable_icon_x512.png" data-target-path="assets"/>


<link rel="manifest" href="assets/manifest.json">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#404040">

Expand Down Expand Up @@ -143,4 +143,4 @@

</html>

<!-- Powered by egui: https://github.com/emilk/egui/ -->
<!-- Powered by egui: https://github.com/emilk/egui/ -->
Loading
Loading