From 40438c2f4969f4c75caccd7d051926453df62a3f Mon Sep 17 00:00:00 2001 From: Adam Shamblin Date: Mon, 22 Aug 2022 13:35:37 -0600 Subject: [PATCH] Add a README, minor changes to linux setup script --- README.md | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup_linux.sh | 6 ++-- 2 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..65466167 --- /dev/null +++ b/README.md @@ -0,0 +1,97 @@ +# Veilid + +## Introduction + +## Obtaining the source code + +```shell +git clone --recurse-submodules git@gitlab.hackers.town:veilid/veilid.git +``` + +## Dependencies + +### GNU/Linux + +Development of Veilid on GNU/Linux requires a Debian variant such as Debian +itself, Ubuntu or Mint. Pull requests to support other distributions would be +welcome! + +Development requires the Android SDK and NDK be installed. + +You may decide to use Android Studio to maintain your Android dependencies. If +so, use the dependency manager within your IDE. If you do so, you may skip to +[Run Veilid setup script](#Run Veilid setup script). + +* build-tools;30.0.3 +* ndk;22.0.7026061 +* cmake;3.22.1 + +#### Setup Dependencies using the CLI + +Otherwise, you may choose to use Android `sdkmanager`. Follow the installation +instructions for `sdkmanager` +[here](https://developer.android.com/studio/command-line/sdkmanager), then use +the command line to install the requisite package versions: + +```shell +sdkmanager --install "build-tools;30.0.3" +sdkmanager --install "ndk;22.0.7026061" +sdkmanager --install "cmake;3.22.1" +``` + +Export environment variables and add the Android SDK platform-tools directory to +your path. + +```shell +cat << EOF >> ~/.profile +export ANDROID_SDK_ROOT= +export ANDROID_NDK_HOME= +export PATH=${ANDROID_SDK_ROOT}/platform-tools" +``` + +#### Run Veilid setup script + +Now you may run the Linux setup script to check your development environment and +pull the remaining Rust dependencies: + +```shell +./setup_linux.sh +``` + +### macOS + +**TODO** + +### Windows + +**TODO** + +## Veilid Server + +In order to run the `veilid-server` locally: + +```shell +cd ./veilid-server +cargo run +``` + +In order to see what options are available: + +```shell +cargo run -- --help +``` + +## Veilid CLI + +In order to connect to your local `veilid-server`: + +```shell +cd ./veilid-cli +cargo run +``` + +Similar to `veilid-server`, you may see CLI options by typing: + +```shell +cargo run -- --help +``` diff --git a/setup_linux.sh b/setup_linux.sh index 20a225e0..d7846a26 100755 --- a/setup_linux.sh +++ b/setup_linux.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -if [ ! "$(grep -qEi 'debian|buntu|mint' /etc/*release 2>/dev/null)" ]; then +if [ "$(lsb_release -d | grep -qEi 'debian|buntu|mint')" ]; then echo Not a supported Linux exit 1 fi @@ -62,6 +62,4 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro cargo install wasm-bindgen-cli # Ensure packages are installed -sudo apt-get install libc6-dev-i386 libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386 openjdk-11-jdk llvm wabt - - +sudo apt-get install libc6-dev-i386 libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386 openjdk-11-jdk llvm wabt capnproto