Skip to content

Commit

Permalink
feat: 初始化项目,初步调研完客户端和服务端通信
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoutianlei-shadow committed Jul 3, 2020
1 parent 082793c commit fdd0336
Show file tree
Hide file tree
Showing 28 changed files with 5,222 additions and 2,039 deletions.
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bazel-bin/apps/server",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "lldb",
"preLaunchTask": "Build with Bazel"
}
]
}
12 changes: 11 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
"optional": "cpp",
"__bit_reference": "cpp",
"iostream": "cpp",
"istream": "cpp"
"istream": "cpp",
"ostream": "cpp",
"map": "cpp",
"memory": "cpp",
"unordered_map": "cpp",
"mutex": "cpp",
"__locale": "cpp",
"locale": "cpp",
"thread": "cpp",
"typeindex": "cpp",
"string": "cpp"
}
}
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build with Bazel",//这个任务的名字在launch.json最后一项配置
"type": "shell",
"command": "make build",
"args": [
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ apis:
bazel build //apis:all

build:
bazel build --cxxopt='-std=c++17'
bazel build -c dbg --spawn_strategy=standalone --cxxopt='-std=c++17' //apps:all

server:
bazel run --cxxopt='-std=c++17' //apps:server

client:
bazel run --cxxopt='-std=c++17' //apps:client

all: proto apis build

Expand Down
11 changes: 6 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ grpc_deps()
load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
grpc_extra_deps()

# new_local_repository(
# name = "usr_local",
# path = "/usr/local",
# build_file = "mysql.BUILD"
# )
# new_local_repository 允许将本地目录转换为bazel存储库
new_local_repository(
name = "usr_local",
path = "/usr/local/mysql",
build_file = "mysql.BUILD"
)
10 changes: 5 additions & 5 deletions apis/BUILD
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

cc_library(
name = "feepb",
name = "deduction",
srcs = [
'cpp/protocol/v1/fee.grpc.pb.cc',
'cpp/protocol/v1/fee.pb.cc',
'cpp/protocol/v1/deduction.grpc.pb.cc',
'cpp/protocol/v1/deduction.pb.cc',
],
hdrs = [
'cpp/protocol/v1/fee.grpc.pb.h',
'cpp/protocol/v1/fee.pb.h',
'cpp/protocol/v1/deduction.grpc.pb.h',
'cpp/protocol/v1/deduction.pb.h',
],
deps = [
'@com_google_protobuf//:protobuf',
Expand Down
144 changes: 144 additions & 0 deletions apis/cpp/protocol/v1/deduction.grpc.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fdd0336

Please sign in to comment.