Skip to content

Commit

Permalink
WebSocket client module (#24)
Browse files Browse the repository at this point in the history
* WebSocket client module

The KittyCAD Rust API client lets users connect to our WebSocket API. But OpenAPI can't tell users what the server expects to receive over that WebSocket, or what it intends to send over the WebSocket either.

This library solves the problem. It encapsulates the WebSocket connection from our API client, and adds methods to send and receive the correct types. This way users will always send the right types of requests and always receive the right types of responses.

Right now, this API sends over WebSocket text messages (JSON) to make it easier to debug with standard web debugging tools. But in the future, we can offer WebSocket binary messages (BSON), for faster de/encoding.

* Working example

* CI for cargo sort
  • Loading branch information
adamchalmers authored Dec 13, 2023
1 parent 51707d3 commit 38f333b
Show file tree
Hide file tree
Showing 14 changed files with 2,017 additions and 74 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ jobs:
# Edit this file to tweak the typo list and other configuration.
run: codespell --config .codespellrc

cargo-toml-sorted:
name: Check Cargo.toml is sorted
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install cargo-sort
run: cargo install cargo-sort
- name: Run check
run: cargo sort --workspace --check

semver-checks:
runs-on: ubuntu-latest
steps:
Expand Down
Loading

0 comments on commit 38f333b

Please sign in to comment.