-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f1981ba
commit f063bd7
Showing
41 changed files
with
1,795 additions
and
1,969 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,6 @@ _CodeSignature | |
|
||
# Build | ||
**/_version.py | ||
|
||
# Third party | ||
src/rpcserver/protobuf-c/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,22 +80,36 @@ Install the latest client from PyPi: | |
python3 -m pip install -U rpcclient | ||
``` | ||
|
||
## Building | ||
## Construction | ||
|
||
macOS & Linux: | ||
**Note:** Cross-platform support is currently not available. | ||
|
||
```shell | ||
### macOS | ||
|
||
For macOS/iOS (Ensure that Xcode is installed): | ||
|
||
```bash | ||
brew install protobuf protobuf-c | ||
git clone [email protected]:doronz88/rpc-project.git | ||
cd src/rpcserver | ||
mkdir build | ||
cd build | ||
cmake .. -DTARGET=OSX # Build for macOS | ||
# OR | ||
cmake .. -DTARGET=IOS # Build for iOS | ||
make | ||
``` | ||
|
||
iOS (Make sure to have XCode installed): | ||
### Linux | ||
|
||
```shell | ||
```bash | ||
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev protobuf-c-compiler | ||
git clone [email protected]:doronz88/rpc-project.git | ||
cd src/rpcserver | ||
./build_darwin.sh | ||
mkdir build | ||
cd build | ||
cmake .. -DTARGET=LINUX | ||
make | ||
``` | ||
|
||
## Quickstart | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
PROTO_FILES = rpc.proto | ||
PYTHON_OUT_DIR=../rpcclient/rpcclient/protos/ | ||
C_OUT_DIR=../rpcserver/protos/ | ||
|
||
.PHONY: all c_protos python_protos clean | ||
|
||
all: c_protos python_protos | ||
|
||
c_protos: $(PROTO_FILES) | ||
# Compile Protocol Buffers for C | ||
mkdir -p $(C_OUT_DIR) | ||
protoc --c_out=$(C_OUT_DIR) --proto_path=. $(PROTO_FILES) | ||
|
||
python_protos: $(PROTO_FILES) | ||
# Compile Protocol Buffers for Python | ||
mkdir -p $(PYTHON_OUT_DIR) | ||
python3 -m grpc_tools.protoc --python_out=$(PYTHON_OUT_DIR) --mypy_out=$(PYTHON_OUT_DIR) --proto_path=. $(PROTO_FILES) | ||
|
||
clean: | ||
# Clean up generated files | ||
rm -rf $(C_OUT_DIR) $(PYTHON_OUT_DIR) |
Oops, something went wrong.