|
|
9 年 前 | |
|---|---|---|
| .. | ||
| CgRPC | 9 年 前 | |
| Client | 9 年 前 | |
| EchoClient | 9 年 前 | |
| EchoServer | 9 年 前 | |
| QuickProto | 9 年 前 | |
| Server | 9 年 前 | |
| gRPC | 9 年 前 | |
| Makefile | 9 年 前 | |
| README.md | 9 年 前 | |
| echo.out | 9 年 前 | |
This directory contains the Swift gRPC API and related components in the form of buildable Swift packages.
Follow these steps to build and run them on Linux.
These instructions are for running in the Docker container manager, but can be directly used on any Ubuntu 14.04 image.
Start a docker instance with the following command:
docker run -i -t --privileged=true ubuntu:14.04 /bin/bash
# update package list
apt-get update
# install download tools
apt-get install git wget -y
# install grpc build dependencies
apt-get install build-essential autoconf libtool -y
# install swift dependencies
apt-get install clang libicu-dev libedit-dev python-dev libxml2-dev -y
# go to /root
cd
# download and unpack swift
wget https://swift.org/builds/swift-3.0-preview-3/ubuntu1404/swift-3.0-PREVIEW-3/swift-3.0-PREVIEW-3-ubuntu14.04.tar.gz
tar xzf swift-3.0-PREVIEW-3-ubuntu14.04.tar.gz
# add swift to your path by adding this to your .bashrc
export SWIFT=swift-3.0-PREVIEW-3-ubuntu14.04
export PATH=/root/$SWIFT/usr/bin:$PATH
# Then run this to update your path
source ~/.bashrc
git config --global user.email <your email address>
git config --global user.name "<your name>"
git clone https://github.com/timburks/grpc
cd grpc
git submodule update --init
git checkout swift
make
make install
cd src/swift/Packages/
cd CgRPC; make; cd ..
cd gRPC; make; cd ..
cd Server; make; make install; cd ..
cd Client; make; make install; cd ..
It may be necessary to run make multiple times in the Server and Client directories.
If you see an error like the following, please retry running make.
root@4d5bef530019:~/grpc/src/swift/Packages/Client# make
swift build
Cloning /root/grpc/src/swift/Packages/gRPC
/usr/bin/git clone --recursive --depth 10 /root/grpc/src/swift/Packages/gRPC /root/grpc/src/swift/Packages/Client/Packages/gRPC
warning: --depth is ignored in local clones; use file:// instead.
Cloning into '/root/grpc/src/swift/Packages/Client/Packages/gRPC'...
done.
No submodule mapping found in .gitmodules for path 'Packages/CgRPC-1.0.0'
error: Git 2.0 or higher is required. Please update git and retry.
make: *** [all] Error 1
Server/Server &
Client/Client