Take axum-connect out of alpha

This commit is contained in:
Alec Thilenius 2023-10-03 17:05:45 -07:00
parent ccbebb8dce
commit 7e6fe2c87c
4 changed files with 32 additions and 30 deletions

View file

@ -4,11 +4,6 @@ Brings the protobuf-based [Connect-Web RPC
framework](https://connect.build/docs/introduction) to Rust via idiomatic framework](https://connect.build/docs/introduction) to Rust via idiomatic
[Axum](https://github.com/tokio-rs/axum). [Axum](https://github.com/tokio-rs/axum).
# Alpha software ⚠️
Project is under active development for internal use; minor revision bumps are
often breaking.
# Features 🔍 # Features 🔍
- Integrates into existing Axum HTTP applications seamlessly - Integrates into existing Axum HTTP applications seamlessly
@ -28,6 +23,16 @@ often breaking.
- All the other amazing benefits that come with Axum, like the community, - All the other amazing benefits that come with Axum, like the community,
documentation and performance! documentation and performance!
# Caution ⚠️
We use `axum-connect` in production, but I don't kow that anyone with more sense
does. It's written in Rust which obviously offers some amazing compiler
guarantees, but it's not well tested or battle-proven yet. Do what you will with
that information.
Please let me know if you're using `axum-connect`! And open issues if you find a
bug.
# Getting Started 🤓 # Getting Started 🤓
_Prior knowledge with [Protobuf](https://github.com/protocolbuffers/protobuf) _Prior knowledge with [Protobuf](https://github.com/protocolbuffers/protobuf)
@ -82,10 +87,14 @@ use axum_connect_build::{axum_connect_codegen, AxumConnectGenSettings};
fn main() { fn main() {
// This helper will use `proto` as the import path, and globs all .proto // This helper will use `proto` as the import path, and globs all .proto
// files in the `proto` directory. You can build an AxumConnectGenSettings // files in the `proto` directory.
// manually too, if you wish. //
// Note that you might need to re-save the `build.rs` file after updating
// a proto file to get rust-analyzer to pickup the change. I haven't put
// time into looking for a fix to that yet.
let settings = AxumConnectGenSettings::from_directory_recursive("proto") let settings = AxumConnectGenSettings::from_directory_recursive("proto")
.expect("failed to glob proto files"); .expect("failed to glob proto files");
axum_connect_codegen(settings).unwrap(); axum_connect_codegen(settings).unwrap();
} }
``` ```
@ -183,7 +192,6 @@ handlers.
- A plan for forward-compatibility - A plan for forward-compatibility
- Bring everything in-line with `connect-web` and... - Bring everything in-line with `connect-web` and...
- Comprehensive integration tests - Comprehensive integration tests
- A first-stable launch
## More Distant Goals 🌜 ## More Distant Goals 🌜
@ -220,11 +228,11 @@ will disable the download entirely.
Prost stopped shipping `protoc` binaries (a decision I disagree with) so Prost stopped shipping `protoc` binaries (a decision I disagree with) so
`axum-connect-build` internally uses `axum-connect-build` internally uses
[protoc-fetcher](https://crates.io/crates/protoc-fetcher) download and resolve a [protoc-fetcher](https://crates.io/crates/protoc-fetcher) to download and
copy of `protoc`. This is far more turnkey than forcing every build environment resolve a copy of `protoc`. This is far more turnkey than forcing every build
(often Heroku and/or Docker) to have a recent `protoc` binary pre-installed. environment (often Heroku and/or Docker) to have a recent `protoc` binary
This behavior can be disabled if you disagree, you need to comply with corporate pre-installed. This behavior can be disabled if you disagree, or if you need to
policy, or your build environment is offline. comply with corporate policy, or your build environment is offline.
I would someday like to replace all of it with a new 'lean and I would someday like to replace all of it with a new 'lean and
mean' protoc library for the Rust community. One with a built-in parser, that mean' protoc library for the Rust community. One with a built-in parser, that
@ -232,12 +240,6 @@ supports only the latest proto3 syntax as well as the canonical JSON
serialization format and explicitly doesn't support many of the rarely used serialization format and explicitly doesn't support many of the rarely used
features. But that day is not today. features. But that day is not today.
# Versioning 🔢
`axum-connect` and `axum-connect-build` versions are currently **not** kept in
lockstep. They will be once I get to beta. Right now the versions mean nothing
more than 'Alec pushed a new change'.
# License 🧾 # License 🧾
Axum-Connect is dual licensed (at your option) Axum-Connect is dual licensed (at your option)

View file

@ -1,6 +1,6 @@
[package] [package]
name = "axum-connect-build" name = "axum-connect-build"
version = "0.1.5" version = "0.2.0"
authors = ["Alec Thilenius <alec@thilenius.com>"] authors = ["Alec Thilenius <alec@thilenius.com>"]
edition = "2021" edition = "2021"
categories = [ categories = [
@ -17,11 +17,11 @@ repository = "https://github.com/AThilenius/axum-connect"
[dependencies] [dependencies]
anyhow = "1.0" anyhow = "1.0"
convert_case = "0.6.0" convert_case = "0.6.0"
pbjson-build = "0.5.1" pbjson-build = "0.6.2"
proc-macro2 = "1.0.56" proc-macro2 = "1.0.56"
prost = "0.11.9" prost = "0.12.1"
prost-build = "0.11.9" prost-build = "0.12.1"
prost-reflect = "0.11.4" prost-reflect = "0.12.0"
protoc-fetcher = "0.1.0" protoc-fetcher = "0.1.0"
quote = "1.0.26" quote = "1.0.26"
syn = "2.0.15" syn = "2.0.15"

View file

@ -1,13 +1,13 @@
[package] [package]
name = "axum-connect-example" name = "axum-connect-example"
version = "0.1.0" version = "0.2.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
async-stream = "0.3.5" async-stream = "0.3.5"
axum = "0.6.9" axum = "0.6.9"
axum-connect = { path = "../axum-connect" } axum-connect = { path = "../axum-connect" }
prost = "0.11.9" prost = "0.12.1"
tokio = { version = "1.0", features = ["full"] } tokio = { version = "1.0", features = ["full"] }
[build-dependencies] [build-dependencies]

View file

@ -1,6 +1,6 @@
[package] [package]
name = "axum-connect" name = "axum-connect"
version = "0.1.7" version = "0.2.0"
authors = ["Alec Thilenius <alec@thilenius.com>"] authors = ["Alec Thilenius <alec@thilenius.com>"]
edition = "2021" edition = "2021"
categories = [ categories = [
@ -19,8 +19,8 @@ async-stream = "0.3.5"
async-trait = "0.1.64" async-trait = "0.1.64"
axum = "0.6.9" axum = "0.6.9"
futures = "0.3.26" futures = "0.3.26"
pbjson = "0.5.1" pbjson = "0.6.0"
pbjson-types = "0.5.1" pbjson-types = "0.6.0"
prost = "0.11.9" prost = "0.12.1"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"