Skip to content

Commit b23c4a3

Browse files
committed
Set up scaffolding
0 parents  commit b23c4a3

File tree

9 files changed

+8541
-0
lines changed

9 files changed

+8541
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/bazel-Bazel_with_GTest
2+
/bazel-bin
3+
/bazel-genfiles
4+
/bazel-out
5+
/bazel-testlogs
6+
/bazel-template
7+
/bazel-*
8+
.vscode
9+
./bazel-bin/**/*
10+
bazel-bin/**/*

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2022 Ryan McDermott
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# rules_devserver: A Bazel rule for running a development server
2+
3+
This repository contains a Bazel rule for running a development server. It is
4+
intended to be used for local development, and is not intended for production
5+
use.

WORKSPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
workspace(name = "rules_devserver")

devserver/BUILD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cc_binary(
2+
name = "main",
3+
srcs = [
4+
"main.cc",
5+
"httplib/httplib.h"
6+
],
7+
linkopts = ["-lpthread"],
8+
)

devserver/defs.bzl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
def _impl(ctx):
2+
executable = ctx.actions.declare_file(ctx.attr.name)
3+
4+
args = ctx.actions.args()
5+
args.add("-o", executable)
6+
args.add_all(ctx.files.srcs)
7+
8+
ctx.actions.run(
9+
inputs = ctx.files.srcs,
10+
outputs = [executable],
11+
# This is for demo purposes. In a real Bazel rule you'd
12+
# want to use cc_common.
13+
executable = "/usr/bin/gcc",
14+
arguments = [args],
15+
)
16+
17+
return [
18+
DefaultInfo(
19+
executable = executable,
20+
files = depset([executable]),
21+
),
22+
]
23+
24+
my_cc_binary = rule(
25+
implementation = _impl,
26+
attrs = {
27+
"srcs": attr.label_list(
28+
mandatory = True,
29+
allow_files = True,
30+
),
31+
},
32+
executable = True,
33+
)

devserver/httplib/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 yhirose
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)