Start with rust server
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
__pycache__
|
__pycache__
|
||||||
/dist
|
/dist
|
||||||
/src/funnel/env
|
/src/funnel/env
|
||||||
|
/src/serve_currenttime/target
|
||||||
|
|||||||
@ -102,3 +102,12 @@ Install protobuf compiler
|
|||||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
|
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
|
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
7
src/serve_currenttime/Cargo.lock
generated
Normal 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"
|
||||||
12
src/serve_currenttime/Cargo.toml
Normal file
12
src/serve_currenttime/Cargo.toml
Normal 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"
|
||||||
3
src/serve_currenttime/src/main.rs
Normal file
3
src/serve_currenttime/src/main.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user