Getting Started
This document covers the preparation of the development environment, quick start and basic tutorials of Volo-HTTP.
Volo provides CLI tools of the same name, and it provide functions as follows:
-
Server-side scaffold generation
support generate HTTP or RPC server-side scaffold by IDL like Thrift, Protobuf
-
Stub management
-
Old version migration
Part 1. Install Cli tool
Need rustc version >= 1.80.0
Then, we type:
and we can see the output as follows:
Part 2. Generate RPC code
To create a RPC project, we need to write an IDL first. Let’s take Thrift for example.
Create a new Thrift IDL in the project directory:
vim idl/rpc_example.thrift
Execute the following command:
volo init volo-rpc-example idl/rpc_example.thrift
At this point, our entire catalog is structured as follows:
Part 2. Generate HTTP code
Execute the following command:
volo http init volo-http-example
At this point, our entire catalog is structured as follows:
Last modified
November 14, 2024
: Fix: Remove duplicate file (#1170) (6d2d4ae)