Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/zero-rust-define.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/zero-rust-inspector.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/zero-rust-json-depth.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/zero-rust-traceparent.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/zero-swift-inspector.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/zero-swift-json-depth.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/zero-swift-traceparent.md

This file was deleted.

2 changes: 1 addition & 1 deletion apps/zbugs-gpui/Cargo.lock

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

2 changes: 1 addition & 1 deletion apps/zbugs-model/Cargo.lock

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

2 changes: 1 addition & 1 deletion apps/zbugs-rune/Cargo.lock

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

12 changes: 12 additions & 0 deletions packages/zero-rust-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# zero-rust

## 0.2.0

### Minor Changes

- 5f6e6d7: Add typed named queries and mutators behind a new `serde` feature, shaped like the Swift client's `defineQuery` and `defineMutator`. `define::define_query(name, |args, ctx| query)` and `define::define_mutator(name, |tx, args, ctx| ...)` take serde argument types, and `.with(args)` makes a `QueryRequest` for `materialize`, `run`, and `preload` (built with the `Zero`'s context) or a `client::MutateRequest` for the new `Zero::mutate_request`. `json::Value` implements serde, with `json::to_value` and `json::from_value`. `materialize`, `run`, and `preload` now take any `query::ZeroQuery` (an `AnyQuery`, a typed `Query`, or a `QueryRequest`), so existing calls keep working; the default build still has no third-party dependencies.
- 16ee0b8: Add JS's inspector and query metrics. `Zero::inspector()` returns an `Inspector` that lists the clients in the local store and their queries (with each query's ZQL, row count, and timings), reads a client's stored data and rows, fetches zero-cache's version and the client's metrics merged with the server's, and asks zero-cache to analyze a query (`analyze_query`, `analyze_server_ast`, `analyze_named_query`). When zero-cache requires its admin password, an inspector call fails until `authenticate(password)` succeeds, and the accepted password is presented again after a reconnect. The client now records JS's `query-materialization-client`, `query-materialization-end-to-end`, and `query-update-client` metrics as `tdigest::TDigest`s, and logs each query's end-to-end materialization, as a warning when it takes longer than the new `ZeroOptions::slow_materialize_threshold_ms` (5,000 by default).
- 8f4916a: Add two of JS's options to `ZeroOptions`. `get_traceparent` (`getTraceparent`) puts a W3C `traceparent` on each query change, `initConnection` message, and push the client sends, so zero-cache and the API server can join the app's trace. `batch_view_updates` (`batchViewUpdates`) wraps each new view's creation and each change that updates the views, with their listener calls, so a UI can render them at once. Add `Ttl::DEFAULT_PRELOAD`, the TTL JS's `preload` uses when it isn't given one.

### Patch Changes

- c3cb36c: Take JSON nested up to 5,000 levels deep, more than zero-cache can write, instead of rejecting it past 1,500: a row with a JSON column nested that deep no longer makes the client disconnect after every reconnect. Cloning, comparing, and writing such a value no longer recurse past a hundred or so levels, so it fits in a 2 MB thread stack even in a debug build.

## 0.1.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/zero-rust-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zero-rust",
"version": "0.1.3",
"version": "0.2.0",
"description": "Generates the Rust row types, schema, and query builder of a Zero app for the Zero Rust client.",
"license": "Apache-2.0",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions packages/zero-swift-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# zero-swift

## 0.7.13

### Patch Changes

- 4629981: Add JS's inspector and query metrics. `zero.inspector` lists the client's and its group's queries on the server, with their client and server timings and ZQL, reads the clients the local store knows and their local data, reports the client's query metrics merged with the server's, shows zero-cache's version, and analyzes a query, a server AST, or a named query on the server. Where JS asks for zero-cache's admin password in a dialog, a request throws `InspectorError.authenticationRequired`: call `zero.inspector.authenticate(password:)` first, and the password it accepts is presented again after a reconnect. The client records JS's query metrics (`query-materialization-client`, `query-materialization-end-to-end`, `query-update-client`) in a `TDigest` that gives the same quantiles as JS's, and `ZeroOptions.slowMaterializeThreshold` (5 seconds by default) logs a warning for a query that takes longer to materialize, server and network included.
- 9fa75ad: Take rows whose JSON is nested up to 5,000 levels deep, as the Rust client does, instead of 1,500. zero-cache writes up to about 4,100 levels, which JS accepts; a row nested deeper than about 1,495 levels made the client reject the poke, disconnect, and fail the same way after every reconnect. Values that deep are now also freed without recursion, so they don't overflow a 512 KB thread stack.
- 8f4916a: Add two of JS's options to `ZeroOptions`. `getTraceparent` puts a W3C `traceparent` on each query change, `initConnection` message, and push the client sends, so zero-cache and the API server can join the app's trace. `batchViewUpdates` wraps each new view's creation and each change that updates the views, with their listener calls, so a UI can render them at once.

## 0.7.12

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/zero-swift-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zero-swift",
"version": "0.7.12",
"version": "0.7.13",
"description": "Generates the Swift row types and schema of a Zero app for the Zero Swift client.",
"license": "Apache-2.0",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions rust/Cargo.lock

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

4 changes: 2 additions & 2 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ resolver = "3"
members = ["zero-client", "conformance", "codegen-tests", "benchmarks"]

[workspace.package]
version = "0.1.3"
version = "0.2.0"
edition = "2024"
rust-version = "1.88"
license = "Apache-2.0"
repository = "https://github.com/wevm/zero"

[workspace.dependencies]
zero-client = { path = "zero-client", version = "0.1.3" }
zero-client = { path = "zero-client", version = "0.2.0" }

[workspace.lints.rust]
unsafe_code = "forbid"
Expand Down
2 changes: 1 addition & 1 deletion swift/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.12
0.7.13