Skip to content

Commit

Permalink
make sure serialization machinery gets to the browser
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Dec 26, 2024
1 parent 0697ebc commit 90524ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions browser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ wasm-bindgen = "0.2.84"
# code size when deploying.
console_error_panic_hook = { version = "0.1.7", optional = true }
chrono = "0.4.39"
serde_json = "1.0.134"

# Enable this to get wasm-pack to leave names in the file, making it possible to
# analyze with Twiggy.
Expand Down
2 changes: 2 additions & 0 deletions browser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ pub fn main() {

alert(&replica.state().pings.contains(&now).to_string());
alert(replica.state().get_tag(&now).unwrap());

alert(&serde_json::to_string(&replica).unwrap());
}

0 comments on commit 90524ae

Please sign in to comment.