From c11b1721c2263428ffde15d215327b388147c336 Mon Sep 17 00:00:00 2001 From: kn0wmad <39687477+kn0wmad@users.noreply.github.com> Date: Thu, 27 Jan 2022 12:34:06 -0700 Subject: [PATCH] Update CONTRIBUTING.md (#1125) * Update CONTRIBUTING.md Added missing punctuation * backend readme details * clarify embassy library wording * Update backend/README.md Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> Co-authored-by: Keagan McClelland Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> --- CONTRIBUTING.md | 6 +++--- backend/README.md | 42 +++++++++++++++++++++++++++++++++--------- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc4f2fa5a..00eb22546 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -137,10 +137,10 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/Start9 EmbassyOS is composed of the following components. Please visit the README for each component to understand the dependency requirements and installation instructions. - [`ui`](ui/README.md) (Typescript Ionic Angular) is the code that is deployed to the browser to provide the user interface for EmbassyOS. - [`backend`] (backend/README.md) (Rust) is a command line utility, daemon, and software development kit that sets up and manages services and their environments, provides the interface for the ui, manages system state, and provides utilities for packaging services for EmbassyOS. -- `patch-db` - A diff based data store that is used to synchronize data between the front and backend +- `patch-db` - A diff based data store that is used to synchronize data between the front and backend. - Notably, `patch-db` has a [client](patch-db/client/README.md) with its own dependency and installation requirements. -- `rpc-toolkit` - A library for generating an rpc server with cli bindings from Rust functions -- `system-images` - (Docker, Rust) A suite of utility Docker images that are preloaded with EmbassyOS to assist with functions relating to services (eg. configuration, backups, health checks) +- `rpc-toolkit` - A library for generating an rpc server with cli bindings from Rust functions. +- `system-images` - (Docker, Rust) A suite of utility Docker images that are preloaded with EmbassyOS to assist with functions relating to services (eg. configuration, backups, health checks). - [`setup-wizard`] (ui/README.md)- Code for the user interface that is displayed during the setup and recovery process for EmbassyOS. - [`diagnostic-ui`] (diagnostic-ui/README.md) - Code for the user interface that is displayed when something has gone wrong with starting up EmbassyOS, which provides helpful debugging tools. ### Your First Code Contribution diff --git a/backend/README.md b/backend/README.md index 8d349ae66..0554fd14c 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,11 +1,35 @@ -# backend +# EmbassyOS Backend + - Requirements: - - [Install Rust](https://rustup.rs) - - Recommended: [rust-analyzer](https://rust-analyzer.github.io/) - - [Docker](https://docs.docker.com/get-docker/) - - [Rust ARM64 Build Container](https://github.com/Start9Labs/rust-arm-builder) -- Installation: - - follow the setup instructions [here](backend/README.md) + - [Install Rust](https://rustup.rs) + - Recommended: [rust-analyzer](https://rust-analyzer.github.io/) + - [Docker](https://docs.docker.com/get-docker/) + - [Rust ARM64 Build Container](https://github.com/Start9Labs/rust-arm-builder) - Scripts (run withing the `./backend` directory) - - `build-prod.sh` - compiles a release build of the artifacts for running on ARM64 - - `build-dev.sh` - compiles a development build of the artifacts for running on ARM64 + - `build-prod.sh` - compiles a release build of the artifacts for running on ARM64 + - `build-dev.sh` - compiles a development build of the artifacts for running on ARM64 +- A Linux computer or VM + +## Structure + +The EmbassyOS backend is broken up into 4 different binaries: + +- embassyd: This is the main workhorse of EmbassyOS - any new functionality you want will likely go here +- embassy-init: This is the component responsible for allowing you to set up your device, and handles system initialization on startup +- embassy-cli: This is a CLI tool that will allow you to issue commands to embassyd and control it similarly to the UI +- embassy-sdk: This is a CLI tool that aids in building and packaging services you wish to deploy to the Embassy + +Finally there is a library `embassy` that supports all four of these tools. + +See [here](/backend/Cargo.toml) for details. + +## Building + +You can build the entire operating system image using `make` from the root of the EmbassyOS project. This will subsequently invoke the build scripts above to actually create the requisite binaries and put them onto the final operating system image. + +## Questions + +If you have questions about how various pieces of the backend system work. Open an issue and tag the following people + +- dr-bonez +- ProofOfKeags