Skip to content

Commit 63c6acf

Browse files
committed
Move CgRPC, gRPC, and QuickProto to "Sources" directory and add new top-level Package.swift.
1 parent 0ef3462 commit 63c6acf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+234
-458
lines changed

.gitmodules

-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
[submodule "third_party/grpc"]
2-
path = third_party/grpc
3-
url = https://github.com/grpc/grpc
4-
[submodule "third_party/swift-protobuf"]
5-
path = third_party/swift-protobuf
6-
url = https://github.com/apple/swift-protobuf

Packages/CgRPC/Package.swift renamed to Package.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,10 @@
3333
import PackageDescription
3434

3535
let package = Package(
36-
name: "CgRPC"
36+
name: "SwiftGRPC",
37+
targets: [
38+
Target(name: "gRPC",
39+
dependencies: ["CgRPC"]),
40+
Target(name: "QuickProto"),
41+
]
3742
)

Packages/CgRPC/Makefile

-7
This file was deleted.

Packages/Client/Makefile

-24
This file was deleted.

Packages/EchoClient/Makefile

-11
This file was deleted.

Packages/EchoClient/Package.swift

-41
This file was deleted.

Packages/EchoServer/Makefile

-11
This file was deleted.

Packages/EchoServer/Package.swift

-41
This file was deleted.

Packages/EchoServer/main.swift

-92
This file was deleted.

Packages/Makefile

-22
This file was deleted.

Packages/QuickProto/Makefile

-8
This file was deleted.

Packages/Server/Makefile

-24
This file was deleted.

Packages/gRPC/Makefile

-5
This file was deleted.

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ Other examples include [Sessions](Examples/Sessions),
2727
Swift Package Manager builds are demonstrated on Linux using
2828
the instructions in the [Packages](Packages) directory.
2929

30+
## Getting started
31+
32+
After cloning this repository, `cd third_party; RUNME.sh` to
33+
download its dependencies (we don't use git submodules to keep
34+
this repository lean for imports with the Swift Package Manager).
35+
36+
## Building grpc
37+
38+
Swift gRPC currently requires a separate build of the grpc core
39+
library. To do this, enter the grpc directory and run
40+
`git submodule update --init` and then `make install`.
41+
If you get build errors, edit the Makefile and remove
42+
"-Werror" from the line that begins with "CPPFLAGS +=".
43+
3044
## Can't find something?
3145

3246
To make it easier for the Swift Package manager to find,

Samples/CLEANUP.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
cd SimpleServer; make clean; cd ..
4+
cd SimpleClient; make clean; cd ..
5+
cd EchoServer; make clean; cd ..
6+
cd EchoClient; make clean; cd ..

Samples/EchoClient/Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
LIBDIR = /usr/local/lib
2+
INCDIR = /usr/local/include
3+
4+
all:
5+
swift build -Xlinker -L$(LIBDIR) -Xlinker -lgrpc -Xcc -I$(INCDIR)
6+
7+
clean :
8+
rm -rf Packages
9+
rm -rf .build

Packages/gRPC/Package.swift renamed to Samples/EchoClient/Package.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
*/
3333
import PackageDescription
3434
let package = Package (
35-
name: "gRPC",
35+
name: "EchoClient",
3636
dependencies: [
37-
.Package(url: "../CgRPC", majorVersion:1),
37+
.Package(url: "https://github.com/timburks/grpc-swift.git", Version(0,1,0)),
3838
]
3939
)
File renamed without changes.

0 commit comments

Comments
 (0)