mirror of
https://github.com/AThilenius/axum-connect.git
synced 2024-11-24 06:19:46 +00:00
Take axum-connect out of alpha
This commit is contained in:
parent
ccbebb8dce
commit
7e6fe2c87c
4 changed files with 32 additions and 30 deletions
40
README.md
40
README.md
|
@ -4,11 +4,6 @@ Brings the protobuf-based [Connect-Web RPC
|
|||
framework](https://connect.build/docs/introduction) to Rust via idiomatic
|
||||
[Axum](https://github.com/tokio-rs/axum).
|
||||
|
||||
# Alpha software ⚠️
|
||||
|
||||
Project is under active development for internal use; minor revision bumps are
|
||||
often breaking.
|
||||
|
||||
# Features 🔍
|
||||
|
||||
- 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,
|
||||
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 🤓
|
||||
|
||||
_Prior knowledge with [Protobuf](https://github.com/protocolbuffers/protobuf)
|
||||
|
@ -82,10 +87,14 @@ use axum_connect_build::{axum_connect_codegen, AxumConnectGenSettings};
|
|||
|
||||
fn main() {
|
||||
// This helper will use `proto` as the import path, and globs all .proto
|
||||
// files in the `proto` directory. You can build an AxumConnectGenSettings
|
||||
// manually too, if you wish.
|
||||
// files in the `proto` directory.
|
||||
//
|
||||
// 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")
|
||||
.expect("failed to glob proto files");
|
||||
|
||||
axum_connect_codegen(settings).unwrap();
|
||||
}
|
||||
```
|
||||
|
@ -183,7 +192,6 @@ handlers.
|
|||
- A plan for forward-compatibility
|
||||
- Bring everything in-line with `connect-web` and...
|
||||
- Comprehensive integration tests
|
||||
- A first-stable launch
|
||||
|
||||
## More Distant Goals 🌜
|
||||
|
||||
|
@ -220,11 +228,11 @@ will disable the download entirely.
|
|||
|
||||
Prost stopped shipping `protoc` binaries (a decision I disagree with) so
|
||||
`axum-connect-build` internally uses
|
||||
[protoc-fetcher](https://crates.io/crates/protoc-fetcher) download and resolve a
|
||||
copy of `protoc`. This is far more turnkey than forcing every build environment
|
||||
(often Heroku and/or Docker) to have a recent `protoc` binary pre-installed.
|
||||
This behavior can be disabled if you disagree, you need to comply with corporate
|
||||
policy, or your build environment is offline.
|
||||
[protoc-fetcher](https://crates.io/crates/protoc-fetcher) to download and
|
||||
resolve a copy of `protoc`. This is far more turnkey than forcing every build
|
||||
environment (often Heroku and/or Docker) to have a recent `protoc` binary
|
||||
pre-installed. This behavior can be disabled if you disagree, or if you need to
|
||||
comply with corporate policy, or your build environment is offline.
|
||||
|
||||
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
|
||||
|
@ -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
|
||||
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 🧾
|
||||
|
||||
Axum-Connect is dual licensed (at your option)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "axum-connect-build"
|
||||
version = "0.1.5"
|
||||
version = "0.2.0"
|
||||
authors = ["Alec Thilenius <alec@thilenius.com>"]
|
||||
edition = "2021"
|
||||
categories = [
|
||||
|
@ -17,11 +17,11 @@ repository = "https://github.com/AThilenius/axum-connect"
|
|||
[dependencies]
|
||||
anyhow = "1.0"
|
||||
convert_case = "0.6.0"
|
||||
pbjson-build = "0.5.1"
|
||||
pbjson-build = "0.6.2"
|
||||
proc-macro2 = "1.0.56"
|
||||
prost = "0.11.9"
|
||||
prost-build = "0.11.9"
|
||||
prost-reflect = "0.11.4"
|
||||
prost = "0.12.1"
|
||||
prost-build = "0.12.1"
|
||||
prost-reflect = "0.12.0"
|
||||
protoc-fetcher = "0.1.0"
|
||||
quote = "1.0.26"
|
||||
syn = "2.0.15"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
[package]
|
||||
name = "axum-connect-example"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
async-stream = "0.3.5"
|
||||
axum = "0.6.9"
|
||||
axum-connect = { path = "../axum-connect" }
|
||||
prost = "0.11.9"
|
||||
prost = "0.12.1"
|
||||
tokio = { version = "1.0", features = ["full"] }
|
||||
|
||||
[build-dependencies]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "axum-connect"
|
||||
version = "0.1.7"
|
||||
version = "0.2.0"
|
||||
authors = ["Alec Thilenius <alec@thilenius.com>"]
|
||||
edition = "2021"
|
||||
categories = [
|
||||
|
@ -19,8 +19,8 @@ async-stream = "0.3.5"
|
|||
async-trait = "0.1.64"
|
||||
axum = "0.6.9"
|
||||
futures = "0.3.26"
|
||||
pbjson = "0.5.1"
|
||||
pbjson-types = "0.5.1"
|
||||
prost = "0.11.9"
|
||||
pbjson = "0.6.0"
|
||||
pbjson-types = "0.6.0"
|
||||
prost = "0.12.1"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
|
|
Loading…
Reference in a new issue