Skip to content

Commit

Permalink
Upgrade workspace
Browse files Browse the repository at this point in the history
Co-authored-by: Robin <[email protected]>
  • Loading branch information
oscartbeaumont and beanow-at-crabnebula committed Oct 22, 2023
1 parent f5031c7 commit b168e62
Show file tree
Hide file tree
Showing 21 changed files with 1,330 additions and 1,459 deletions.
13 changes: 5 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pin-project-lite = "0.2.13"

# Optional
serde_json = { version = "1", default-features = false }
tracing = { version = "0.1.37", default-features = false, optional = true }
tracing = { version = "0.1.40", default-features = false, optional = true }

# Even though this `cfg` can never be enabled, it still forces cargo to keep `rspc-core` in lockstep with `rspc`.
[target.'cfg(any())'.dependencies]
Expand All @@ -52,8 +52,8 @@ rspc-core = { version = "=1.0.0-rc.5", path = "./crates/core" }
[dev-dependencies]
# Tests
async-stream = "0.3.5"
tokio = { version = "1.32.0", features = ["macros", "rt-multi-thread"] }
tauri = { version = "1.4.1", features = ["api-all"] }
tokio = { version = "1.33.0", features = ["macros", "rt-multi-thread"] }
tauri = { version = "1.5.2", features = ["api-all"] }

# Benchmark
criterion = { version = "0.5", features = ["async_tokio", "html_reports"] }
Expand All @@ -63,9 +63,6 @@ pprof = { version = "0.13.0", features = ["flamegraph", "criterion", "protobuf-c
members = ["./crates/*", "./examples", "./examples/axum", "./examples/vercel", "./examples/tauri/src-tauri"]

[workspace.dependencies]
specta = { version = "=2.0.0-rc.5", default-features = false, features = ["serde", "serde_json"] }
specta = { version = "=2.0.0-rc.6", default-features = false, features = ["serde", "serde_json"] }
serde = { version = "1", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.49", default-features = false }

[patch.crates-io]
specta = { git = "https://github.com/oscartbeaumont/specta", rev = "4dea4d52ebced76e9ccf5970f8122b00772b809c" }
thiserror = { version = "1.0.50", default-features = false }
2 changes: 1 addition & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ serde_json = { version = "1", default-features = false }
streamunordered = "0.5.3"

# TODO: Remove these from core
tracing = { version = "0.1.37", default-features = false, optional = true }
tracing = { version = "0.1.40", default-features = false, optional = true }

# TODO: Make something like this work
# # Even though this `cfg` can never be enabled, it still forces cargo to keep `rspc-core` in lockstep with `rspc-*`.
Expand Down
8 changes: 4 additions & 4 deletions crates/create-rspc-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ include_dir = "0.7.3"
requestty = "0.5.0"
strum = { version = "0.25.0", features = ["derive"] }
rustc_version = "0.4.0"
ureq = { version = "2.7.1", features = ["json"] }
ureq = { version = "2.8.0", features = ["json"] }
serde_json = "1.0.107"
ctrlc = "3.4.1"
thiserror = "1.0.49"
thiserror = "1.0.50"
walkdir = "2"

[dev-dependencies]
tempfile = "3.8.0"
cargo = "0.73.1"
tokio = { version = "1.32.0", features = ["full", "process"] }
cargo = "0.74.0"
tokio = { version = "1.33.0", features = ["full", "process"] }
futures = "0.3.28"
2 changes: 1 addition & 1 deletion crates/httpz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ vercel = ["httpz/vercel", "httpz/ws", "axum"] # TODO: Shouldn't rely on Ax

[dependencies]
rspc-core = { version = "1.0.0-rc.5", path = "../core", default-features = false }
httpz = { version = "0.0.5", default-features = false, features = ["cookies"] }
httpz = { version = "0.0.6", default-features = false, features = ["cookies"] }
tokio = { version = "1", default-features = false, features = ["sync"] }
serde_json = "1.0.107"
futures = "0.3.28"
Expand Down
10 changes: 3 additions & 7 deletions crates/tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ edition = "2021"

[dependencies] # TODO: Typescript support should be optional
futures = "0.3.28"
rspc-core = { version = "1.0.0-rc.5", path = "../core", default-features = false, features = [
"typescript",
] } # TODO: Avoid typescript features
rspc-core = { version = "1.0.0-rc.5", path = "../core", default-features = false, features = ["typescript"] } # TODO: Avoid typescript features
serde = { workspace = true, features = ["derive"] }
serde_json = "1.0.107"
tauri = { version = "1.4.1", default-features = false, features = ["wry"] } # TODO: Work without wry
tauri-specta = { git = "https://github.com/oscartbeaumont/tauri-specta", rev = "1073c8da4e4fccbeebfb389b2f093ac711cd35df", default-features = false, features = [
"typescript",
] }
tauri = { version = "1.5.2", default-features = false, features = ["wry"] } # TODO: Work without wry
tauri-specta = { version = "2.0.0-rc.2", default-features = false, features = ["typescript"] }
specta = { workspace = true }
14 changes: 7 additions & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
"dependencies": {
"@headlessui/react": "^1.7.17",
"@heroicons/react": "^2.0.18",
"@vercel/og": "^0.5.17",
"next": "^13.5.3",
"nextra": "^2.13.1",
"nextra-theme-docs": "^2.13.1",
"@vercel/og": "^0.5.20",
"next": "^13.5.6",
"nextra": "^2.13.2",
"nextra-theme-docs": "^2.13.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-popper": "^2.3.0"
},
"devDependencies": {
"@types/node": "20.7.1",
"@types/react": "^18.2.23",
"@types/node": "20.8.7",
"@types/react": "^18.2.31",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.30",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.3",
"tslib": "^2.6.2",
"typescript": "^5.2.2"
Expand Down
4 changes: 1 addition & 3 deletions docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ title: Overview

# rspc

rspc is a typesafe router allowing you to build end-to-end type safe APIs. You define your backend logic in a Rust function and use the Typescript client to call it. Your rspc router is transport agnostic which means you can serve it from any HTTP server of your choice such as [Axum](https://github.com/tokio-rs/axum) or even from [Tauri](https://tauri.app).

TODO: Gif showing backend changes reflecting as Typescript errors
rspc is a typesafe router allowing you to build end-to-end type safe APIs. It lets you define your backend logic in a Rust function and use the Typescript client to call it. Your rspc router is transport agnostic which means you can serve it from any HTTP server of your choice such as [Axum](https://github.com/tokio-rs/axum) or even from [Tauri](https://tauri.app).

## Features

Expand Down
8 changes: 4 additions & 4 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ rspc-httpz = { path = "../crates/httpz", features = ["axum"] }
async-stream = "0.3.5"
axum = "0.6.20"
chrono = { version = "0.4.31", features = ["serde"] }
serde = { version = "1.0.188", features = ["derive"] }
time = "0.3.29"
tokio = { version = "1.32.0", features = ["rt-multi-thread", "macros", "time", "sync"], default-features = false }
serde = { version = "1.0.189", features = ["derive"] }
time = "0.3.30"
tokio = { version = "1.33.0", features = ["rt-multi-thread", "macros", "time", "sync"], default-features = false }
tower-cookies = "0.9.0"
tower-http = { version = "0.4.4", default-features = false, features = ["cors"] }
uuid = { version = "1.4.1", features = ["v4", "serde"] }
uuid = { version = "1.5.0", features = ["v4", "serde"] }
serde_json = "1.0.107"
specta = { workspace = true }
thiserror = { workspace = true }
24 changes: 12 additions & 12 deletions examples/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"astro": "astro"
},
"devDependencies": {
"@astrojs/react": "^3.0.2",
"@astrojs/solid-js": "^3.0.1",
"@astrojs/svelte": "^4.0.2",
"@astrojs/tailwind": "^5.0.0",
"@types/react": "^18.2.23",
"@types/react-dom": "^18.2.8",
"astro": "^3.1.4",
"@astrojs/react": "^3.0.3",
"@astrojs/solid-js": "^3.0.2",
"@astrojs/svelte": "^4.0.3",
"@astrojs/tailwind": "^5.0.2",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"astro": "^3.3.2",
"tailwindcss": "^3.3.3"
},
"dependencies": {
Expand All @@ -25,12 +25,12 @@
"@rspc/solid-query": "workspace:*",
"@rspc/svelte-query": "workspace:*",
"@rspc/tauri": "workspace:^",
"@tanstack/react-query": "^4.35.3",
"@tanstack/solid-query": "^4.35.3",
"@tanstack/svelte-query": "^4.35.3",
"@tanstack/react-query": "^5.0.0",
"@tanstack/solid-query": "^5.0.0",
"@tanstack/svelte-query": "^5.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"solid-js": "^1.7.12",
"svelte": "^4.2.1"
"solid-js": "^1.8.3",
"svelte": "^4.2.2"
}
}
4 changes: 2 additions & 2 deletions examples/axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ publish = false
[dependencies]
rspc = { path = "../../", features = ["tracing", "unstable"] }
rspc-httpz = { path = "../../crates/httpz", features = ["axum"] }
tokio = { version = "1.32.0", features = ["full"] }
tokio = { version = "1.33.0", features = ["full"] }
async-stream = "0.3.5"
axum = { version = "0.6.20", features = ["ws", "http2"] }
tower-http = { version = "0.4.4", default-features = false, features = ["cors"] }
futures = "0.3.28"
tracing = "0.1.37"
tracing = "0.1.40"
tracing-subscriber = "0.3.17"
thiserror = { workspace = true }
serde = { workspace = true }
Expand Down
10 changes: 5 additions & 5 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"dependencies": {
"@rspc/client": "workspace:*",
"@rspc/react-query": "workspace:*",
"@tanstack/react-query": "^4.35.3",
"next": "^13.5.3",
"@tanstack/react-query": "^5.0.0",
"next": "^13.5.6",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "^20.7.1",
"@types/react": "^18.2.23",
"@types/react-dom": "^18.2.8",
"@types/node": "^20.8.7",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"typescript": "^5.2.2"
}
}
6 changes: 3 additions & 3 deletions examples/tauri/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"web-build": "tsc && vite build"
},
"dependencies": {
"@tauri-apps/api": "^1.4.0"
"@tauri-apps/api": "^1.5.1"
},
"devDependencies": {
"@tauri-apps/cli": "^1.4.0",
"@tauri-apps/cli": "^1.5.5",
"typescript": "^5.2.2",
"vite": "^4.4.9"
"vite": "^4.5.0"
}
}
4 changes: 2 additions & 2 deletions examples/tauri/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ edition = "2021"
publish = false

[build-dependencies]
tauri-build = { version = "1.4", features = [] }
tauri-build = { version = "1.5", features = [] }

[dependencies]
tauri = { version = "1.4", features = ["shell-open"] }
tauri = { version = "1.5", features = ["shell-open"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
rspc = { path = "../../../", features = ["unstable"] }
Expand Down
12 changes: 6 additions & 6 deletions examples/vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
"dependencies": {
"@rspc/client": "workspace:*",
"@rspc/react-query": "workspace:*",
"@tanstack/react-query": "^4.35.3",
"next": "^13.5.3",
"@tanstack/react-query": "^5.0.0",
"next": "^13.5.6",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "^20.7.1",
"@types/react": "^18.2.23",
"@types/react-dom": "^18.2.8",
"concurrently": "^8.2.1",
"@types/node": "^20.8.7",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"concurrently": "^8.2.2",
"typescript": "^5.2.2"
}
}
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"devDependencies": {
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"vitest": "^0.34.5",
"vitest": "^0.34.6",
"ws": "^8.14.2"
}
}
4 changes: 2 additions & 2 deletions packages/query-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
},
"devDependencies": {
"@rspc/client": "workspace:*",
"@tanstack/query-core": "^4.35.3",
"@tanstack/query-core": "^5.0.0",
"tslib": "^2.6.2",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"vitest": "^0.34.5"
"vitest": "^0.34.6"
},
"peerDependencies": {
"@rspc/client": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions packages/react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
},
"devDependencies": {
"@rspc/client": "workspace:*",
"@tanstack/react-query": "^4.35.3",
"@types/react": "^18.2.23",
"@tanstack/react-query": "^5.0.0",
"@types/react": "^18.2.31",
"react": "^18.2.0",
"tslib": "^2.6.2",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"vitest": "^0.34.5"
"vitest": "^0.34.6"
},
"peerDependencies": {
"@rspc/client": "workspace:*",
Expand Down
8 changes: 4 additions & 4 deletions packages/solid-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
},
"devDependencies": {
"@rspc/client": "workspace:*",
"@tanstack/solid-query": "^4.35.3",
"rollup": "^3.29.4",
"@tanstack/solid-query": "^5.0.0",
"rollup": "^4.1.4",
"rollup-preset-solid": "^2.0.1",
"solid-js": "^1.7.12",
"solid-js": "^1.8.3",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vitest": "^0.34.5"
"vitest": "^0.34.6"
},
"peerDependencies": {
"@rspc/client": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/svelte-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
"devDependencies": {
"@rspc/client": "workspace:*",
"@sveltejs/package": "^2.2.2",
"@tanstack/svelte-query": "^4.35.3",
"@tanstack/svelte-query": "^5.0.2",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vitest": "^0.34.5"
"vitest": "^0.34.6"
},
"peerDependencies": {
"@rspc/client": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/tauri/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"@rspc/client": "workspace:*"
},
"devDependencies": {
"@tauri-apps/api": "^1.4.0",
"@tauri-apps/api": "^1.5.1",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"vitest": "^0.34.5"
"vitest": "^0.34.6"
},
"peerDependencies": {
"@tauri-apps/api": "^1.2.0"
Expand Down
Loading

0 comments on commit b168e62

Please sign in to comment.