Go to file
Christien Rioux e27f73fa7a Merge branch 'veilidchat-work' into 'main'
proper node info filter for fanout

See merge request veilid/veilid!92
2023-07-20 23:14:44 +00:00
.cargo wasm fixes 2022-11-29 22:51:51 -05:00
.vscode more semantics 2023-07-14 19:37:06 -04:00
doc network fixes 2023-07-19 10:07:51 -04:00
docs/guide Adds markdown version of guide 2022-10-18 12:14:14 -07:00
external update submodules 2023-07-19 14:41:10 -04:00
files Add Test CA and simple certs for testing 2021-11-22 09:02:41 -05:00
package service restart if running, instructs to start if not 2023-07-17 20:55:45 -05:00
scripts add better dht debugging 2023-06-26 21:29:02 -04:00
veilid-cli 0.1.4 2023-07-19 21:15:54 -04:00
veilid-core proper node info filter for fanout 2023-07-20 17:52:45 -04:00
veilid-flutter 0.1.4 2023-07-19 21:15:54 -04:00
veilid-python 0.1.4 2023-07-19 21:15:54 -04:00
veilid-server 0.1.4 2023-07-19 21:15:54 -04:00
veilid-tools 0.1.4 2023-07-19 21:15:54 -04:00
veilid-wasm 0.1.4 2023-07-19 21:15:54 -04:00
.bumpversion.cfg 0.1.4 2023-07-19 21:15:54 -04:00
.earthlyignore add eartly build 2022-01-09 15:17:36 -05:00
.gitignore fix crypto 2023-06-24 21:23:48 -04:00
.gitlab-ci.yml Update .gitlab-ci.yml file 2023-07-16 23:51:24 +00:00
.gitmodules fix cursive buffered backend submodule url 2023-07-04 20:59:15 -05:00
Cargo.lock 0.1.4 2023-07-19 21:15:54 -04:00
Cargo.toml version bump 2023-07-16 14:35:51 -04:00
Earthfile temp fix for Earthfile 2023-07-13 09:35:57 -04:00
install_linux_prerequisites.sh Added ability to skip install of android SDK when running prerequisites script, and skip checking android config in setup_linux.sh 2023-07-17 15:10:15 -07:00
README.md Fix: Update url of repo in README 2023-07-10 16:59:46 -05:00
RELEASING.md first version bump 2023-07-16 15:04:00 -04:00
setup_linux.sh Updated setup_macos.sh to ask if Android SDK has been installed - if it hasn't then skip those checks. 2023-07-18 15:48:03 -07:00
setup_macos.sh first version bump 2023-07-16 15:04:00 -04:00
setup_windows.bat fixes for windows 2023-05-29 17:04:28 -07:00
version_bump.sh version 2023-07-19 13:01:55 -04:00

Veilid

Introduction

Obtaining the source code

git clone --recurse-submodules git@gitlab.com: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!

Running the setup script requires:

  • Android SDK and NDK
  • Rust

You may decide to use Android Studio here to maintain your Android dependencies. If so, use the dependency manager within your IDE. If you plan on using Flutter for Veilid development, the Android Studio method is highly recommended as you may run into path problems with the 'flutter' command line without it. If you do so, you may skip to [Run Veilid setup script](#Run Veilid setup script).

  • build-tools;33.0.1
  • ndk;25.1.8937393
  • cmake;3.22.1
  • platform-tools
  • platforms;android-33

Setup Dependencies using the CLI

You can automatically install the prerequisites using this script:

./install_linux_prerequisites.sh

Otherwise, you may choose to use Android sdkmanager. Follow the installation instructions for sdkmanager here, then use the command line to install the requisite package versions:

sdkmanager --install "platform-tools"
sdkmanager --install "platforms;android-33"
sdkmanager --install "build-tools;33.0.1"
sdkmanager --install "ndk;25.1.8937393"
sdkmanager --install "cmake;3.22.1"

Export environment variables and add the Android SDK platform-tools directory to your path.

cat << EOF >> ~/.profile 
export ANDROID_SDK_ROOT=<path to sdk>
export ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/25.1.8937393
export PATH=\$PATH:$ANDROID_SDK_ROOT/platform-tools
EOF

Run Veilid setup script

Now you may run the Linux setup script to check your development environment and pull the remaining Rust dependencies:

./setup_linux.sh

Run the veilid-flutter setup script (optional)

If you are developing Flutter applications or the flutter-veilid portion, you should install Android Studio, and run the flutter setup script:

cd veilid-flutter
./setup_flutter.sh

macOS

Development of Veilid on MacOS is possible on both Intel and ARM hardware.

Development requires:

  • Android Studio
  • Xcode, preferably latest version
  • Homebrew here
  • Android SDK and NDK
  • Rust

You will need to use Android Studio here to maintain your Android dependencies. Use the SDK Manager in the IDE to install the following packages (use package details view to select version):

  • Android SDK Build Tools (33.0.1)
  • NDK (Side-by-side) (25.1.8937393)
  • Cmake (3.22.1)
  • Android SDK 33
  • Android SDK Command Line Tools (latest) (7.0/latest)

Setup command line environment

Export environment variables and add the Android SDK platform-tools directory to your path.

cat << EOF >> ~/.zshenv
export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk
export ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk/25.1.8937393
export PATH=\$PATH:$HOME/Library/Android/sdk/platform-tools
EOF

Run Veilid setup script

Now you may run the MacOS setup script to check your development environment and pull the remaining Rust dependencies:

./setup_macos.sh

Run the veilid-flutter setup script (optional)

If you are developing Flutter applications or the flutter-veilid portion, you should install Android Studio, and run the flutter setup script:

cd veilid-flutter
./setup_flutter.sh

Windows

TODO

Running the Application(s)

Veilid Server

In order to run the veilid-server locally:

cd ./veilid-server
cargo run

In order to see what options are available:

cargo run -- --help

Configuration

veilid-server has a wealth of configuration options. Further documentation on the format of the veilid-server.conf file may be found in the project /doc directory.

When running veilid-server in a Unix-like environment, the application will look for its config file under /etc/veilid-server/. If the config file is not found in this location, veilid-server will follow the XDG user directory spec and look in ~/.config/veilid-server.

When running under Windows, the veilid-server.conf file may be created at C:\Users\<user>\AppData\Roaming\Veilid\Veilid\, and when running under macOS, at /Users/<user>/Library/Application Support/org.Veilid.Veilid.

Veilid CLI

In order to connect to your local veilid-server:

cd ./veilid-cli
cargo run

Similar to veilid-server, you may see CLI options by typing:

cargo run -- --help

Building the Application

Linux Packages

Veilid server and cli can be built locally using the Earthly framework. After installing earthly on your local machine, you may use the earthly cli to initiate a build:

earthly +package-linux

This will assemble all dependencies and build .deb packages for both amd64 and arm64 platforms. Earthly, built on Docker, caches build layers, so after a longer first build, subsequent builds should be much quicker.

During development, you may want to kick off specific build steps. To see a list of the build steps configured, consult the Earthfile, or you may use the earthly cli:

earthly ls