Start with rust server

This commit is contained in:
Eden Kirin
2023-03-19 19:59:50 +01:00
parent 1050730047
commit 1fa1b10699
5 changed files with 32 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
__pycache__
/dist
/src/funnel/env
/src/serve_currenttime/target

View File

@ -102,3 +102,12 @@ Install protobuf compiler
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
```
### Rust services
#### [Tonic](https://github.com/hyperium/tonic)
Tonic is a gRPC over HTTP/2 implementation focused on high performance, interoperability, and flexibility. This library was created to have first class support of async/await and to act as a core building block for production systems written in Rust.
[Rust and gRPC: A complete guide](https://blog.logrocket.com/rust-and-grpc-a-complete-guide/)

7
src/serve_currenttime/Cargo.lock generated Normal file
View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "serve_currenttime"
version = "0.1.0"

View File

@ -0,0 +1,12 @@
[package]
name = "serve_currenttime"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
[[bin]]
name = "server"
path = "src/server.rs"

View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}