├── .gitignore ├── docs └── philosophy.md ├── stdlib ├── v0 │ ├── docs │ │ └── release.md │ ├── README.md │ ├── observe.proto │ ├── meta.proto │ ├── schedule.proto │ └── runtime.proto └── README.md ├── hack ├── build-container │ ├── README.md │ ├── mk-build-container │ └── Dockerfile ├── README.md ├── libvirt │ ├── libvirt.xml │ └── init.sh ├── kernel │ ├── config.sh │ ├── mk-menuconfig │ └── mk-kernel ├── initramfs │ ├── utils.sh │ └── mk-initramfs └── hack.mk ├── .github └── workflows │ └── compile-and-test.yml ├── README.md ├── src ├── init │ ├── network │ │ ├── sriov.rs │ │ └── mod.rs │ ├── logging.rs │ ├── fs.rs │ ├── fileio.rs │ ├── mod.rs │ ├── power.rs │ └── system_runtime.rs ├── meta │ └── mod.rs ├── observe │ └── mod.rs ├── schedule │ └── mod.rs ├── bin │ └── main.rs ├── runtime │ └── mod.rs └── lib.rs ├── Makefile ├── Cargo.toml ├── LICENSE └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .idea* 2 | target* 3 | nova 4 | api* -------------------------------------------------------------------------------- /docs/philosophy.md: -------------------------------------------------------------------------------- 1 | # Aurae Daemon Philosophy 2 | -------------------------------------------------------------------------------- /stdlib/v0/docs/release.md: -------------------------------------------------------------------------------- 1 | # V0 Release Notes 2 | 3 | The `V0` release is an experimental and risky API. This API should never be ran in production as it is subject to change at any time. 4 | 5 | -------------------------------------------------------------------------------- /stdlib/v0/README.md: -------------------------------------------------------------------------------- 1 | # V0 Aurae Standard Library 2 | 3 | The `V0` release is an experimental and risky API. This API should never be ran in production as it is subject to change at any time. 4 | 5 | -------------------------------------------------------------------------------- /hack/build-container/README.md: -------------------------------------------------------------------------------- 1 | aurae Build Container 2 | --------------------- 3 | 4 | The Build Container is used to provide a build environment, that is consistent across different build hosts. 5 | Currently the Build Container is derived from the official [Rust 1-bullseye Docker container](https://hub.docker.com/_/rust). It is used to build the Linux kernel, the auraed rust application and the initramfs. 6 | 7 | All dynamically linked libraries, that will end up in the initramfs are sourced from this Build Container! 8 | So if there's a vulnerability in the Build Container's libraries, it will also be in the final aurae initramfs! 9 | 10 | You should care about keeping this container up to date! 11 | Rebuild it from time to time using `make build-container`! -------------------------------------------------------------------------------- /.github/workflows/compile-and-test.yml: -------------------------------------------------------------------------------- 1 | name: compile and test 2 | 3 | on: 4 | push: 5 | branches: main 6 | pull_request: 7 | branches: main 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - uses: actions/cache@v3 20 | with: 21 | path: | 22 | ~/.cargo/bin/ 23 | ~/.cargo/registry/index/ 24 | ~/.cargo/registry/cache/ 25 | ~/.cargo/git/db/ 26 | target/ 27 | key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} 28 | - name: Install protobuf-compiler 29 | run: | 30 | sudo apt-get update 31 | sudo apt-get install -y protobuf-compiler 32 | - name: Build 33 | run: cargo build --verbose 34 | - name: Run tests 35 | run: cargo test --verbose 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Aurae Daemon 2 | 3 | The Aurae Daemon (auraed) is the main daemon that powers Aurae. 4 | 5 | The Aurae Daemon runs as a gRPC server which listens over a unix domain socket by default. 6 | 7 | ``` 8 | /var/run/aurae/aurae.sock 9 | ``` 10 | 11 | ## Running Auraed 12 | 13 | Running as `/init` is currently under active development. 14 | 15 | To run auraed as a standard library server you can run the daemon alongside your current init system. 16 | 17 | ```bash 18 | sudo -E auraed 19 | ``` 20 | 21 | Additional flags are listed below. 22 | 23 | ``` 24 | USAGE: 25 | auraed [OPTIONS] 26 | 27 | OPTIONS: 28 | --ca-crt [default: /etc/aurae/pki/ca.crt] 29 | -h, --help Print help information 30 | -s, --socket [default: /var/run/aurae/aurae.sock] 31 | --server-crt [default: /etc/aurae/pki/_signed.server.crt] 32 | --server-key [default: /etc/aurae/pki/server.key] 33 | -v, --verbose 34 | -V, --version Print version information 35 | 36 | ``` 37 | 38 | ## Building from source 39 | 40 | We suggest using the [aurae](https://github.com/aurae-runtime/aurae) repository for building all parts of the project. 41 | 42 | If you intend on building this repository directly you can leverage the Makefile in this repository. 43 | 44 | ```bash 45 | make 46 | ``` 47 | 48 | or using Cargo directly 49 | 50 | ```bash 51 | cargo clippy 52 | cargo install --debug --path . 53 | ``` 54 | 55 | 56 | -------------------------------------------------------------------------------- /hack/README.md: -------------------------------------------------------------------------------- 1 | auraed VM hacking tools 2 | ======================= 3 | 4 | This directory includes scripts to run auraed as the pid 1 process within a VM. 5 | 6 | make build-container 7 | make kernel 8 | make initramfs 9 | 10 | # create `vm-br0` bridge on your machine: 11 | make network 12 | 13 | # run auraed in a VM as pid 1: 14 | make virsh-start virsh-console virsh-stop 15 | 16 | # exit VM console with Ctrl+] 17 | 18 | 19 | As auraed is dynamically compiled, we need to copy all linked libraries into the initramfs. To get a consistent result across different build machines, a build container based on Debian is used (`make build-container`) to build auraed. Also the libraries will be copied from this container into the initramfs (`make initramfs`). 20 | 21 | The Linux kernel is built from source (`make kernel`) with a custom kernel config. You can specify the used kernel version in `hack/kernel/config.sh` and modify the kernel config using `make menuconfig`. 22 | 23 | The virtual machine has a virtio-net NIC attached which will be connected to a Linux bridge on the host system. You can create and configure this bridge using `make network`. The NIC will appear as `eth0` within the VM. 24 | 25 | With the make target `virsh-start` the VM will be created and started. `virsh-console` brings you into the serial console of the VM (you can exit it with `Ctrl+]`). To stop and destroy the VM call `make virsh-stop` - you'll probably want to concatenate those commands to `make virsh-start virsh-console virsh-stop`. This will start the VM, opens the serial console and waits for you to hit `Ctrl+]` to exit the serial console and destroy the VM. -------------------------------------------------------------------------------- /hack/libvirt/libvirt.xml: -------------------------------------------------------------------------------- 1 | 2 | aurae 3 | 4 | 5 | 6 | 7 | 8 | 2048 9 | 4 10 | 11 | hvm 12 | __PWD__/target/kernel/vmlinuz-__KERNEL_VERSION__ 13 | __PWD__/target/initramfs.zst 14 | rdinit=/bin/auraed console=tty0 console=ttyS0,115200 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | /usr/bin/qemu-system-x86_64 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 47 | 48 | 49 | 50 | 51 | /dev/urandom 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/init/network/sriov.rs: -------------------------------------------------------------------------------- 1 | use std::num::ParseIntError; 2 | use std::{cmp, fs, io}; 3 | 4 | #[derive(thiserror::Error, Debug)] 5 | pub(crate) enum SriovError { 6 | #[error("Failed to get sriov capabilities of device {iface}")] 7 | GetCapabilitiesFailure { iface: String, source: io::Error }, 8 | #[error("Failed to parse sriov capabilities {capabilities}")] 9 | ParseCapabilitiesFailure { capabilities: String, source: ParseIntError }, 10 | } 11 | 12 | // Create max(limit, max possible sriov for given iface) sriov devices for the given iface 13 | #[allow(dead_code)] 14 | pub(crate) fn setup_sriov(iface: &str, limit: u16) -> Result<(), SriovError> { 15 | if limit == 0 { 16 | return Ok(()); 17 | } 18 | 19 | let sriov_totalvfs = get_sriov_capabilities(iface).map_err(|e| { 20 | SriovError::GetCapabilitiesFailure { 21 | iface: iface.to_owned(), 22 | source: e, 23 | } 24 | })?; 25 | 26 | let sriov_totalvfs = 27 | sriov_totalvfs.trim_end().parse::().map_err(|e| { 28 | SriovError::ParseCapabilitiesFailure { 29 | capabilities: sriov_totalvfs, 30 | source: e, 31 | } 32 | })?; 33 | 34 | let num = cmp::min(limit, sriov_totalvfs); 35 | 36 | fs::write( 37 | format!("/sys/class/net/{}/device/sriov_numvfs", iface), 38 | num.to_string(), 39 | ) 40 | .expect("Unable to write file"); 41 | Ok(()) 42 | } 43 | 44 | fn get_sriov_capabilities(iface: &str) -> Result { 45 | fs::read_to_string(format!( 46 | "/sys/class/net/{}/device/sriov_totalvfs", 47 | iface 48 | )) 49 | } 50 | -------------------------------------------------------------------------------- /src/meta/mod.rs: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | tonic::include_proto!("meta"); 32 | -------------------------------------------------------------------------------- /hack/kernel/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # -------------------------------------------------------------------------- # 4 | # Apache 2.0 License Copyright © 2022 The Aurae Authors # 5 | # # 6 | # +--------------------------------------------+ # 7 | # | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # 8 | # | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # 9 | # | ███████║██║ ██║██████╔╝███████║█████╗ | # 10 | # | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # 11 | # | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # 12 | # | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # 13 | # +--------------------------------------------+ # 14 | # # 15 | # Distributed Systems Runtime # 16 | # # 17 | # -------------------------------------------------------------------------- # 18 | # # 19 | # Licensed under the Apache License, Version 2.0 (the "License"); # 20 | # you may not use this file except in compliance with the License. # 21 | # You may obtain a copy of the License at # 22 | # # 23 | # http://www.apache.org/licenses/LICENSE-2.0 # 24 | # # 25 | # Unless required by applicable law or agreed to in writing, software # 26 | # distributed under the License is distributed on an "AS IS" BASIS, # 27 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 28 | # See the License for the specific language governing permissions and # 29 | # limitations under the License. # 30 | # # 31 | # -------------------------------------------------------------------------- # 32 | 33 | export KERNEL_VERSION=5.15.68 34 | export KERNEL_CONFIG="aurae-linux-${KERNEL_VERSION}.config" -------------------------------------------------------------------------------- /hack/build-container/mk-build-container: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # -------------------------------------------------------------------------- # 4 | # Apache 2.0 License Copyright © 2022 The Aurae Authors # 5 | # # 6 | # +--------------------------------------------+ # 7 | # | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # 8 | # | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # 9 | # | ███████║██║ ██║██████╔╝███████║█████╗ | # 10 | # | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # 11 | # | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # 12 | # | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # 13 | # +--------------------------------------------+ # 14 | # # 15 | # Distributed Systems Runtime # 16 | # # 17 | # -------------------------------------------------------------------------- # 18 | # # 19 | # Licensed under the Apache License, Version 2.0 (the "License"); # 20 | # you may not use this file except in compliance with the License. # 21 | # You may obtain a copy of the License at # 22 | # # 23 | # http://www.apache.org/licenses/LICENSE-2.0 # 24 | # # 25 | # Unless required by applicable law or agreed to in writing, software # 26 | # distributed under the License is distributed on an "AS IS" BASIS, # 27 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 28 | # See the License for the specific language governing permissions and # 29 | # limitations under the License. # 30 | # # 31 | # -------------------------------------------------------------------------- # 32 | 33 | docker rmi aurae-builder 34 | 35 | set -e 36 | docker build . -t aurae-builder -------------------------------------------------------------------------------- /src/init/logging.rs: -------------------------------------------------------------------------------- 1 | use log::{Level, SetLoggerError}; 2 | use simplelog::SimpleLogger; 3 | use syslog::{BasicLogger, Facility, Formatter3164}; 4 | 5 | const AURAED_SYSLOG_NAME: &str = "auraed"; 6 | 7 | #[derive(thiserror::Error, Debug)] 8 | pub(crate) enum LoggingError { 9 | #[error("Unable to connect to syslog: {0}")] 10 | SysLogConnectionFailure(SetLoggerError), 11 | #[error("Unable to setup syslog: {0}")] 12 | SysLogSetupFailure(SetLoggerError), 13 | } 14 | 15 | pub(crate) fn init(logger_level: Level) -> Result<(), LoggingError> { 16 | match std::process::id() { 17 | 1 => init_pid1_logging(logger_level), 18 | _ => init_syslog_logging(logger_level), 19 | } 20 | } 21 | 22 | fn init_syslog_logging(logger_level: Level) -> Result<(), LoggingError> { 23 | // Syslog formatter 24 | let formatter = Formatter3164 { 25 | facility: Facility::LOG_USER, 26 | hostname: None, 27 | process: AURAED_SYSLOG_NAME.into(), 28 | pid: 0, 29 | }; 30 | 31 | // Initialize the logger 32 | let logger_simple = create_logger_simple(logger_level); 33 | 34 | let logger_syslog = match syslog::unix(formatter) { 35 | Ok(log_val) => log_val, 36 | Err(e) => { 37 | panic!("Unable to setup syslog: {:?}", e); 38 | } 39 | }; 40 | 41 | multi_log::MultiLogger::init( 42 | vec![logger_simple, Box::new(BasicLogger::new(logger_syslog))], 43 | logger_level, 44 | ) 45 | .map_err(LoggingError::SysLogSetupFailure) 46 | } 47 | 48 | // To discuss here https://github.com/aurae-runtime/auraed/issues/24: 49 | // The "syslog" logger requires unix sockets. 50 | // Syslog assumes that either /dev/log or /var/run/syslog are available [1]. 51 | // We need to discuss if there is a use case to log via unix sockets, 52 | // other than fullfill the requirement of syslog crate. 53 | // For now, auraed distinguishes between pid1 system and local (dev environment) logging. 54 | // [1] https://docs.rs/syslog/latest/src/syslog/lib.rs.html#232-243 55 | fn init_pid1_logging(logger_level: Level) -> Result<(), LoggingError> { 56 | // Initialize the logger 57 | let logger_simple = create_logger_simple(logger_level); 58 | 59 | multi_log::MultiLogger::init(vec![logger_simple], logger_level) 60 | .map_err(LoggingError::SysLogConnectionFailure) 61 | } 62 | 63 | fn create_logger_simple(logger_level: Level) -> Box { 64 | SimpleLogger::new( 65 | logger_level.to_level_filter(), 66 | simplelog::Config::default(), 67 | ) 68 | } 69 | -------------------------------------------------------------------------------- /hack/build-container/Dockerfile: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------------------- # 2 | # Apache 2.0 License Copyright © 2022 The Aurae Authors # 3 | # # 4 | # +--------------------------------------------+ # 5 | # | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # 6 | # | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # 7 | # | ███████║██║ ██║██████╔╝███████║█████╗ | # 8 | # | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # 9 | # | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # 10 | # | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # 11 | # +--------------------------------------------+ # 12 | # # 13 | # Distributed Systems Runtime # 14 | # # 15 | # -------------------------------------------------------------------------- # 16 | # # 17 | # Licensed under the Apache License, Version 2.0 (the "License"); # 18 | # you may not use this file except in compliance with the License. # 19 | # You may obtain a copy of the License at # 20 | # # 21 | # http://www.apache.org/licenses/LICENSE-2.0 # 22 | # # 23 | # Unless required by applicable law or agreed to in writing, software # 24 | # distributed under the License is distributed on an "AS IS" BASIS, # 25 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 26 | # See the License for the specific language governing permissions and # 27 | # limitations under the License. # 28 | # # 29 | # -------------------------------------------------------------------------- # 30 | FROM rust:1-bullseye 31 | 32 | RUN apt-get update && apt-get upgrade -y && apt-get install -y \ 33 | flex bison bc libelf-dev \ 34 | cpio zstd \ 35 | gperf \ 36 | ninja-build \ 37 | protobuf-compiler \ 38 | libprotobuf-dev 39 | 40 | RUN rustup component add clippy 41 | RUN mkdir /aurae 42 | RUN mkdir /target 43 | WORKDIR /aurae -------------------------------------------------------------------------------- /hack/libvirt/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # -------------------------------------------------------------------------- # 4 | # Apache 2.0 License Copyright © 2022 The Aurae Authors # 5 | # # 6 | # +--------------------------------------------+ # 7 | # | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # 8 | # | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # 9 | # | ███████║██║ ██║██████╔╝███████║█████╗ | # 10 | # | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # 11 | # | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # 12 | # | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # 13 | # +--------------------------------------------+ # 14 | # # 15 | # Distributed Systems Runtime # 16 | # # 17 | # -------------------------------------------------------------------------- # 18 | # # 19 | # Licensed under the Apache License, Version 2.0 (the "License"); # 20 | # you may not use this file except in compliance with the License. # 21 | # You may obtain a copy of the License at # 22 | # # 23 | # http://www.apache.org/licenses/LICENSE-2.0 # 24 | # # 25 | # Unless required by applicable law or agreed to in writing, software # 26 | # distributed under the License is distributed on an "AS IS" BASIS, # 27 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 28 | # See the License for the specific language governing permissions and # 29 | # limitations under the License. # 30 | # # 31 | # -------------------------------------------------------------------------- # 32 | 33 | set -e 34 | 35 | thisDir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) 36 | targetDir=$(realpath "$thisDir/../../") 37 | 38 | 39 | . ${thisDir}/../../hack/kernel/config.sh 40 | cat ${thisDir}/libvirt.xml | sed "s#__PWD__#${targetDir}#" | sed "s#__KERNEL_VERSION__#${KERNEL_VERSION}#" | tee ${thisDir}/../../target/libvirt.xml 41 | -------------------------------------------------------------------------------- /src/init/fs.rs: -------------------------------------------------------------------------------- 1 | use log::{error, info}; 2 | use std::ffi::{CString, NulError}; 3 | use std::ptr; 4 | 5 | #[derive(thiserror::Error, Debug)] 6 | pub(crate) enum FsError { 7 | #[error("{source_name} cannot be converted to a CString")] 8 | InvalidSourceName { source_name: String, source: NulError }, 9 | #[error("{target_name} cannot be converted to a CString")] 10 | InvalidTargetName { target_name: String, source: NulError }, 11 | #[error("{fstype} cannot be converted to a CString")] 12 | InvalidFstype { fstype: String, source: NulError }, 13 | #[error("Failed to mount: source_name={source_name}, target_name={target_name}, fstype={fstype}")] 14 | MountFailure { source_name: String, target_name: String, fstype: String }, 15 | } 16 | 17 | pub(crate) fn mount_vfs( 18 | source_name: &str, 19 | target_name: &str, 20 | fstype: &str, 21 | ) -> Result<(), FsError> { 22 | info!("Mounting {}", target_name); 23 | 24 | // CString constructor ensures the trailing 0byte, which is required by libc::mount 25 | let src_c_str = 26 | CString::new(source_name).map_err(|e| FsError::InvalidSourceName { 27 | source_name: source_name.to_owned(), 28 | source: e, 29 | })?; 30 | 31 | let target_name_c_str = 32 | CString::new(target_name).map_err(|e| FsError::InvalidTargetName { 33 | target_name: target_name.to_owned(), 34 | source: e, 35 | })?; 36 | 37 | let ret = { 38 | #[cfg(not(target_os = "macos"))] 39 | { 40 | let fstype_c_str = CString::new(fstype).map_err(|e| { 41 | FsError::InvalidFstype { fstype: fstype.to_owned(), source: e } 42 | })?; 43 | 44 | unsafe { 45 | libc::mount( 46 | src_c_str.as_ptr(), 47 | target_name_c_str.as_ptr(), 48 | fstype_c_str.as_ptr(), 49 | 0, 50 | ptr::null(), 51 | ) 52 | } 53 | } 54 | 55 | #[cfg(target_os = "macos")] 56 | unsafe { 57 | libc::mount( 58 | src_c_str.as_ptr(), 59 | target_name_c_str.as_ptr(), 60 | 0, 61 | ptr::null_mut(), 62 | ) 63 | } 64 | }; 65 | 66 | if ret < 0 { 67 | error!("Failed to mount ({})", ret); 68 | let error = CString::new("Error: ").expect("error creating CString"); 69 | unsafe { 70 | libc::perror(error.as_ptr()); 71 | }; 72 | 73 | Err(FsError::MountFailure { 74 | source_name: source_name.to_owned(), 75 | target_name: target_name.to_owned(), 76 | fstype: fstype.to_owned(), 77 | }) 78 | } else { 79 | Ok(()) 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /stdlib/v0/observe.proto: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | syntax = "proto3"; 32 | 33 | package observe; 34 | 35 | option go_package = "github.com/aurae-runtime/client-go/pkg/stdlib/v0/observe"; 36 | 37 | import "meta.proto"; 38 | 39 | service Observe { 40 | 41 | rpc Status(StatusRequest) returns (StatusResponse) {} 42 | 43 | } 44 | 45 | message StatusRequest { 46 | meta.AuraeMeta meta = 1; 47 | } 48 | 49 | message StatusResponse { 50 | meta.AuraeMeta meta = 1; 51 | } 52 | -------------------------------------------------------------------------------- /hack/initramfs/utils.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # -------------------------------------------------------------------------- # 4 | # Apache 2.0 License Copyright © 2022 The Aurae Authors # 5 | # # 6 | # +--------------------------------------------+ # 7 | # | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # 8 | # | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # 9 | # | ███████║██║ ██║██████╔╝███████║█████╗ | # 10 | # | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # 11 | # | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # 12 | # | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # 13 | # +--------------------------------------------+ # 14 | # # 15 | # Distributed Systems Runtime # 16 | # # 17 | # -------------------------------------------------------------------------- # 18 | # # 19 | # Licensed under the Apache License, Version 2.0 (the "License"); # 20 | # you may not use this file except in compliance with the License. # 21 | # You may obtain a copy of the License at # 22 | # # 23 | # http://www.apache.org/licenses/LICENSE-2.0 # 24 | # # 25 | # Unless required by applicable law or agreed to in writing, software # 26 | # distributed under the License is distributed on an "AS IS" BASIS, # 27 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 28 | # See the License for the specific language governing permissions and # 29 | # limitations under the License. # 30 | # # 31 | # -------------------------------------------------------------------------- # 32 | 33 | copy_lib() { 34 | cp -Lr $1 `echo $1 | awk '{print substr($1,2); }'` 35 | } 36 | 37 | install_libs() { 38 | libs=$(ldd $1 \ 39 | | grep so \ 40 | | sed -e '/^[^\t]/ d' \ 41 | | sed -e 's/\t//' \ 42 | | sed -e 's/.*=..//' \ 43 | | sed -e 's/ (0.*)//' \ 44 | | sort \ 45 | | uniq -c \ 46 | | sort -n \ 47 | | awk '{$1=$1;print}' \ 48 | | cut -d' ' -f2 \ 49 | | grep "^/") 50 | 51 | for l in ${libs[@]}; do 52 | copy_lib $l 53 | done 54 | } 55 | -------------------------------------------------------------------------------- /hack/kernel/mk-menuconfig: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # -------------------------------------------------------------------------- # 4 | # Apache 2.0 License Copyright © 2022 The Aurae Authors # 5 | # # 6 | # +--------------------------------------------+ # 7 | # | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # 8 | # | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # 9 | # | ███████║██║ ██║██████╔╝███████║█████╗ | # 10 | # | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # 11 | # | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # 12 | # | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # 13 | # +--------------------------------------------+ # 14 | # # 15 | # Distributed Systems Runtime # 16 | # # 17 | # -------------------------------------------------------------------------- # 18 | # # 19 | # Licensed under the Apache License, Version 2.0 (the "License"); # 20 | # you may not use this file except in compliance with the License. # 21 | # You may obtain a copy of the License at # 22 | # # 23 | # http://www.apache.org/licenses/LICENSE-2.0 # 24 | # # 25 | # Unless required by applicable law or agreed to in writing, software # 26 | # distributed under the License is distributed on an "AS IS" BASIS, # 27 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 28 | # See the License for the specific language governing permissions and # 29 | # limitations under the License. # 30 | # # 31 | # -------------------------------------------------------------------------- # 32 | 33 | set -e 34 | 35 | workingDir=$(mktemp -d) 36 | thisDir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) 37 | 38 | function clean { 39 | rm -rf $workingDir 40 | } 41 | trap clean EXIT 42 | 43 | source config.sh 44 | 45 | pushd $workingDir 46 | 47 | echo "Downloading Linux Kernel $KERNEL_VERSION" 48 | wget -qO- --show-progress "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${KERNEL_VERSION}.tar.xz" | 49 | tar xJ 50 | cp "$thisDir/config/$KERNEL_CONFIG" linux-${KERNEL_VERSION}/.config 51 | pushd linux-${KERNEL_VERSION} 52 | make menuconfig 53 | 54 | popd # linux src 55 | 56 | cp linux-${KERNEL_VERSION}/.config "$thisDir/config/$KERNEL_CONFIG" 57 | 58 | popd # working dir -------------------------------------------------------------------------------- /src/observe/mod.rs: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | tonic::include_proto!("observe"); 32 | 33 | use crate::meta; 34 | use crate::observe::observe_server::Observe; 35 | use tonic::{Request, Response, Status}; 36 | 37 | #[derive(Debug, Default, Clone)] 38 | pub struct ObserveService {} 39 | 40 | #[tonic::async_trait] 41 | impl Observe for ObserveService { 42 | async fn status( 43 | &self, 44 | _request: Request, 45 | ) -> Result, Status> { 46 | let meta = meta::AuraeMeta { 47 | name: "UNKNOWN_NAME".to_string(), 48 | message: "UNKNOWN_MESSAGE".to_string(), 49 | }; 50 | let response = StatusResponse { meta: Some(meta) }; 51 | Ok(Response::new(response)) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /hack/initramfs/mk-initramfs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # -------------------------------------------------------------------------- # 4 | # Apache 2.0 License Copyright © 2022 The Aurae Authors # 5 | # # 6 | # +--------------------------------------------+ # 7 | # | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # 8 | # | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # 9 | # | ███████║██║ ██║██████╔╝███████║█████╗ | # 10 | # | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # 11 | # | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # 12 | # | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # 13 | # +--------------------------------------------+ # 14 | # # 15 | # Distributed Systems Runtime # 16 | # # 17 | # -------------------------------------------------------------------------- # 18 | # # 19 | # Licensed under the Apache License, Version 2.0 (the "License"); # 20 | # you may not use this file except in compliance with the License. # 21 | # You may obtain a copy of the License at # 22 | # # 23 | # http://www.apache.org/licenses/LICENSE-2.0 # 24 | # # 25 | # Unless required by applicable law or agreed to in writing, software # 26 | # distributed under the License is distributed on an "AS IS" BASIS, # 27 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 28 | # See the License for the specific language governing permissions and # 29 | # limitations under the License. # 30 | # # 31 | # -------------------------------------------------------------------------- # 32 | 33 | set -e 34 | 35 | AURAED_CONFIG=${1:-default} 36 | 37 | thisDir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) 38 | TARGET_DIR=${TARGET_DIR:-$thisDir/../../target} 39 | ROOTFS_DIR=${thisDir}/../../target/rootfs 40 | 41 | [ ! -d "${TARGET_DIR}" ] && echo "Directory: '$TARGET_DIR' does not exist." && exit 1 42 | 43 | source utils.sh 44 | source ../kernel/config.sh 45 | 46 | pushd $ROOTFS_DIR 47 | echo "Create initramfs folder structure" 48 | mkdir -pv {etc,var,lib64,lib,run,tmp} usr/{bin,lib,sbin} lib/x86_64-linux-gnu usr/lib/x86_64-linux-gnu 49 | 50 | mkdir -pv {proc,dev,sys} 51 | 52 | 53 | 54 | echo "Install libraries for aurae (copy from host)" 55 | install_libs $ROOTFS_DIR/bin/auraed 56 | 57 | echo "Create initramfs.zst" 58 | find . -print0 | cpio --create --format=newc --null | zstd -3 > "${TARGET_DIR}/initramfs.zst" 59 | 60 | popd -------------------------------------------------------------------------------- /src/init/fileio.rs: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | use std::path::Path; 32 | 33 | use anyhow::anyhow; 34 | use walkdir::WalkDir; 35 | 36 | #[allow(dead_code)] 37 | pub(crate) fn show_dir( 38 | dir: impl AsRef, 39 | recurse: bool, 40 | ) -> anyhow::Result<()> { 41 | let mut dir = WalkDir::new(dir); 42 | if !recurse { 43 | dir = dir.max_depth(0); 44 | } 45 | 46 | for entry in dir { 47 | match entry { 48 | Ok(p) => println!("{}", p.path().display()), 49 | Err(e) => { 50 | return if let Some(path) = e.path() { 51 | Err(anyhow!( 52 | "Error reading directory. Could not read path {}. Error: {}", 53 | path.display(), 54 | e 55 | )) 56 | } else { 57 | Err(anyhow!("Error reading directory. Error: {}", e)) 58 | } 59 | } 60 | } 61 | } 62 | 63 | Ok(()) 64 | } 65 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- # 2 | # Apache 2.0 License Copyright © 2022 The Aurae Authors # 3 | # # 4 | # +--------------------------------------------+ # 5 | # | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # 6 | # | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # 7 | # | ███████║██║ ██║██████╔╝███████║█████╗ | # 8 | # | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # 9 | # | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # 10 | # | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # 11 | # +--------------------------------------------+ # 12 | # # 13 | # Distributed Systems Runtime # 14 | # # 15 | # ---------------------------------------------------------------------------- # 16 | # # 17 | # Licensed under the Apache License, Version 2.0 (the "License"); # 18 | # you may not use this file except in compliance with the License. # 19 | # You may obtain a copy of the License at # 20 | # # 21 | # http://www.apache.org/licenses/LICENSE-2.0 # 22 | # # 23 | # Unless required by applicable law or agreed to in writing, software # 24 | # distributed under the License is distributed on an "AS IS" BASIS, # 25 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 26 | # See the License for the specific language governing permissions and # 27 | # limitations under the License. # 28 | # # 29 | # ---------------------------------------------------------------------------- # 30 | 31 | # Defaults 32 | default: install 33 | all: install 34 | 35 | executable ?= auraed 36 | cargo = cargo 37 | branch ?= main 38 | 39 | compile: ## Compile for the local architecture ⚙ 40 | @$(cargo) clippy 41 | @$(cargo) build 42 | 43 | install: ## Build and install (debug) 🎉 44 | @echo "Installing..." 45 | @$(cargo) clippy 46 | @$(cargo) install --debug --path . 47 | 48 | release: ## Build and install (release) 🎉 49 | @echo "Installing..." 50 | @$(cargo) clippy 51 | @$(cargo) install --path . 52 | 53 | test: ## Run the tests 54 | #@$(cargo) test # Tidy output 55 | @$(cargo) test -- --nocapture # Full output 56 | 57 | clean: ## Clean your artifacts 🧼 58 | @echo "Cleaning..." 59 | @cargo clean 60 | @rm -rvf target/* 61 | @rm -rvf $(executable) 62 | 63 | include hack/hack.mk 64 | 65 | .PHONY: help 66 | help: ## Show help messages for make targets 67 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' 68 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- # 2 | # Apache 2.0 License Copyright © 2022 The Aurae Authors # 3 | # # 4 | # +--------------------------------------------+ # 5 | # | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # 6 | # | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # 7 | # | ███████║██║ ██║██████╔╝███████║█████╗ | # 8 | # | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # 9 | # | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # 10 | # | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # 11 | # +--------------------------------------------+ # 12 | # # 13 | # Distributed Systems Runtime # 14 | # # 15 | # ---------------------------------------------------------------------------- # 16 | # # 17 | # Licensed under the Apache License, Version 2.0 (the "License"); # 18 | # you may not use this file except in compliance with the License. # 19 | # You may obtain a copy of the License at # 20 | # # 21 | # http://www.apache.org/licenses/LICENSE-2.0 # 22 | # # 23 | # Unless required by applicable law or agreed to in writing, software # 24 | # distributed under the License is distributed on an "AS IS" BASIS, # 25 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 26 | # See the License for the specific language governing permissions and # 27 | # limitations under the License. # # 28 | # # 29 | # ---------------------------------------------------------------------------- # 30 | 31 | [package] 32 | name = "auraed" 33 | version = "0.1.0" 34 | edition = "2021" 35 | authors = ["The Aurae Authors", "Kris Nóva "] 36 | 37 | [[bin]] 38 | name = "auraed" 39 | path = "src/bin/main.rs" 40 | 41 | [dependencies] 42 | clap = { version = "3.1.20", features = ["derive"] } 43 | log = "0.4.17" 44 | multi_log = "0.1.2" 45 | simplelog = "0.12.0" 46 | syslog = "6.0.1" 47 | tonic = { version = "0.8", features = ["tls"] } 48 | prost = "0.11" 49 | tokio-stream = { version = "0.1", features = ["net"] } 50 | tokio = { version = "1.0", features = ["macros", "fs", "rt-multi-thread"] } 51 | futures = "0.3.23" 52 | h2 = "0.3.13" 53 | rustls = "0.20.6" 54 | anyhow = "1.0.65" 55 | libc = "0.2" 56 | walkdir = "2" 57 | sea-orm = { version = "^0.9.0", features = [ "sqlx-sqlite", "runtime-tokio-rustls", "macros" ] } 58 | ipnetwork = "0.20.0" 59 | rtnetlink = "0.11.0" 60 | netlink-packet-route = "0.13.0" # Used for netlink_packet_route::rtnl::address::nlas definition 61 | thiserror = "1.0.37" 62 | 63 | [build-dependencies] 64 | anyhow = "1.0.65" 65 | tonic-build = "0.8" 66 | -------------------------------------------------------------------------------- /hack/kernel/mk-kernel: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # -------------------------------------------------------------------------- # 4 | # Apache 2.0 License Copyright © 2022 The Aurae Authors # 5 | # # 6 | # +--------------------------------------------+ # 7 | # | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # 8 | # | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # 9 | # | ███████║██║ ██║██████╔╝███████║█████╗ | # 10 | # | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # 11 | # | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # 12 | # | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # 13 | # +--------------------------------------------+ # 14 | # # 15 | # Distributed Systems Runtime # 16 | # # 17 | # -------------------------------------------------------------------------- # 18 | # # 19 | # Licensed under the Apache License, Version 2.0 (the "License"); # 20 | # you may not use this file except in compliance with the License. # 21 | # You may obtain a copy of the License at # 22 | # # 23 | # http://www.apache.org/licenses/LICENSE-2.0 # 24 | # # 25 | # Unless required by applicable law or agreed to in writing, software # 26 | # distributed under the License is distributed on an "AS IS" BASIS, # 27 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 28 | # See the License for the specific language governing permissions and # 29 | # limitations under the License. # 30 | # # 31 | # -------------------------------------------------------------------------- # 32 | 33 | set -e 34 | 35 | workingDir=$(mktemp -d) 36 | thisDir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) 37 | 38 | function clean { 39 | rm -rf $workingDir 40 | } 41 | trap clean EXIT 42 | 43 | source config.sh 44 | 45 | TARGET_DIR=${TARGET_DIR:-$thisDir/../../target} 46 | 47 | [ ! -d "${TARGET_DIR}" ] && echo "Directory: '$TARGET_DIR' does not exist." && exit 1 48 | 49 | [ -f "${TARGET_DIR}/kernel/vmlinuz-$KERNEL_VERSION" ] && 50 | [ -f "${TARGET_DIR}/kernel/System.map-$KERNEL_VERSION" ] && 51 | [ -f "${TARGET_DIR}/kernel/config-$KERNEL_VERSION" ] && 52 | [ -z ${REBUILD_KERNEL+x} ] && 53 | echo -e "Skip kernel build, artifacts already exist." && 54 | echo -e "\t clean kernel artifacts if you want to rebuild." && 55 | exit 0 56 | 57 | pushd $workingDir 58 | 59 | echo "Downloading Linux Kernel $KERNEL_VERSION" 60 | wget -qO- --show-progress "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${KERNEL_VERSION}.tar.xz" | 61 | tar xJ 62 | cp "$thisDir/config/$KERNEL_CONFIG" linux-${KERNEL_VERSION}/.config 63 | pushd linux-${KERNEL_VERSION} 64 | make -j`nproc` 65 | 66 | mkdir -p ${TARGET_DIR}/kernel 67 | cp -v arch/x86/boot/bzImage ${TARGET_DIR}/kernel/vmlinuz-$KERNEL_VERSION 68 | cp -v System.map ${TARGET_DIR}/kernel/System.map-$KERNEL_VERSION 69 | cp -v .config ${TARGET_DIR}/kernel/config-$KERNEL_VERSION 70 | 71 | 72 | popd # linux src 73 | popd # working dir -------------------------------------------------------------------------------- /src/init/mod.rs: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | use crate::init::fs::FsError; 32 | use crate::init::logging::LoggingError; 33 | use crate::init::system_runtime::{ 34 | Pid1SystemRuntime, PidGt1SystemRuntime, SystemRuntime, 35 | }; 36 | use log::Level; 37 | 38 | mod fileio; 39 | mod fs; 40 | mod logging; 41 | mod network; 42 | mod power; 43 | mod system_runtime; 44 | 45 | const BANNER: &str = " 46 | +--------------------------------------------+ 47 | | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | 48 | | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | 49 | | ███████║██║ ██║██████╔╝███████║█████╗ | 50 | | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | 51 | | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | 52 | | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | 53 | +--------------------------------------------+\n"; 54 | 55 | #[derive(thiserror::Error, Debug)] 56 | pub(crate) enum InitError { 57 | #[error(transparent)] 58 | Logging(#[from] LoggingError), 59 | #[error(transparent)] 60 | Fs(#[from] FsError), 61 | } 62 | 63 | pub async fn init(logger_level: Level) { 64 | let res = match std::process::id() { 65 | 0 => unreachable!( 66 | "process is running as PID 0, which should be impossible" 67 | ), 68 | 1 => Pid1SystemRuntime {}.init(logger_level), 69 | _ => PidGt1SystemRuntime {}.init(logger_level), 70 | } 71 | .await; 72 | 73 | if let Err(e) = res { 74 | panic!("Failed to initialize: {}", e) 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /hack/hack.mk: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------------------- # 2 | # Apache 2.0 License Copyright © 2022 The Aurae Authors # 3 | # # 4 | # +--------------------------------------------+ # 5 | # | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | # 6 | # | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | # 7 | # | ███████║██║ ██║██████╔╝███████║█████╗ | # 8 | # | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | # 9 | # | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | # 10 | # | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | # 11 | # +--------------------------------------------+ # 12 | # # 13 | # Distributed Systems Runtime # 14 | # # 15 | # -------------------------------------------------------------------------- # 16 | # # 17 | # Licensed under the Apache License, Version 2.0 (the "License"); # 18 | # you may not use this file except in compliance with the License. # 19 | # You may obtain a copy of the License at # 20 | # # 21 | # http://www.apache.org/licenses/LICENSE-2.0 # 22 | # # 23 | # Unless required by applicable law or agreed to in writing, software # 24 | # distributed under the License is distributed on an "AS IS" BASIS, # 25 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 26 | # See the License for the specific language governing permissions and # 27 | # limitations under the License. # 28 | # # 29 | # -------------------------------------------------------------------------- # 30 | 31 | SHELL := /bin/bash 32 | 33 | empty: 34 | 35 | build-container: 36 | cd hack/build-container && ./mk-build-container 37 | mkdir -p target 38 | touch hack/build-container 39 | 40 | container-release: 41 | docker run -it --rm -u $${UID} -v "`pwd`:/aurae/auraed" -v "`pwd`/../api:/aurae/api" aurae-builder bash -c "cd /aurae/auraed && make release" 42 | 43 | kernel: 44 | mkdir -p target/rootfs/boot 45 | docker run -it --rm -u $${UID} -v "`pwd`:/aurae" aurae-builder bash -c "cd hack/kernel && ./mk-kernel" 46 | 47 | menuconfig: 48 | docker run -it --rm -u $${UID} -v "`pwd`:/aurae" aurae-builder bash -c "cd hack/kernel && ./mk-menuconfig" 49 | 50 | initramfs: container-release 51 | mkdir -p target/rootfs/bin 52 | mkdir -p target/rootfs/etc/aurae 53 | cp target/release/auraed target/rootfs/bin/auraed 54 | cp -r ../pki target/rootfs/etc/aurae/ 55 | cd target/rootfs && rm -f init && ln -s bin/auraed init 56 | docker run -it --rm -u $${UID} -v "`pwd`:/aurae" aurae-builder bash -c "cd hack/initramfs && ./mk-initramfs" 57 | 58 | virsh-init: 59 | ./hack/libvirt/init.sh 60 | 61 | virsh-start: virsh-init 62 | virsh --connect qemu:///system create target/libvirt.xml 63 | 64 | virsh-stop: 65 | virsh --connect qemu:///system destroy aurae 66 | 67 | virsh-console: 68 | virsh --connect qemu:///system console aurae 69 | 70 | virsh-shutdown: 71 | virsh --connect qemu:///system shutdown aurae --mode acpi 72 | 73 | network: 74 | sudo brctl addbr vm-br0 75 | sudo ip link set up dev vm-br0 76 | sudo ip addr add fe80::1/64 dev vm-br0 77 | sudo ip addr add 169.254.42.1/24 dev vm-br0 -------------------------------------------------------------------------------- /stdlib/v0/meta.proto: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | syntax = "proto3"; 32 | 33 | package meta; 34 | 35 | option go_package = "github.com/aurae-runtime/client-go/pkg/stdlib/v0/meta"; 36 | 37 | /// Status represents the state of an object within Aurae. 38 | /// The status Enum has special meaning used for each value. 39 | enum Status { 40 | /// Unknown denotes a rogue status, and should only be used for emergencies or development. Generally speaking Aurae 41 | /// should never have an unknown object unless something has gone very, very wrong. 42 | STATUS_UNKNOWN = 0; 43 | /// Standby denotes an object that is healthy but not active. Something that has passed any preliminary or 44 | // prerequisite steps but is not actively executing or running. Standby is a synonym for "enabled". 45 | STATUS_STANDBY = 1; 46 | /// Active denotes an object that is currently active. The object is currently executing at the point in time the 47 | /// request was issued. 48 | STATUS_ACTIVE = 3; 49 | /// Passive is the opposite of standby. The object is registered but is disabled and has not gone through any 50 | /// preliminary or prerequisite steps. Passive is a synonym for "disabled". 51 | STATUS_PASSIVE = 4; 52 | /// Error denotes a failure, but not severity. Something has gone wrong, there will be more information elsewhere. 53 | STATUS_ERROR = 5; 54 | // Complete denotes that an action is complete and no longer active. 55 | STATUS_COMPLETE = 6; 56 | } 57 | 58 | message AuraeMeta { 59 | string name = 1; 60 | string message = 2; 61 | } 62 | 63 | 64 | 65 | message ProcessMeta { 66 | int32 pid = 1; 67 | } 68 | -------------------------------------------------------------------------------- /stdlib/v0/schedule.proto: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | syntax = "proto3"; 32 | 33 | package schedule; 34 | 35 | option go_package = "github.com/aurae-runtime/client-go/pkg/stdlib/v0/schedule"; 36 | 37 | import "runtime.proto"; 38 | import "meta.proto"; 39 | 40 | service Schedule { 41 | 42 | // ShowEnabled will return a response of everything enabled on a system 43 | rpc ShowEnabled(ShowEnabledRequest) returns (ShowEnabledResponse) {} 44 | 45 | // ShowDisabled will return a response of everything disabled on a system 46 | rpc ShowDisabled(ShowDisabledRequest) returns (ShowDisabledResponse) {} 47 | 48 | } 49 | 50 | // We break ScheduleExecutable out into its own subsystem for authz purposes 51 | service ScheduleExecutable { 52 | 53 | rpc Enable(runtime.Executable) returns (ExecutableEnableResponse) {} 54 | rpc Disable(runtime.Executable) returns (ExecutableDisableResponse) {} 55 | rpc Destroy(runtime.Executable) returns (ExecutableDestroyResponse) {} 56 | 57 | } 58 | 59 | message ShowEnabledRequest { 60 | meta.AuraeMeta meta = 1; 61 | } 62 | 63 | message ShowEnabledResponse { 64 | meta.AuraeMeta meta = 1; 65 | repeated runtime.Executable Executables = 2; 66 | } 67 | 68 | message ShowDisabledRequest { 69 | meta.AuraeMeta meta = 1; 70 | } 71 | 72 | message ShowDisabledResponse { 73 | meta.AuraeMeta meta = 1; 74 | repeated runtime.Executable Executables = 2; 75 | } 76 | 77 | message ExecutableEnableResponse { 78 | meta.AuraeMeta meta = 1; 79 | } 80 | 81 | message ExecutableDisableResponse { 82 | meta.AuraeMeta meta = 1; 83 | } 84 | 85 | message ExecutableDestroyResponse { 86 | meta.AuraeMeta meta = 1; 87 | } 88 | -------------------------------------------------------------------------------- /stdlib/v0/runtime.proto: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | syntax = "proto3"; 32 | 33 | package runtime; 34 | 35 | option go_package = "github.com/aurae-runtime/client-go/pkg/stdlib/v0/runtime"; 36 | 37 | import "meta.proto"; 38 | 39 | /// Runtime is a synchronous and immediate subsystem. 40 | // Use the Runtime subsystem to start and stop executables, containers, and instances. 41 | service Runtime { 42 | 43 | rpc Exec(Executable) returns (ExecutableStatus) {} 44 | 45 | //rpc ExecutableStop(Executable) returns (ExecutableStatus) {} 46 | 47 | //rpc ContainerStart(Container) returns (ContainerStatus) {} 48 | //rpc ContainerStop(Container) returns (ContainerStatus) {} 49 | 50 | //rpc InstanceStart(Instance) returns (InstanceStatus) {} 51 | //rpc InstanceStop(Instance) returns (InstanceStatus) {} 52 | 53 | } 54 | 55 | message Executable { 56 | meta.AuraeMeta meta = 1; 57 | 58 | /// Command resembles systemd's ExecStart. This is the shell command (with arguments) you intend to execute. 59 | string command = 3; 60 | 61 | /// Comment is an arbitrary (user defined) comment used to identify the Executable at runtime. 62 | string comment = 4; 63 | } 64 | 65 | message ExecutableStatus { 66 | meta.AuraeMeta meta = 1; 67 | meta.ProcessMeta proc = 2; 68 | meta.Status status = 3; 69 | string stdout = 4; 70 | string stderr = 5; 71 | string exit_code = 6; 72 | } 73 | 74 | message Container { 75 | meta.AuraeMeta meta = 1; 76 | string name = 2; 77 | string image = 3; 78 | } 79 | 80 | message ContainerStatus { 81 | meta.AuraeMeta meta = 1; 82 | meta.ProcessMeta proc = 2; 83 | meta.Status status = 3; 84 | } 85 | 86 | message Instance { 87 | meta.AuraeMeta meta = 1; 88 | string name = 2; 89 | string image = 3; 90 | } 91 | 92 | message InstanceStatus { 93 | meta.AuraeMeta meta = 1; 94 | meta.Status status = 2; 95 | } 96 | 97 | message InstanceMeta { 98 | meta.AuraeMeta meta = 1; 99 | } 100 | 101 | message InstanceMetaStatus { 102 | meta.AuraeMeta meta = 1; 103 | meta.Status status = 2; 104 | } 105 | -------------------------------------------------------------------------------- /stdlib/README.md: -------------------------------------------------------------------------------- 1 | # The Aurae Standard Library 2 | 3 | The Aurae Standard Library (stdlib or "the library") is a set of remote functions grouped together into logical groups called subsystems. 4 | 5 | The library leverages [protobuf](https://github.com/protocolbuffers/protobuf) as the source of truth for the types, names, and function signatures for the library. 6 | 7 | ### What is a subsystem? 8 | 9 | A subsystem is a smaller and scoped subsection of the library. Subsystems are similar to "packages" or "modules" in programming languages such as [Rust](https://github.com/rust-lang/rust/tree/master/library/core/src). Kubernetes as API groups, and Linux itself has subsystems. 10 | 11 | Each subsystem is unique. Each subsystem is liable to come with its own guarantees, and expectations. 12 | For example the runtime subsystem is adamantly a synchronous subsystem which creates an imperative experience for the client. 13 | Contrarywise, the schedule subsystem is adamantly an asynchronous subsystem which instills a declarative model for the client. 14 | 15 | In protobuf terms a subsystem is a [service](https://developers.google.com/protocol-buffers/docs/proto3#services). 16 | 17 | ### What are objects? 18 | 19 | Aurae is built on the concept of core objects that are useful to distributed systems engineers. 20 | For example, Aurae has the concept of an `Executable` object which can be passed to `runtime.StartExecutable` and `runtime.StopExecutable` functions respectively. 21 | 22 | The core objects are intended to be fundamental and composable, similar to the objects and structures found in modern programming languages. 23 | 24 | Objects are defined directly in the corresponding protobuf definition and later generated into code for various languages. 25 | 26 | In protobuf terms an object is a [message](https://developers.google.com/protocol-buffers/docs/proto3#simple). 27 | 28 | ### What are functions? 29 | 30 | A function is a discreet piece of functionality designed to execute on the "backend", or directly by an Aurae Daemon server. 31 | 32 | The library is designed to be executed procedurally and quickly. Many function calls per second is a reasonable expectation for any client. 33 | 34 | In protobuf terms a function is a [remote procedure call (RPC)](https://developers.google.com/protocol-buffers/docs/proto3#services) 35 | 36 | ### What about metadata? 37 | 38 | Similar to Kubernetes, Aurae defines some common objects which are embedded in some or all objects in the standard library. 39 | 40 | Every Aurae object must embed `meta.AuraeMeta` implying that every object in the library will have a `.name` and a `.message` field. 41 | 42 | ```proto 43 | message AuraeMeta { 44 | string name = 1; 45 | string message = 2; 46 | } 47 | ``` 48 | 49 | There are other common objects such as `meta.ProcessMeta` which is embedded in any object that has a concept of an executing runtime process. 50 | 51 | ### API Definition Convention 52 | 53 | Generally follow [this style guide](https://developers.google.com/protocol-buffers/docs/style) in the proto files. 54 | 55 | It is short, but the main points are: 56 | 57 | - Files should be named `lower_snake_case.proto` 58 | - Files should be ordered in the following manner 59 | 60 | ```proto 61 | // AURAE LICENSE HEADER 62 | 63 | syntax = "proto3"; 64 | 65 | package lower_snake_case_package_name; 66 | 67 | // imports sorted alphabetically 68 | import "path/to/dependency.proto"; 69 | import "path/to/other.proto"; 70 | 71 | // file options 72 | 73 | // everything else 74 | 75 | ``` 76 | 77 | Generally follow these rules: 78 | 79 | - Services should be named `UpperCamelCase` (aka PascalCase) 80 | - Service methods should be named `UpperCamelCase` 81 | - Messages should be named `UpperCamelCase` 82 | - Field names, including `oneof` and extension names, should be `snake_case` 83 | - `repeated` fields should have pluralized names 84 | - Enums should be named `UpperCamelCase` 85 | - Enum variants should be `SCREAMING_SNAKE_CASE` 86 | - (Suggested) The zero value enum variants should have the suffix `UNSPECIFIED` 87 | - (Suggested) Enums should NOT be nested, and their variants should be prefixed with the enum's name 88 | 89 | ```proto 90 | enum FooBar { 91 | FOO_BAR_UNSPECIFIED = 0; 92 | FOO_BAR_FIRST_VALUE = 1; 93 | FOO_BAR_SECOND_VALUE = 2; 94 | } 95 | ``` 96 | 97 | A notable exception to the public specification above is the Aurae projects preference for standardizing the objects that are used as the request and response messages. 98 | 99 | The traditional convention that is meant to reduce the likelihood of future breaking changes and ease the creation of macros for generating code: 100 | 101 | - rpc methods (e.g., `StartWidget`) should have dedicated request and response messages named `StartWidgetResponse` and `StartWidgetResponse` 102 | - objects (e.g., `Widget`) should be embedded directly into their corresponding `StartWidgetRequest`, `StopWidgetReqyest`, etc style methods. 103 | -------------------------------------------------------------------------------- /src/schedule/mod.rs: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | /* 31 | * [Runtime] is a SYNCHRONOUS subsystem. 32 | */ 33 | 34 | #![allow(dead_code)] 35 | tonic::include_proto!("schedule"); 36 | 37 | use crate::runtime::Executable; 38 | use crate::schedule::schedule_executable_server::ScheduleExecutable; 39 | use crate::{command_from_string, meta}; 40 | use tonic::{Request, Response, Status}; 41 | 42 | #[derive(Debug, Default, Clone)] 43 | pub struct ScheduleExecutableService {} 44 | 45 | #[tonic::async_trait] 46 | impl ScheduleExecutable for ScheduleExecutableService { 47 | async fn enable( 48 | &self, 49 | request: Request, 50 | ) -> Result, Status> { 51 | let r = request.into_inner(); 52 | let cmd = command_from_string(&r.command); 53 | match cmd { 54 | Ok(mut cmd) => { 55 | let output = cmd.output(); 56 | match output { 57 | Ok(_) => { 58 | let meta = meta::AuraeMeta { 59 | name: r.command, 60 | message: "-".to_string(), 61 | }; 62 | let response = 63 | ExecutableEnableResponse { meta: Some(meta) }; 64 | Ok(Response::new(response)) 65 | } 66 | Err(e) => { 67 | let meta = meta::AuraeMeta { 68 | name: "-".to_string(), 69 | message: format!("{:?}", e), 70 | }; 71 | let response = 72 | ExecutableEnableResponse { meta: Some(meta) }; 73 | Ok(Response::new(response)) 74 | } 75 | } 76 | } 77 | Err(e) => { 78 | let meta = meta::AuraeMeta { 79 | name: "-".to_string(), 80 | message: format!("{:?}", e), 81 | }; 82 | let response = ExecutableEnableResponse { meta: Some(meta) }; 83 | Ok(Response::new(response)) 84 | } 85 | } 86 | } 87 | 88 | async fn disable( 89 | &self, 90 | _request: Request, 91 | ) -> Result, Status> { 92 | todo!() 93 | } 94 | 95 | async fn destroy( 96 | &self, 97 | _request: Request, 98 | ) -> Result, Status> { 99 | todo!() 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/bin/main.rs: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | #![warn(clippy::unwrap_used)] 32 | 33 | use auraed::*; 34 | use clap::Parser; 35 | use log::*; 36 | use std::path::PathBuf; 37 | //use futures::Stream; 38 | //use std::{error::Error, io::ErrorKind, net::ToSocketAddrs, path::Path, pin::Pin, time::Duration}; 39 | //use tokio::sync::mpsc; 40 | //use tokio_stream::{wrappers::ReceiverStream, StreamExt}; 41 | //use tonic::{transport::Server, Request, Response, Status, Streaming}; 42 | 43 | const EXIT_OKAY: i32 = 0; 44 | const EXIT_ERROR: i32 = 1; 45 | 46 | #[derive(Parser, Debug)] 47 | #[clap(author, version, about, long_about = None)] 48 | struct AuraedOptions { 49 | #[clap( 50 | long, 51 | value_parser, 52 | default_value = "/etc/aurae/pki/_signed.server.crt" 53 | )] 54 | server_crt: String, 55 | 56 | #[clap(long, value_parser, default_value = "/etc/aurae/pki/server.key")] 57 | server_key: String, 58 | 59 | #[clap(long, value_parser, default_value = "/etc/aurae/pki/ca.crt")] 60 | ca_crt: String, 61 | 62 | #[clap(short, long, value_parser, default_value = auraed::AURAE_SOCK)] 63 | socket: String, 64 | 65 | #[clap(short, long)] 66 | verbose: bool, 67 | } 68 | 69 | async fn daemon() -> i32 { 70 | let options = AuraedOptions::parse(); 71 | 72 | // The logger will log to stdout and the syslog by default. 73 | // We hold the opinion that the program is either "verbose" 74 | // or it's not. 75 | // 76 | // Normal mode: Info, Warn, Error 77 | // Verbose mode: Debug, Trace, Info, Warn, Error 78 | // let logger_level = if matches.is_present("verbose") { 79 | let logger_level = if options.verbose { Level::Trace } else { Level::Info }; 80 | 81 | // Initializes Logging and prepares system if auraed is run as pid=1 82 | init::init(logger_level).await; 83 | 84 | trace!("**Logging: Verbose Mode**"); 85 | info!("Starting Aurae Daemon Runtime..."); 86 | 87 | // Load Variables 88 | //let key = matches.value_of("key").unwrap(); 89 | //let sock = matches.value_of("sock").unwrap(); 90 | 91 | let runtime = AuraedRuntime { 92 | server_crt: PathBuf::from(options.server_crt), 93 | server_key: PathBuf::from(options.server_key), 94 | ca_crt: PathBuf::from(options.ca_crt), 95 | socket: PathBuf::from(options.socket), 96 | }; 97 | 98 | let e = runtime.run().await; 99 | if e.is_err() { 100 | error!("{:?}", e); 101 | } 102 | 103 | // Return 104 | if e.is_err() { 105 | EXIT_ERROR 106 | } else { 107 | EXIT_OKAY 108 | } 109 | } 110 | 111 | #[tokio::main] 112 | async fn main() -> Result<(), Box> { 113 | let exit_code = daemon(); 114 | std::process::exit(exit_code.await); 115 | } 116 | -------------------------------------------------------------------------------- /src/init/power.rs: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | use anyhow::anyhow; 32 | use log::{info, trace}; 33 | use std::{fs::OpenOptions, io::Read, mem, path::Path, slice}; 34 | 35 | extern crate libc; 36 | 37 | #[allow(dead_code)] 38 | pub(crate) fn syscall_reboot(action: i32) { 39 | unsafe { 40 | libc::reboot(action); 41 | } 42 | } 43 | 44 | pub(crate) fn power_off() { 45 | syscall_reboot(libc::LINUX_REBOOT_CMD_POWER_OFF); 46 | } 47 | 48 | #[allow(dead_code)] 49 | pub(crate) fn reboot() { 50 | syscall_reboot(libc::LINUX_REBOOT_CMD_RESTART); 51 | } 52 | 53 | #[derive(Debug, Default, Copy, Clone)] 54 | #[repr(C, packed)] 55 | pub(crate) struct InputEvent { 56 | tv_sec: u64, 57 | tv_usec: u64, 58 | evtype: u16, 59 | code: u16, 60 | value: u32, 61 | } 62 | 63 | // see https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/input-event-codes.h#L191 64 | const KEY_POWER: u16 = 116; 65 | 66 | pub(crate) fn spawn_thread_power_button_listener( 67 | power_btn_device_path: impl AsRef, 68 | ) -> anyhow::Result<()> { 69 | let mut event_file = match OpenOptions::new() 70 | .read(true) 71 | .write(false) 72 | .open(&power_btn_device_path) 73 | { 74 | Ok(file) => file, 75 | Err(e) => { 76 | return Err(anyhow!( 77 | "Could not open power button device {}. {:?}", 78 | power_btn_device_path.as_ref().display(), 79 | e 80 | )); 81 | } 82 | }; 83 | 84 | let mut event: InputEvent = unsafe { mem::zeroed() }; 85 | let event_size = mem::size_of::(); 86 | 87 | let power_btn_device = power_btn_device_path.as_ref().to_owned(); 88 | std::thread::spawn(move || { 89 | loop { 90 | let event_slice = unsafe { 91 | slice::from_raw_parts_mut( 92 | &mut event as *mut _ as *mut u8, 93 | event_size, 94 | ) 95 | }; 96 | match event_file.read(event_slice) { 97 | Ok(result) => { 98 | trace!("Event0: {} {:?}", result, event); 99 | if event.code == KEY_POWER { 100 | // TODO: shutdown runtime 101 | // - need to send signal via a channel to runtime 102 | // - await for runtime 103 | info!("Power Button pressed - shutting down now"); 104 | power_off(); 105 | } 106 | } 107 | Err(e) => { 108 | return Err::<(), anyhow::Error>(anyhow!( 109 | "Could not parse event from {}: {:?}", 110 | power_btn_device.display(), 111 | e 112 | )); 113 | } 114 | } 115 | } 116 | }); 117 | Ok(()) 118 | } 119 | -------------------------------------------------------------------------------- /src/init/system_runtime.rs: -------------------------------------------------------------------------------- 1 | use crate::init::network::{ 2 | add_address, add_route_v6, set_link_up, show_network_info, 3 | }; 4 | use crate::init::power::spawn_thread_power_button_listener; 5 | use crate::init::{fs, logging, InitError, BANNER}; 6 | use anyhow::anyhow; 7 | use ipnetwork::{IpNetwork, Ipv6Network}; 8 | use log::{error, info, trace, Level}; 9 | use netlink_packet_route::RtnlMessage; 10 | use rtnetlink::new_connection; 11 | use rtnetlink::proto::Connection; 12 | use std::path::Path; 13 | use tonic::async_trait; 14 | 15 | const LOOPBACK_DEV: &str = "lo"; 16 | 17 | const LOOPBACK_IPV6: &str = "::1"; 18 | const LOOPBACK_IPV6_SUBNET: &str = "/128"; 19 | 20 | const LOOPBACK_IPV4: &str = "127.0.0.1"; 21 | const LOOPBACK_IPV4_SUBNET: &str = "/8"; 22 | 23 | const DEFAULT_NET_DEV: &str = "eth0"; 24 | const DEFAULT_NET_DEV_IPV6: &str = "fe80::2"; 25 | const DEFAULT_NET_DEV_IPV6_SUBNET: &str = "/64"; 26 | 27 | const POWER_BUTTON_DEVICE: &str = "/dev/input/event0"; 28 | 29 | #[async_trait] 30 | pub(crate) trait SystemRuntime { 31 | async fn init(self, logger_level: Level) -> Result<(), InitError>; 32 | } 33 | 34 | pub(crate) struct Pid1SystemRuntime; 35 | 36 | impl Pid1SystemRuntime { 37 | async fn init_network( 38 | &self, 39 | connection: Connection, 40 | handle: &rtnetlink::Handle, 41 | ) { 42 | tokio::spawn(connection); 43 | 44 | trace!("configure {}", LOOPBACK_DEV); 45 | match self.configure_loopback(handle).await { 46 | Ok(_) => { 47 | info!("Successfully configured {}", LOOPBACK_DEV); 48 | } 49 | Err(e) => { 50 | error!("Failed to setup loopback device. Error={}", e); 51 | } 52 | } 53 | 54 | trace!("configure {}", DEFAULT_NET_DEV); 55 | 56 | match self.configure_nic(handle).await { 57 | Ok(_) => { 58 | info!("Successfully configured {}", DEFAULT_NET_DEV); 59 | } 60 | Err(e) => { 61 | error!( 62 | "Failed to configure NIC {}. Error={}", 63 | DEFAULT_NET_DEV, e 64 | ); 65 | } 66 | } 67 | 68 | show_network_info(handle).await; 69 | } 70 | 71 | async fn configure_loopback( 72 | &self, 73 | handle: &rtnetlink::Handle, 74 | ) -> anyhow::Result<()> { 75 | if let Ok(ipv6) = format!("{}{}", LOOPBACK_IPV6, LOOPBACK_IPV6_SUBNET) 76 | .parse::() 77 | { 78 | if let Err(e) = add_address(LOOPBACK_DEV, ipv6, handle).await { 79 | return Err(anyhow!("Failed to add ipv6 address to loopback device {}. Error={}", LOOPBACK_DEV, e)); 80 | }; 81 | } 82 | 83 | if let Ok(ipv4) = format!("{}{}", LOOPBACK_IPV4, LOOPBACK_IPV4_SUBNET) 84 | .parse::() 85 | { 86 | if let Err(e) = add_address(LOOPBACK_DEV, ipv4, handle).await { 87 | return Err(anyhow!("Failed to add ipv4 address to loopback device {}. Error={}", LOOPBACK_DEV, e)); 88 | } 89 | }; 90 | 91 | if let Err(e) = set_link_up(handle, LOOPBACK_DEV).await { 92 | return Err(anyhow!( 93 | "Failed to set link up for device {}. Error={}", 94 | LOOPBACK_DEV, 95 | e 96 | )); 97 | } 98 | 99 | Ok(()) 100 | } 101 | 102 | // TODO: design network config struct 103 | async fn configure_nic( 104 | &self, 105 | handle: &rtnetlink::Handle, 106 | ) -> anyhow::Result<()> { 107 | if let Ok(ipv6) = 108 | format!("{}{}", DEFAULT_NET_DEV_IPV6, DEFAULT_NET_DEV_IPV6_SUBNET) 109 | .parse::() 110 | { 111 | if let Err(e) = add_address(DEFAULT_NET_DEV, ipv6, handle).await { 112 | return Err(anyhow!( 113 | "Failed to add ipv6 address to device {}. Error={}", 114 | DEFAULT_NET_DEV, 115 | e 116 | )); 117 | } 118 | 119 | if let Err(e) = set_link_up(handle, DEFAULT_NET_DEV).await { 120 | return Err(anyhow!( 121 | "Failed to set link up for device {}. Error={}", 122 | DEFAULT_NET_DEV, 123 | e 124 | )); 125 | } 126 | 127 | if let Ok(destv6) = "::/0".to_string().parse::() { 128 | if let Err(e) = 129 | add_route_v6(&destv6, DEFAULT_NET_DEV, &ipv6, handle).await 130 | { 131 | return Err(anyhow!( 132 | "Failed to add ipv6 route to device {}. Error={}", 133 | DEFAULT_NET_DEV, 134 | e 135 | )); 136 | } 137 | } 138 | }; 139 | 140 | Ok(()) 141 | } 142 | 143 | fn spawn_system_runtime_threads(&self) { 144 | // ---- MAIN DAEMON THREAD POOL ---- 145 | // TODO: https://github.com/aurae-runtime/auraed/issues/33 146 | match spawn_thread_power_button_listener(Path::new(POWER_BUTTON_DEVICE)) 147 | { 148 | Ok(_) => { 149 | info!("Spawned power button device listener"); 150 | } 151 | Err(e) => { 152 | error!( 153 | "Failed to spawn power button device listener. Error={}", 154 | e 155 | ); 156 | } 157 | } 158 | 159 | // ---- MAIN DAEMON THREAD POOL ---- 160 | } 161 | } 162 | 163 | #[async_trait] 164 | impl SystemRuntime for Pid1SystemRuntime { 165 | async fn init(self, logger_level: Level) -> Result<(), InitError> { 166 | println!("{}", BANNER); 167 | 168 | logging::init(logger_level)?; 169 | trace!("Logging started"); 170 | 171 | trace!("Configure filesystem"); 172 | fs::mount_vfs("none", "/dev", "devtmpfs")?; 173 | fs::mount_vfs("none", "/sys", "sysfs")?; 174 | fs::mount_vfs("proc", "/proc", "proc")?; 175 | 176 | trace!("configure network"); 177 | //show_dir("/sys/class/net/", false); // Show available network interfaces 178 | match new_connection() { 179 | Ok((connection, handle, ..)) => { 180 | self.init_network(connection, &handle).await; 181 | } 182 | Err(e) => { 183 | error!("Could not initialize network! Error={}", e); 184 | } 185 | }; 186 | 187 | self.spawn_system_runtime_threads(); 188 | 189 | trace!("init of auraed as pid1 done"); 190 | Ok(()) 191 | } 192 | } 193 | 194 | pub(crate) struct PidGt1SystemRuntime; 195 | 196 | #[async_trait] 197 | impl SystemRuntime for PidGt1SystemRuntime { 198 | async fn init(self, logger_level: Level) -> Result<(), InitError> { 199 | logging::init(logger_level)?; 200 | Ok(()) 201 | } 202 | } 203 | -------------------------------------------------------------------------------- /src/runtime/mod.rs: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | /* 31 | * [Runtime] is a SYNCHRONOUS subsystem. 32 | */ 33 | 34 | #![allow(dead_code)] 35 | tonic::include_proto!("runtime"); 36 | 37 | use crate::runtime::runtime_server::Runtime; 38 | use crate::{command_from_string, meta}; 39 | use tonic::{Request, Response, Status}; 40 | 41 | #[derive(Debug, Default, Clone)] 42 | pub struct RuntimeService {} 43 | 44 | #[tonic::async_trait] 45 | impl Runtime for RuntimeService { 46 | async fn exec( 47 | &self, 48 | request: Request, 49 | ) -> Result, Status> { 50 | let r = request.into_inner(); 51 | let cmd = command_from_string(&r.command); 52 | match cmd { 53 | Ok(mut cmd) => { 54 | let output = cmd.output(); 55 | match output { 56 | Ok(output) => { 57 | let meta = meta::AuraeMeta { 58 | name: r.command, 59 | message: "-".to_string(), 60 | }; 61 | let proc = meta::ProcessMeta { pid: -1 }; // todo @kris-nova get pid, we will probably want to spawn() and wait and remember the pid 62 | let status = meta::Status::Complete as i32; 63 | let response = ExecutableStatus { 64 | meta: Some(meta), 65 | proc: Some(proc), 66 | status, 67 | stdout: String::from_utf8(output.stdout).unwrap(), 68 | stderr: String::from_utf8(output.stderr).unwrap(), 69 | exit_code: output.status.to_string(), 70 | }; 71 | Ok(Response::new(response)) 72 | } 73 | Err(e) => { 74 | let meta = meta::AuraeMeta { 75 | name: "-".to_string(), 76 | message: format!("{:?}", e), 77 | }; 78 | let proc = meta::ProcessMeta { pid: -1 }; 79 | let status = meta::Status::Error as i32; 80 | let response = ExecutableStatus { 81 | meta: Some(meta), 82 | proc: Some(proc), 83 | status, 84 | stdout: "-".to_string(), 85 | stderr: "-".to_string(), 86 | exit_code: "-".to_string(), 87 | }; 88 | Ok(Response::new(response)) 89 | } 90 | } 91 | } 92 | Err(e) => { 93 | let meta = meta::AuraeMeta { 94 | name: "-".to_string(), 95 | message: format!("{:?}", e), 96 | }; 97 | let proc = meta::ProcessMeta { pid: -1 }; 98 | let status = meta::Status::Error as i32; 99 | let response = ExecutableStatus { 100 | meta: Some(meta), 101 | proc: Some(proc), 102 | status, 103 | stdout: "-".to_string(), 104 | stderr: "-".to_string(), 105 | exit_code: "-".to_string(), 106 | }; 107 | Ok(Response::new(response)) 108 | } 109 | } 110 | } 111 | 112 | // async fn executable_stop( 113 | // &self, 114 | // request: Request, 115 | // ) -> Result, Status> { 116 | // let _r = request.into_inner(); 117 | // let meta = meta::AuraeMeta { 118 | // name: "UNKNOWN_NAME".to_string(), 119 | // message: "UNKNOWN_MESSAGE".to_string(), 120 | // }; 121 | // let proc = meta::ProcessMeta { pid: -1 }; 122 | // let status = meta::Status::Unknown as i32; 123 | // let response = ExecutableStatus { 124 | // meta: Some(meta), 125 | // proc: Some(proc), 126 | // status, 127 | // stdout: "-".to_string(), 128 | // stderr: "-".to_string(), 129 | // exit_code: "-".to_string(), 130 | // }; 131 | // Ok(Response::new(response)) 132 | // } 133 | // 134 | // async fn container_start( 135 | // &self, 136 | // _request: Request, 137 | // ) -> Result, Status> { 138 | // todo!() 139 | // } 140 | // 141 | // async fn container_stop( 142 | // &self, 143 | // _request: Request, 144 | // ) -> Result, Status> { 145 | // todo!() 146 | // } 147 | // 148 | // async fn instance_start( 149 | // &self, 150 | // _request: Request, 151 | // ) -> Result, Status> { 152 | // todo!() 153 | // } 154 | // 155 | // async fn instance_stop( 156 | // &self, 157 | // _request: Request, 158 | // ) -> Result, Status> { 159 | // todo!() 160 | // } 161 | } 162 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | #![warn(clippy::unwrap_used)] 32 | 33 | use anyhow::anyhow; 34 | use anyhow::Context; 35 | use log::*; 36 | use sea_orm::ConnectOptions; 37 | use sea_orm::ConnectionTrait; 38 | use sea_orm::Database; 39 | use sea_orm::Statement; 40 | use std::borrow::Cow; 41 | use std::fs; 42 | use std::os::unix::fs::PermissionsExt; 43 | use std::path::Path; 44 | use std::path::PathBuf; 45 | use std::process::Command; 46 | use tokio::net::UnixListener; 47 | use tokio_stream::wrappers::UnixListenerStream; 48 | use tonic::transport::{Certificate, Identity, Server, ServerTlsConfig}; 49 | 50 | use crate::observe::observe_server::ObserveServer; 51 | use crate::observe::ObserveService; 52 | use crate::runtime::runtime_server::RuntimeServer; 53 | use crate::runtime::RuntimeService; 54 | use crate::schedule::schedule_executable_server::ScheduleExecutableServer; 55 | use crate::schedule::ScheduleExecutableService; 56 | 57 | pub mod init; 58 | mod meta; 59 | mod observe; 60 | mod runtime; 61 | mod schedule; 62 | 63 | pub const AURAE_SOCK: &str = "/var/run/aurae/aurae.sock"; 64 | 65 | #[derive(Debug)] 66 | pub struct AuraedRuntime { 67 | // Root CA 68 | pub ca_crt: PathBuf, 69 | 70 | pub server_crt: PathBuf, 71 | pub server_key: PathBuf, 72 | pub socket: PathBuf, 73 | } 74 | 75 | impl AuraedRuntime { 76 | pub async fn run(&self) -> Result<(), Box> { 77 | // Manage the socket permission/groups first\ 78 | let _ = fs::remove_file(&self.socket); 79 | let sock_path = Path::new(&self.socket) 80 | .parent() 81 | .ok_or("unable to find socket path")?; 82 | tokio::fs::create_dir_all(sock_path).await.with_context(|| { 83 | format!( 84 | "Failed to create directory for socket: {}", 85 | self.socket.display() 86 | ) 87 | })?; 88 | trace!("{:#?}", self); 89 | 90 | let server_crt = 91 | tokio::fs::read(&self.server_crt).await.with_context(|| { 92 | format!( 93 | "Failed to read server certificate: {}", 94 | self.server_crt.display() 95 | ) 96 | })?; 97 | let server_key = tokio::fs::read(&self.server_key).await?; 98 | let db_key = server_key.clone(); 99 | let server_identity = Identity::from_pem(server_crt, server_key); 100 | info!("Register Server SSL Identity"); 101 | 102 | let ca_crt = tokio::fs::read(&self.ca_crt).await?; 103 | let ca_crt_pem = Certificate::from_pem(ca_crt.clone()); 104 | 105 | let tls = ServerTlsConfig::new() 106 | .identity(server_identity) 107 | .client_ca_root(ca_crt_pem); 108 | 109 | info!("Validating SSL Identity and Root Certificate Authority (CA)"); 110 | 111 | let sock = UnixListener::bind(&self.socket)?; 112 | let sock_stream = UnixListenerStream::new(sock); 113 | 114 | // Run the server concurrently 115 | let handle = tokio::spawn(async { 116 | Server::builder() 117 | .tls_config(tls)? 118 | .add_service(RuntimeServer::new(RuntimeService::default())) 119 | .add_service(ObserveServer::new(ObserveService::default())) 120 | .add_service(ScheduleExecutableServer::new( 121 | ScheduleExecutableService::default(), 122 | )) 123 | .serve_with_incoming(sock_stream) 124 | .await 125 | }); 126 | 127 | trace!("Setting socket mode {} -> 766", &self.socket.display()); 128 | 129 | // We set the mode to 766 for the Unix domain socket. 130 | // This is what allows non-root users to dial the socket 131 | // and authenticate with mTLS. 132 | fs::set_permissions(&self.socket, fs::Permissions::from_mode(0o766))?; 133 | info!("User Access Socket Created: {}", self.socket.display()); 134 | 135 | // SQLite 136 | info!("Database Location: /var/lib/aurae.db"); 137 | info!("Unlocking SQLite Database with Key: {:?}", self.server_key); 138 | let mut opt = 139 | ConnectOptions::new("sqlite:/var/lib/aurae.db".to_owned()); 140 | opt.sqlx_logging(false).sqlcipher_key(Cow::from(format!( 141 | "{:?}", 142 | db_key.to_ascii_lowercase() 143 | ))); 144 | 145 | // Pragma initial connection 146 | let mut opt = ConnectOptions::new("sqlite::memory:".to_owned()); 147 | opt.sqlx_logging(false); // TODO add sqlcipher_key 148 | let db = Database::connect(opt).await?; 149 | let x = db 150 | .execute(Statement::from_string( 151 | db.get_database_backend(), 152 | "PRAGMA database_list;".to_string(), 153 | )) 154 | .await?; 155 | info!("Initializing: SQLite: {:?}", x); 156 | 157 | //runtime::hydrate(&db).await?; 158 | 159 | // Event loop 160 | handle.await??; 161 | info!("gRPC server exited successfully"); 162 | 163 | Ok(()) 164 | } 165 | } 166 | 167 | pub fn command_from_string(cmd: &str) -> Result { 168 | let mut entries = cmd.split(' '); 169 | let base = match entries.next() { 170 | Some(base) => base, 171 | None => { 172 | return Err(anyhow!("empty base command string")); 173 | } 174 | }; 175 | let mut command = Command::new(base); 176 | for ent in entries { 177 | if ent != base { 178 | command.arg(ent); 179 | } 180 | } 181 | Ok(command) 182 | } 183 | 184 | #[cfg(test)] 185 | mod tests { 186 | use super::*; 187 | 188 | #[test] 189 | fn test_socket_path() { 190 | assert_eq!(AURAE_SOCK, "/var/run/aurae/aurae.sock"); 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /src/init/network/mod.rs: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------------------- *\ 2 | * Apache 2.0 License Copyright © 2022 The Aurae Authors * 3 | * * 4 | * +--------------------------------------------+ * 5 | * | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | * 6 | * | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | * 7 | * | ███████║██║ ██║██████╔╝███████║█████╗ | * 8 | * | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | * 9 | * | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | * 10 | * | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | * 11 | * +--------------------------------------------+ * 12 | * * 13 | * Distributed Systems Runtime * 14 | * * 15 | * -------------------------------------------------------------------------- * 16 | * * 17 | * Licensed under the Apache License, Version 2.0 (the "License"); * 18 | * you may not use this file except in compliance with the License. * 19 | * You may obtain a copy of the License at * 20 | * * 21 | * http://www.apache.org/licenses/LICENSE-2.0 * 22 | * * 23 | * Unless required by applicable law or agreed to in writing, software * 24 | * distributed under the License is distributed on an "AS IS" BASIS, * 25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 26 | * See the License for the specific language governing permissions and * 27 | * limitations under the License. * 28 | * * 29 | \* -------------------------------------------------------------------------- */ 30 | 31 | use anyhow::anyhow; 32 | use futures::stream::TryStreamExt; 33 | use ipnetwork::{IpNetwork, Ipv4Network, Ipv6Network}; 34 | use log::{error, info, trace, warn}; 35 | use netlink_packet_route::LinkMessage; 36 | use std::collections::HashMap; 37 | use std::net::IpAddr; 38 | use std::str; 39 | use std::thread; 40 | use std::time::Duration; 41 | 42 | use netlink_packet_route::rtnl::link::nlas::Nla; 43 | use rtnetlink::Handle; 44 | 45 | mod sriov; 46 | 47 | pub(crate) async fn set_link_up( 48 | handle: &Handle, 49 | iface: &str, 50 | ) -> anyhow::Result<()> { 51 | let mut links = handle.link().get().match_name(iface.to_string()).execute(); 52 | 53 | if let Some(link) = links.try_next().await? { 54 | handle.link().set(link.header.index).up().execute().await? 55 | } else { 56 | return Err(anyhow!("iface '{}' not found", iface)); 57 | } 58 | 59 | // TODO: replace sleep with an await mechanism that checks if device is up (with a timeout) 60 | // TODO: https://github.com/aurae-runtime/auraed/issues/40 61 | info!("Waiting for link '{}' to become up", iface); 62 | thread::sleep(Duration::from_secs(3)); 63 | info!("Waited 3 seconds, assuming link '{}' is up", iface); 64 | 65 | Ok(()) 66 | } 67 | 68 | #[allow(dead_code)] 69 | pub(crate) async fn set_link_down( 70 | handle: &Handle, 71 | iface: &str, 72 | ) -> anyhow::Result<()> { 73 | let mut links = handle.link().get().match_name(iface.to_string()).execute(); 74 | 75 | if let Some(link) = links.try_next().await? { 76 | handle.link().set(link.header.index).down().execute().await? 77 | } else { 78 | return Err(anyhow!("iface '{}' not found", iface)); 79 | } 80 | trace!("Set link {} down", iface); 81 | Ok(()) 82 | } 83 | 84 | pub(crate) async fn add_address( 85 | iface: &str, 86 | ip: impl Into, 87 | handle: &Handle, 88 | ) -> anyhow::Result<()> { 89 | let ip = ip.into(); 90 | 91 | let mut links = handle.link().get().match_name(iface.to_string()).execute(); 92 | 93 | if let Some(link) = links.try_next().await? { 94 | handle 95 | .address() 96 | .add(link.header.index, ip.ip(), ip.prefix()) 97 | .execute() 98 | .await? 99 | } 100 | trace!("Added address to link {}", iface); 101 | Ok(()) 102 | } 103 | 104 | pub(crate) async fn get_links( 105 | handle: &Handle, 106 | ) -> anyhow::Result> { 107 | let mut result = HashMap::new(); 108 | let mut links = handle.link().get().execute(); 109 | 110 | 'outer: while let Some(msg) = links.try_next().await? { 111 | for nla in msg.nlas.into_iter() { 112 | if let Nla::IfName(name) = nla { 113 | result.insert(msg.header.index, name); 114 | continue 'outer; 115 | } 116 | } 117 | warn!("link with index {} has no name", msg.header.index); 118 | } 119 | 120 | Ok(result) 121 | } 122 | 123 | async fn get_link_msg( 124 | iface: impl Into, 125 | handle: &Handle, 126 | ) -> anyhow::Result { 127 | match handle 128 | .link() 129 | .get() 130 | .match_name(iface.into()) 131 | .execute() 132 | .try_next() 133 | .await 134 | { 135 | Ok(link_msg) => match link_msg { 136 | Some(val) => Ok(val), 137 | None => { 138 | Err(anyhow!("Could not retreive link message. Does not exist")) 139 | } 140 | }, 141 | Err(e) => Err(anyhow!("Could not retreive link message. Error={}", e)), 142 | } 143 | } 144 | 145 | async fn get_iface_idx(iface: &str, handle: &Handle) -> anyhow::Result { 146 | match get_link_msg(iface, handle).await { 147 | Ok(link_msg) => Ok(link_msg.header.index), 148 | Err(e) => Err(e), 149 | } 150 | } 151 | 152 | pub(crate) async fn add_route_v6( 153 | dest: &Ipv6Network, 154 | iface: &str, 155 | source: &Ipv6Network, 156 | handle: &Handle, 157 | ) -> anyhow::Result<()> { 158 | match get_iface_idx(iface, handle).await { 159 | Ok(iface_idx) => { 160 | handle 161 | .route() 162 | .add() 163 | .v6() 164 | .destination_prefix(dest.ip(), dest.prefix()) 165 | .output_interface(iface_idx) 166 | .pref_source(source.ip()) 167 | .execute() 168 | .await?; 169 | } 170 | Err(e) => return Err(e), 171 | } 172 | Ok(()) 173 | } 174 | 175 | #[allow(dead_code)] 176 | pub(crate) async fn add_route_v4( 177 | dest: &Ipv4Network, 178 | iface: &str, 179 | source: &Ipv4Network, 180 | handle: &Handle, 181 | ) -> anyhow::Result<()> { 182 | match get_iface_idx(iface, handle).await { 183 | Ok(iface_idx) => { 184 | handle 185 | .route() 186 | .add() 187 | .v4() 188 | .destination_prefix(dest.ip(), dest.prefix()) 189 | .output_interface(iface_idx) 190 | .pref_source(source.ip()) 191 | .execute() 192 | .await?; 193 | } 194 | Err(e) => return Err(e), 195 | } 196 | Ok(()) 197 | } 198 | 199 | pub(crate) async fn dump_addresses( 200 | handle: &Handle, 201 | iface: &str, 202 | ) -> anyhow::Result<()> { 203 | let mut links = handle.link().get().match_name(iface.to_string()).execute(); 204 | if let Some(link_msg) = links.try_next().await? { 205 | info!("{}:", iface); 206 | for nla in link_msg.nlas.into_iter() { 207 | if let Nla::IfName(name) = nla { 208 | info!("\tindex: {}", link_msg.header.index); 209 | info!("\tname: {}", name); 210 | } 211 | } 212 | 213 | let mut address_msg = handle 214 | .address() 215 | .get() 216 | .set_link_index_filter(link_msg.header.index) 217 | .execute(); 218 | 219 | while let Some(msg) = address_msg.try_next().await? { 220 | for nla_address in msg.nlas.into_iter() { 221 | if let netlink_packet_route::address::Nla::Address(addr) = 222 | nla_address 223 | { 224 | let ip_addr = addr.try_into() 225 | .map(|ip: [u8; 4]| Some(IpAddr::from(ip))) 226 | .unwrap_or_else(|addr| { 227 | addr.try_into() 228 | .map(|ip: [u8; 16]| Some(IpAddr::from(ip))) 229 | .unwrap_or_else(|addr| { 230 | warn!("Could not Convert vec: {:?} to ipv4 or ipv6", addr); 231 | None 232 | }) 233 | }); 234 | 235 | match &ip_addr { 236 | Some(IpAddr::V4(ip_addr)) => { 237 | info!("\t ipv4: {}", ip_addr); 238 | } 239 | Some(IpAddr::V6(ip_addr)) => { 240 | info!("\t ipv6: {}", ip_addr); 241 | } 242 | None => {} 243 | } 244 | } 245 | } 246 | } 247 | Ok(()) 248 | } else { 249 | Err(anyhow!("link {} not found", iface)) 250 | } 251 | } 252 | 253 | pub(crate) async fn show_network_info(handle: &Handle) { 254 | info!("=== Network Interfaces ==="); 255 | 256 | info!("Addresses:"); 257 | let links_result = get_links(handle).await; 258 | 259 | match links_result { 260 | Ok(links) => { 261 | for (_, iface) in links { 262 | if let Err(e) = dump_addresses(handle, &iface).await { 263 | error!( 264 | "Could not dump addresses for iface {}. Error={}", 265 | iface, e 266 | ); 267 | }; 268 | } 269 | } 270 | Err(e) => { 271 | error!("{:?}", e); 272 | } 273 | } 274 | info!("=========================="); 275 | } 276 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "Inflector" 7 | version = "0.11.4" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" 10 | 11 | [[package]] 12 | name = "ahash" 13 | version = "0.7.6" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 16 | dependencies = [ 17 | "getrandom", 18 | "once_cell", 19 | "version_check", 20 | ] 21 | 22 | [[package]] 23 | name = "aliasable" 24 | version = "0.1.3" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" 27 | 28 | [[package]] 29 | name = "android_system_properties" 30 | version = "0.1.5" 31 | source = "registry+https://github.com/rust-lang/crates.io-index" 32 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 33 | dependencies = [ 34 | "libc", 35 | ] 36 | 37 | [[package]] 38 | name = "anyhow" 39 | version = "1.0.65" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" 42 | 43 | [[package]] 44 | name = "arrayvec" 45 | version = "0.7.2" 46 | source = "registry+https://github.com/rust-lang/crates.io-index" 47 | checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" 48 | 49 | [[package]] 50 | name = "async-stream" 51 | version = "0.3.3" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" 54 | dependencies = [ 55 | "async-stream-impl", 56 | "futures-core", 57 | ] 58 | 59 | [[package]] 60 | name = "async-stream-impl" 61 | version = "0.3.3" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" 64 | dependencies = [ 65 | "proc-macro2", 66 | "quote", 67 | "syn", 68 | ] 69 | 70 | [[package]] 71 | name = "async-trait" 72 | version = "0.1.57" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" 75 | dependencies = [ 76 | "proc-macro2", 77 | "quote", 78 | "syn", 79 | ] 80 | 81 | [[package]] 82 | name = "atoi" 83 | version = "1.0.0" 84 | source = "registry+https://github.com/rust-lang/crates.io-index" 85 | checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" 86 | dependencies = [ 87 | "num-traits", 88 | ] 89 | 90 | [[package]] 91 | name = "atty" 92 | version = "0.2.14" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 95 | dependencies = [ 96 | "hermit-abi", 97 | "libc", 98 | "winapi", 99 | ] 100 | 101 | [[package]] 102 | name = "auraed" 103 | version = "0.1.0" 104 | dependencies = [ 105 | "anyhow", 106 | "clap", 107 | "futures", 108 | "h2", 109 | "ipnetwork", 110 | "libc", 111 | "log", 112 | "multi_log", 113 | "netlink-packet-route", 114 | "prost", 115 | "rtnetlink", 116 | "rustls", 117 | "sea-orm", 118 | "simplelog", 119 | "syslog", 120 | "thiserror", 121 | "tokio", 122 | "tokio-stream", 123 | "tonic", 124 | "tonic-build", 125 | "walkdir", 126 | ] 127 | 128 | [[package]] 129 | name = "autocfg" 130 | version = "1.1.0" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 133 | 134 | [[package]] 135 | name = "axum" 136 | version = "0.5.15" 137 | source = "registry+https://github.com/rust-lang/crates.io-index" 138 | checksum = "9de18bc5f2e9df8f52da03856bf40e29b747de5a84e43aefff90e3dc4a21529b" 139 | dependencies = [ 140 | "async-trait", 141 | "axum-core", 142 | "bitflags", 143 | "bytes", 144 | "futures-util", 145 | "http", 146 | "http-body", 147 | "hyper", 148 | "itoa", 149 | "matchit", 150 | "memchr", 151 | "mime", 152 | "percent-encoding", 153 | "pin-project-lite", 154 | "serde", 155 | "sync_wrapper", 156 | "tokio", 157 | "tower", 158 | "tower-http", 159 | "tower-layer", 160 | "tower-service", 161 | ] 162 | 163 | [[package]] 164 | name = "axum-core" 165 | version = "0.2.8" 166 | source = "registry+https://github.com/rust-lang/crates.io-index" 167 | checksum = "d9f0c0a60006f2a293d82d571f635042a72edf927539b7685bd62d361963839b" 168 | dependencies = [ 169 | "async-trait", 170 | "bytes", 171 | "futures-util", 172 | "http", 173 | "http-body", 174 | "mime", 175 | "tower-layer", 176 | "tower-service", 177 | ] 178 | 179 | [[package]] 180 | name = "bae" 181 | version = "0.1.7" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "33b8de67cc41132507eeece2584804efcb15f85ba516e34c944b7667f480397a" 184 | dependencies = [ 185 | "heck 0.3.3", 186 | "proc-macro-error", 187 | "proc-macro2", 188 | "quote", 189 | "syn", 190 | ] 191 | 192 | [[package]] 193 | name = "base64" 194 | version = "0.13.0" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 197 | 198 | [[package]] 199 | name = "bitflags" 200 | version = "1.3.2" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 203 | 204 | [[package]] 205 | name = "block-buffer" 206 | version = "0.10.3" 207 | source = "registry+https://github.com/rust-lang/crates.io-index" 208 | checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" 209 | dependencies = [ 210 | "generic-array", 211 | ] 212 | 213 | [[package]] 214 | name = "bumpalo" 215 | version = "3.11.0" 216 | source = "registry+https://github.com/rust-lang/crates.io-index" 217 | checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" 218 | 219 | [[package]] 220 | name = "byteorder" 221 | version = "1.4.3" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 224 | 225 | [[package]] 226 | name = "bytes" 227 | version = "1.2.1" 228 | source = "registry+https://github.com/rust-lang/crates.io-index" 229 | checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" 230 | 231 | [[package]] 232 | name = "cc" 233 | version = "1.0.73" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 236 | 237 | [[package]] 238 | name = "cfg-if" 239 | version = "1.0.0" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 242 | 243 | [[package]] 244 | name = "chrono" 245 | version = "0.4.22" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" 248 | dependencies = [ 249 | "iana-time-zone", 250 | "num-integer", 251 | "num-traits", 252 | "serde", 253 | "winapi", 254 | ] 255 | 256 | [[package]] 257 | name = "clap" 258 | version = "3.2.20" 259 | source = "registry+https://github.com/rust-lang/crates.io-index" 260 | checksum = "23b71c3ce99b7611011217b366d923f1d0a7e07a92bb2dbf1e84508c673ca3bd" 261 | dependencies = [ 262 | "atty", 263 | "bitflags", 264 | "clap_derive", 265 | "clap_lex", 266 | "indexmap", 267 | "once_cell", 268 | "strsim", 269 | "termcolor", 270 | "textwrap", 271 | ] 272 | 273 | [[package]] 274 | name = "clap_derive" 275 | version = "3.2.18" 276 | source = "registry+https://github.com/rust-lang/crates.io-index" 277 | checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" 278 | dependencies = [ 279 | "heck 0.4.0", 280 | "proc-macro-error", 281 | "proc-macro2", 282 | "quote", 283 | "syn", 284 | ] 285 | 286 | [[package]] 287 | name = "clap_lex" 288 | version = "0.2.4" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" 291 | dependencies = [ 292 | "os_str_bytes", 293 | ] 294 | 295 | [[package]] 296 | name = "codespan-reporting" 297 | version = "0.11.1" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 300 | dependencies = [ 301 | "termcolor", 302 | "unicode-width", 303 | ] 304 | 305 | [[package]] 306 | name = "core-foundation-sys" 307 | version = "0.8.3" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 310 | 311 | [[package]] 312 | name = "cpufeatures" 313 | version = "0.2.5" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" 316 | dependencies = [ 317 | "libc", 318 | ] 319 | 320 | [[package]] 321 | name = "crc" 322 | version = "3.0.0" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" 325 | dependencies = [ 326 | "crc-catalog", 327 | ] 328 | 329 | [[package]] 330 | name = "crc-catalog" 331 | version = "2.1.0" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" 334 | 335 | [[package]] 336 | name = "crossbeam-queue" 337 | version = "0.3.6" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "1cd42583b04998a5363558e5f9291ee5a5ff6b49944332103f251e7479a82aa7" 340 | dependencies = [ 341 | "cfg-if", 342 | "crossbeam-utils", 343 | ] 344 | 345 | [[package]] 346 | name = "crossbeam-utils" 347 | version = "0.8.12" 348 | source = "registry+https://github.com/rust-lang/crates.io-index" 349 | checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" 350 | dependencies = [ 351 | "cfg-if", 352 | ] 353 | 354 | [[package]] 355 | name = "crypto-common" 356 | version = "0.1.6" 357 | source = "registry+https://github.com/rust-lang/crates.io-index" 358 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 359 | dependencies = [ 360 | "generic-array", 361 | "typenum", 362 | ] 363 | 364 | [[package]] 365 | name = "cxx" 366 | version = "1.0.79" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "3f83d0ebf42c6eafb8d7c52f7e5f2d3003b89c7aa4fd2b79229209459a849af8" 369 | dependencies = [ 370 | "cc", 371 | "cxxbridge-flags", 372 | "cxxbridge-macro", 373 | "link-cplusplus", 374 | ] 375 | 376 | [[package]] 377 | name = "cxx-build" 378 | version = "1.0.79" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "07d050484b55975889284352b0ffc2ecbda25c0c55978017c132b29ba0818a86" 381 | dependencies = [ 382 | "cc", 383 | "codespan-reporting", 384 | "once_cell", 385 | "proc-macro2", 386 | "quote", 387 | "scratch", 388 | "syn", 389 | ] 390 | 391 | [[package]] 392 | name = "cxxbridge-flags" 393 | version = "1.0.79" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "99d2199b00553eda8012dfec8d3b1c75fce747cf27c169a270b3b99e3448ab78" 396 | 397 | [[package]] 398 | name = "cxxbridge-macro" 399 | version = "1.0.79" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | checksum = "dcb67a6de1f602736dd7eaead0080cf3435df806c61b24b13328db128c58868f" 402 | dependencies = [ 403 | "proc-macro2", 404 | "quote", 405 | "syn", 406 | ] 407 | 408 | [[package]] 409 | name = "digest" 410 | version = "0.10.5" 411 | source = "registry+https://github.com/rust-lang/crates.io-index" 412 | checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" 413 | dependencies = [ 414 | "block-buffer", 415 | "crypto-common", 416 | "subtle", 417 | ] 418 | 419 | [[package]] 420 | name = "dirs" 421 | version = "4.0.0" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" 424 | dependencies = [ 425 | "dirs-sys", 426 | ] 427 | 428 | [[package]] 429 | name = "dirs-sys" 430 | version = "0.3.7" 431 | source = "registry+https://github.com/rust-lang/crates.io-index" 432 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 433 | dependencies = [ 434 | "libc", 435 | "redox_users", 436 | "winapi", 437 | ] 438 | 439 | [[package]] 440 | name = "dotenvy" 441 | version = "0.15.5" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | checksum = "ed9155c8f4dc55c7470ae9da3f63c6785245093b3f6aeb0f5bf2e968efbba314" 444 | dependencies = [ 445 | "dirs", 446 | ] 447 | 448 | [[package]] 449 | name = "either" 450 | version = "1.7.0" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" 453 | 454 | [[package]] 455 | name = "error-chain" 456 | version = "0.12.4" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" 459 | dependencies = [ 460 | "version_check", 461 | ] 462 | 463 | [[package]] 464 | name = "event-listener" 465 | version = "2.5.3" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 468 | 469 | [[package]] 470 | name = "fallible-iterator" 471 | version = "0.2.0" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" 474 | 475 | [[package]] 476 | name = "fastrand" 477 | version = "1.8.0" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" 480 | dependencies = [ 481 | "instant", 482 | ] 483 | 484 | [[package]] 485 | name = "fixedbitset" 486 | version = "0.4.2" 487 | source = "registry+https://github.com/rust-lang/crates.io-index" 488 | checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" 489 | 490 | [[package]] 491 | name = "flume" 492 | version = "0.10.14" 493 | source = "registry+https://github.com/rust-lang/crates.io-index" 494 | checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" 495 | dependencies = [ 496 | "futures-core", 497 | "futures-sink", 498 | "pin-project", 499 | "spin 0.9.4", 500 | ] 501 | 502 | [[package]] 503 | name = "fnv" 504 | version = "1.0.7" 505 | source = "registry+https://github.com/rust-lang/crates.io-index" 506 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 507 | 508 | [[package]] 509 | name = "form_urlencoded" 510 | version = "1.0.1" 511 | source = "registry+https://github.com/rust-lang/crates.io-index" 512 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 513 | dependencies = [ 514 | "matches", 515 | "percent-encoding", 516 | ] 517 | 518 | [[package]] 519 | name = "futures" 520 | version = "0.3.23" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | checksum = "ab30e97ab6aacfe635fad58f22c2bb06c8b685f7421eb1e064a729e2a5f481fa" 523 | dependencies = [ 524 | "futures-channel", 525 | "futures-core", 526 | "futures-executor", 527 | "futures-io", 528 | "futures-sink", 529 | "futures-task", 530 | "futures-util", 531 | ] 532 | 533 | [[package]] 534 | name = "futures-channel" 535 | version = "0.3.23" 536 | source = "registry+https://github.com/rust-lang/crates.io-index" 537 | checksum = "2bfc52cbddcfd745bf1740338492bb0bd83d76c67b445f91c5fb29fae29ecaa1" 538 | dependencies = [ 539 | "futures-core", 540 | "futures-sink", 541 | ] 542 | 543 | [[package]] 544 | name = "futures-core" 545 | version = "0.3.23" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | checksum = "d2acedae88d38235936c3922476b10fced7b2b68136f5e3c03c2d5be348a1115" 548 | 549 | [[package]] 550 | name = "futures-executor" 551 | version = "0.3.23" 552 | source = "registry+https://github.com/rust-lang/crates.io-index" 553 | checksum = "1d11aa21b5b587a64682c0094c2bdd4df0076c5324961a40cc3abd7f37930528" 554 | dependencies = [ 555 | "futures-core", 556 | "futures-task", 557 | "futures-util", 558 | ] 559 | 560 | [[package]] 561 | name = "futures-intrusive" 562 | version = "0.4.0" 563 | source = "registry+https://github.com/rust-lang/crates.io-index" 564 | checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e" 565 | dependencies = [ 566 | "futures-core", 567 | "lock_api", 568 | "parking_lot", 569 | ] 570 | 571 | [[package]] 572 | name = "futures-io" 573 | version = "0.3.23" 574 | source = "registry+https://github.com/rust-lang/crates.io-index" 575 | checksum = "93a66fc6d035a26a3ae255a6d2bca35eda63ae4c5512bef54449113f7a1228e5" 576 | 577 | [[package]] 578 | name = "futures-macro" 579 | version = "0.3.23" 580 | source = "registry+https://github.com/rust-lang/crates.io-index" 581 | checksum = "0db9cce532b0eae2ccf2766ab246f114b56b9cf6d445e00c2549fbc100ca045d" 582 | dependencies = [ 583 | "proc-macro2", 584 | "quote", 585 | "syn", 586 | ] 587 | 588 | [[package]] 589 | name = "futures-sink" 590 | version = "0.3.23" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | checksum = "ca0bae1fe9752cf7fd9b0064c674ae63f97b37bc714d745cbde0afb7ec4e6765" 593 | 594 | [[package]] 595 | name = "futures-task" 596 | version = "0.3.23" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "842fc63b931f4056a24d59de13fb1272134ce261816e063e634ad0c15cdc5306" 599 | 600 | [[package]] 601 | name = "futures-util" 602 | version = "0.3.23" 603 | source = "registry+https://github.com/rust-lang/crates.io-index" 604 | checksum = "f0828a5471e340229c11c77ca80017937ce3c58cb788a17e5f1c2d5c485a9577" 605 | dependencies = [ 606 | "futures-channel", 607 | "futures-core", 608 | "futures-io", 609 | "futures-macro", 610 | "futures-sink", 611 | "futures-task", 612 | "memchr", 613 | "pin-project-lite", 614 | "pin-utils", 615 | "slab", 616 | ] 617 | 618 | [[package]] 619 | name = "generic-array" 620 | version = "0.14.6" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" 623 | dependencies = [ 624 | "typenum", 625 | "version_check", 626 | ] 627 | 628 | [[package]] 629 | name = "getrandom" 630 | version = "0.2.7" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" 633 | dependencies = [ 634 | "cfg-if", 635 | "libc", 636 | "wasi", 637 | ] 638 | 639 | [[package]] 640 | name = "h2" 641 | version = "0.3.13" 642 | source = "registry+https://github.com/rust-lang/crates.io-index" 643 | checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" 644 | dependencies = [ 645 | "bytes", 646 | "fnv", 647 | "futures-core", 648 | "futures-sink", 649 | "futures-util", 650 | "http", 651 | "indexmap", 652 | "slab", 653 | "tokio", 654 | "tokio-util", 655 | "tracing", 656 | ] 657 | 658 | [[package]] 659 | name = "hashbrown" 660 | version = "0.12.3" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 663 | dependencies = [ 664 | "ahash", 665 | ] 666 | 667 | [[package]] 668 | name = "hashlink" 669 | version = "0.8.1" 670 | source = "registry+https://github.com/rust-lang/crates.io-index" 671 | checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa" 672 | dependencies = [ 673 | "hashbrown", 674 | ] 675 | 676 | [[package]] 677 | name = "heck" 678 | version = "0.3.3" 679 | source = "registry+https://github.com/rust-lang/crates.io-index" 680 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 681 | dependencies = [ 682 | "unicode-segmentation", 683 | ] 684 | 685 | [[package]] 686 | name = "heck" 687 | version = "0.4.0" 688 | source = "registry+https://github.com/rust-lang/crates.io-index" 689 | checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" 690 | dependencies = [ 691 | "unicode-segmentation", 692 | ] 693 | 694 | [[package]] 695 | name = "hermit-abi" 696 | version = "0.1.19" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 699 | dependencies = [ 700 | "libc", 701 | ] 702 | 703 | [[package]] 704 | name = "hex" 705 | version = "0.4.3" 706 | source = "registry+https://github.com/rust-lang/crates.io-index" 707 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 708 | 709 | [[package]] 710 | name = "hmac" 711 | version = "0.12.1" 712 | source = "registry+https://github.com/rust-lang/crates.io-index" 713 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 714 | dependencies = [ 715 | "digest", 716 | ] 717 | 718 | [[package]] 719 | name = "hostname" 720 | version = "0.3.1" 721 | source = "registry+https://github.com/rust-lang/crates.io-index" 722 | checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" 723 | dependencies = [ 724 | "libc", 725 | "match_cfg", 726 | "winapi", 727 | ] 728 | 729 | [[package]] 730 | name = "http" 731 | version = "0.2.8" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" 734 | dependencies = [ 735 | "bytes", 736 | "fnv", 737 | "itoa", 738 | ] 739 | 740 | [[package]] 741 | name = "http-body" 742 | version = "0.4.5" 743 | source = "registry+https://github.com/rust-lang/crates.io-index" 744 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 745 | dependencies = [ 746 | "bytes", 747 | "http", 748 | "pin-project-lite", 749 | ] 750 | 751 | [[package]] 752 | name = "http-range-header" 753 | version = "0.3.0" 754 | source = "registry+https://github.com/rust-lang/crates.io-index" 755 | checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" 756 | 757 | [[package]] 758 | name = "httparse" 759 | version = "1.7.1" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" 762 | 763 | [[package]] 764 | name = "httpdate" 765 | version = "1.0.2" 766 | source = "registry+https://github.com/rust-lang/crates.io-index" 767 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 768 | 769 | [[package]] 770 | name = "hyper" 771 | version = "0.14.20" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" 774 | dependencies = [ 775 | "bytes", 776 | "futures-channel", 777 | "futures-core", 778 | "futures-util", 779 | "h2", 780 | "http", 781 | "http-body", 782 | "httparse", 783 | "httpdate", 784 | "itoa", 785 | "pin-project-lite", 786 | "socket2", 787 | "tokio", 788 | "tower-service", 789 | "tracing", 790 | "want", 791 | ] 792 | 793 | [[package]] 794 | name = "hyper-timeout" 795 | version = "0.4.1" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" 798 | dependencies = [ 799 | "hyper", 800 | "pin-project-lite", 801 | "tokio", 802 | "tokio-io-timeout", 803 | ] 804 | 805 | [[package]] 806 | name = "iana-time-zone" 807 | version = "0.1.51" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | checksum = "f5a6ef98976b22b3b7f2f3a806f858cb862044cfa66805aa3ad84cb3d3b785ed" 810 | dependencies = [ 811 | "android_system_properties", 812 | "core-foundation-sys", 813 | "iana-time-zone-haiku", 814 | "js-sys", 815 | "wasm-bindgen", 816 | "winapi", 817 | ] 818 | 819 | [[package]] 820 | name = "iana-time-zone-haiku" 821 | version = "0.1.1" 822 | source = "registry+https://github.com/rust-lang/crates.io-index" 823 | checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" 824 | dependencies = [ 825 | "cxx", 826 | "cxx-build", 827 | ] 828 | 829 | [[package]] 830 | name = "idna" 831 | version = "0.2.3" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" 834 | dependencies = [ 835 | "matches", 836 | "unicode-bidi", 837 | "unicode-normalization", 838 | ] 839 | 840 | [[package]] 841 | name = "indexmap" 842 | version = "1.9.1" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" 845 | dependencies = [ 846 | "autocfg", 847 | "hashbrown", 848 | ] 849 | 850 | [[package]] 851 | name = "instant" 852 | version = "0.1.12" 853 | source = "registry+https://github.com/rust-lang/crates.io-index" 854 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 855 | dependencies = [ 856 | "cfg-if", 857 | ] 858 | 859 | [[package]] 860 | name = "ipnetwork" 861 | version = "0.20.0" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "bf466541e9d546596ee94f9f69590f89473455f88372423e0008fc1a7daf100e" 864 | dependencies = [ 865 | "serde", 866 | ] 867 | 868 | [[package]] 869 | name = "itertools" 870 | version = "0.10.3" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" 873 | dependencies = [ 874 | "either", 875 | ] 876 | 877 | [[package]] 878 | name = "itoa" 879 | version = "1.0.3" 880 | source = "registry+https://github.com/rust-lang/crates.io-index" 881 | checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" 882 | 883 | [[package]] 884 | name = "js-sys" 885 | version = "0.3.59" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" 888 | dependencies = [ 889 | "wasm-bindgen", 890 | ] 891 | 892 | [[package]] 893 | name = "lazy_static" 894 | version = "1.4.0" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 897 | 898 | [[package]] 899 | name = "libc" 900 | version = "0.2.131" 901 | source = "registry+https://github.com/rust-lang/crates.io-index" 902 | checksum = "04c3b4822ccebfa39c02fc03d1534441b22ead323fa0f48bb7ddd8e6ba076a40" 903 | 904 | [[package]] 905 | name = "libsqlite3-sys" 906 | version = "0.24.2" 907 | source = "registry+https://github.com/rust-lang/crates.io-index" 908 | checksum = "898745e570c7d0453cc1fbc4a701eb6c662ed54e8fec8b7d14be137ebeeb9d14" 909 | dependencies = [ 910 | "cc", 911 | "pkg-config", 912 | "vcpkg", 913 | ] 914 | 915 | [[package]] 916 | name = "link-cplusplus" 917 | version = "1.0.7" 918 | source = "registry+https://github.com/rust-lang/crates.io-index" 919 | checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" 920 | dependencies = [ 921 | "cc", 922 | ] 923 | 924 | [[package]] 925 | name = "lock_api" 926 | version = "0.4.9" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 929 | dependencies = [ 930 | "autocfg", 931 | "scopeguard", 932 | ] 933 | 934 | [[package]] 935 | name = "log" 936 | version = "0.4.17" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 939 | dependencies = [ 940 | "cfg-if", 941 | ] 942 | 943 | [[package]] 944 | name = "match_cfg" 945 | version = "0.1.0" 946 | source = "registry+https://github.com/rust-lang/crates.io-index" 947 | checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" 948 | 949 | [[package]] 950 | name = "matches" 951 | version = "0.1.9" 952 | source = "registry+https://github.com/rust-lang/crates.io-index" 953 | checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" 954 | 955 | [[package]] 956 | name = "matchit" 957 | version = "0.5.0" 958 | source = "registry+https://github.com/rust-lang/crates.io-index" 959 | checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" 960 | 961 | [[package]] 962 | name = "md-5" 963 | version = "0.10.5" 964 | source = "registry+https://github.com/rust-lang/crates.io-index" 965 | checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" 966 | dependencies = [ 967 | "digest", 968 | ] 969 | 970 | [[package]] 971 | name = "memchr" 972 | version = "2.5.0" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 975 | 976 | [[package]] 977 | name = "mime" 978 | version = "0.3.16" 979 | source = "registry+https://github.com/rust-lang/crates.io-index" 980 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 981 | 982 | [[package]] 983 | name = "minimal-lexical" 984 | version = "0.2.1" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 987 | 988 | [[package]] 989 | name = "mio" 990 | version = "0.8.4" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" 993 | dependencies = [ 994 | "libc", 995 | "log", 996 | "wasi", 997 | "windows-sys", 998 | ] 999 | 1000 | [[package]] 1001 | name = "multi_log" 1002 | version = "0.1.2" 1003 | source = "registry+https://github.com/rust-lang/crates.io-index" 1004 | checksum = "ad56bb3c7c7c15b4e25de86c9123e886e5f80a0c03ace219b453b081c2bf20d7" 1005 | dependencies = [ 1006 | "log", 1007 | ] 1008 | 1009 | [[package]] 1010 | name = "multimap" 1011 | version = "0.8.3" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" 1014 | 1015 | [[package]] 1016 | name = "netlink-packet-core" 1017 | version = "0.4.2" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | checksum = "345b8ab5bd4e71a2986663e88c56856699d060e78e152e6e9d7966fcd5491297" 1020 | dependencies = [ 1021 | "anyhow", 1022 | "byteorder", 1023 | "libc", 1024 | "netlink-packet-utils", 1025 | ] 1026 | 1027 | [[package]] 1028 | name = "netlink-packet-route" 1029 | version = "0.13.0" 1030 | source = "registry+https://github.com/rust-lang/crates.io-index" 1031 | checksum = "f5dee5ed749373c298237fe694eb0a51887f4cc1a27370c8464bac4382348f1a" 1032 | dependencies = [ 1033 | "anyhow", 1034 | "bitflags", 1035 | "byteorder", 1036 | "libc", 1037 | "netlink-packet-core", 1038 | "netlink-packet-utils", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "netlink-packet-utils" 1043 | version = "0.5.1" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "25af9cf0dc55498b7bd94a1508af7a78706aa0ab715a73c5169273e03c84845e" 1046 | dependencies = [ 1047 | "anyhow", 1048 | "byteorder", 1049 | "paste", 1050 | "thiserror", 1051 | ] 1052 | 1053 | [[package]] 1054 | name = "netlink-proto" 1055 | version = "0.10.0" 1056 | source = "registry+https://github.com/rust-lang/crates.io-index" 1057 | checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" 1058 | dependencies = [ 1059 | "bytes", 1060 | "futures", 1061 | "log", 1062 | "netlink-packet-core", 1063 | "netlink-sys", 1064 | "thiserror", 1065 | "tokio", 1066 | ] 1067 | 1068 | [[package]] 1069 | name = "netlink-sys" 1070 | version = "0.8.3" 1071 | source = "registry+https://github.com/rust-lang/crates.io-index" 1072 | checksum = "92b654097027250401127914afb37cb1f311df6610a9891ff07a757e94199027" 1073 | dependencies = [ 1074 | "bytes", 1075 | "futures", 1076 | "libc", 1077 | "log", 1078 | "tokio", 1079 | ] 1080 | 1081 | [[package]] 1082 | name = "nix" 1083 | version = "0.24.2" 1084 | source = "registry+https://github.com/rust-lang/crates.io-index" 1085 | checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" 1086 | dependencies = [ 1087 | "bitflags", 1088 | "cfg-if", 1089 | "libc", 1090 | ] 1091 | 1092 | [[package]] 1093 | name = "nom" 1094 | version = "7.1.1" 1095 | source = "registry+https://github.com/rust-lang/crates.io-index" 1096 | checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" 1097 | dependencies = [ 1098 | "memchr", 1099 | "minimal-lexical", 1100 | ] 1101 | 1102 | [[package]] 1103 | name = "num-bigint" 1104 | version = "0.4.3" 1105 | source = "registry+https://github.com/rust-lang/crates.io-index" 1106 | checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" 1107 | dependencies = [ 1108 | "autocfg", 1109 | "num-integer", 1110 | "num-traits", 1111 | ] 1112 | 1113 | [[package]] 1114 | name = "num-integer" 1115 | version = "0.1.45" 1116 | source = "registry+https://github.com/rust-lang/crates.io-index" 1117 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 1118 | dependencies = [ 1119 | "autocfg", 1120 | "num-traits", 1121 | ] 1122 | 1123 | [[package]] 1124 | name = "num-traits" 1125 | version = "0.2.15" 1126 | source = "registry+https://github.com/rust-lang/crates.io-index" 1127 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 1128 | dependencies = [ 1129 | "autocfg", 1130 | ] 1131 | 1132 | [[package]] 1133 | name = "num_cpus" 1134 | version = "1.13.1" 1135 | source = "registry+https://github.com/rust-lang/crates.io-index" 1136 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" 1137 | dependencies = [ 1138 | "hermit-abi", 1139 | "libc", 1140 | ] 1141 | 1142 | [[package]] 1143 | name = "num_threads" 1144 | version = "0.1.6" 1145 | source = "registry+https://github.com/rust-lang/crates.io-index" 1146 | checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" 1147 | dependencies = [ 1148 | "libc", 1149 | ] 1150 | 1151 | [[package]] 1152 | name = "once_cell" 1153 | version = "1.13.0" 1154 | source = "registry+https://github.com/rust-lang/crates.io-index" 1155 | checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" 1156 | 1157 | [[package]] 1158 | name = "os_str_bytes" 1159 | version = "6.2.0" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "648001efe5d5c0102d8cea768e348da85d90af8ba91f0bea908f157951493cd4" 1162 | 1163 | [[package]] 1164 | name = "ouroboros" 1165 | version = "0.15.5" 1166 | source = "registry+https://github.com/rust-lang/crates.io-index" 1167 | checksum = "dfbb50b356159620db6ac971c6d5c9ab788c9cc38a6f49619fca2a27acb062ca" 1168 | dependencies = [ 1169 | "aliasable", 1170 | "ouroboros_macro", 1171 | ] 1172 | 1173 | [[package]] 1174 | name = "ouroboros_macro" 1175 | version = "0.15.5" 1176 | source = "registry+https://github.com/rust-lang/crates.io-index" 1177 | checksum = "4a0d9d1a6191c4f391f87219d1ea42b23f09ee84d64763cd05ee6ea88d9f384d" 1178 | dependencies = [ 1179 | "Inflector", 1180 | "proc-macro-error", 1181 | "proc-macro2", 1182 | "quote", 1183 | "syn", 1184 | ] 1185 | 1186 | [[package]] 1187 | name = "parking_lot" 1188 | version = "0.11.2" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 1191 | dependencies = [ 1192 | "instant", 1193 | "lock_api", 1194 | "parking_lot_core", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "parking_lot_core" 1199 | version = "0.8.5" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" 1202 | dependencies = [ 1203 | "cfg-if", 1204 | "instant", 1205 | "libc", 1206 | "redox_syscall", 1207 | "smallvec", 1208 | "winapi", 1209 | ] 1210 | 1211 | [[package]] 1212 | name = "paste" 1213 | version = "1.0.9" 1214 | source = "registry+https://github.com/rust-lang/crates.io-index" 1215 | checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" 1216 | 1217 | [[package]] 1218 | name = "percent-encoding" 1219 | version = "2.1.0" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1222 | 1223 | [[package]] 1224 | name = "petgraph" 1225 | version = "0.6.2" 1226 | source = "registry+https://github.com/rust-lang/crates.io-index" 1227 | checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" 1228 | dependencies = [ 1229 | "fixedbitset", 1230 | "indexmap", 1231 | ] 1232 | 1233 | [[package]] 1234 | name = "pin-project" 1235 | version = "1.0.11" 1236 | source = "registry+https://github.com/rust-lang/crates.io-index" 1237 | checksum = "78203e83c48cffbe01e4a2d35d566ca4de445d79a85372fc64e378bfc812a260" 1238 | dependencies = [ 1239 | "pin-project-internal", 1240 | ] 1241 | 1242 | [[package]] 1243 | name = "pin-project-internal" 1244 | version = "1.0.11" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "710faf75e1b33345361201d36d04e98ac1ed8909151a017ed384700836104c74" 1247 | dependencies = [ 1248 | "proc-macro2", 1249 | "quote", 1250 | "syn", 1251 | ] 1252 | 1253 | [[package]] 1254 | name = "pin-project-lite" 1255 | version = "0.2.9" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1258 | 1259 | [[package]] 1260 | name = "pin-utils" 1261 | version = "0.1.0" 1262 | source = "registry+https://github.com/rust-lang/crates.io-index" 1263 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1264 | 1265 | [[package]] 1266 | name = "pkg-config" 1267 | version = "0.3.25" 1268 | source = "registry+https://github.com/rust-lang/crates.io-index" 1269 | checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" 1270 | 1271 | [[package]] 1272 | name = "postgres-protocol" 1273 | version = "0.6.4" 1274 | source = "registry+https://github.com/rust-lang/crates.io-index" 1275 | checksum = "878c6cbf956e03af9aa8204b407b9cbf47c072164800aa918c516cd4b056c50c" 1276 | dependencies = [ 1277 | "base64", 1278 | "byteorder", 1279 | "bytes", 1280 | "fallible-iterator", 1281 | "hmac", 1282 | "md-5", 1283 | "memchr", 1284 | "rand", 1285 | "sha2", 1286 | "stringprep", 1287 | ] 1288 | 1289 | [[package]] 1290 | name = "postgres-types" 1291 | version = "0.2.4" 1292 | source = "registry+https://github.com/rust-lang/crates.io-index" 1293 | checksum = "73d946ec7d256b04dfadc4e6a3292324e6f417124750fc5c0950f981b703a0f1" 1294 | dependencies = [ 1295 | "bytes", 1296 | "chrono", 1297 | "fallible-iterator", 1298 | "postgres-protocol", 1299 | "serde", 1300 | "serde_json", 1301 | "time", 1302 | "uuid", 1303 | ] 1304 | 1305 | [[package]] 1306 | name = "ppv-lite86" 1307 | version = "0.2.16" 1308 | source = "registry+https://github.com/rust-lang/crates.io-index" 1309 | checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" 1310 | 1311 | [[package]] 1312 | name = "prettyplease" 1313 | version = "0.1.18" 1314 | source = "registry+https://github.com/rust-lang/crates.io-index" 1315 | checksum = "697ae720ee02011f439e0701db107ffe2916d83f718342d65d7f8bf7b8a5fee9" 1316 | dependencies = [ 1317 | "proc-macro2", 1318 | "syn", 1319 | ] 1320 | 1321 | [[package]] 1322 | name = "proc-macro-error" 1323 | version = "1.0.4" 1324 | source = "registry+https://github.com/rust-lang/crates.io-index" 1325 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 1326 | dependencies = [ 1327 | "proc-macro-error-attr", 1328 | "proc-macro2", 1329 | "quote", 1330 | "syn", 1331 | "version_check", 1332 | ] 1333 | 1334 | [[package]] 1335 | name = "proc-macro-error-attr" 1336 | version = "1.0.4" 1337 | source = "registry+https://github.com/rust-lang/crates.io-index" 1338 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 1339 | dependencies = [ 1340 | "proc-macro2", 1341 | "quote", 1342 | "version_check", 1343 | ] 1344 | 1345 | [[package]] 1346 | name = "proc-macro2" 1347 | version = "1.0.43" 1348 | source = "registry+https://github.com/rust-lang/crates.io-index" 1349 | checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" 1350 | dependencies = [ 1351 | "unicode-ident", 1352 | ] 1353 | 1354 | [[package]] 1355 | name = "prost" 1356 | version = "0.11.0" 1357 | source = "registry+https://github.com/rust-lang/crates.io-index" 1358 | checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7" 1359 | dependencies = [ 1360 | "bytes", 1361 | "prost-derive", 1362 | ] 1363 | 1364 | [[package]] 1365 | name = "prost-build" 1366 | version = "0.11.1" 1367 | source = "registry+https://github.com/rust-lang/crates.io-index" 1368 | checksum = "7f835c582e6bd972ba8347313300219fed5bfa52caf175298d860b61ff6069bb" 1369 | dependencies = [ 1370 | "bytes", 1371 | "heck 0.4.0", 1372 | "itertools", 1373 | "lazy_static", 1374 | "log", 1375 | "multimap", 1376 | "petgraph", 1377 | "prost", 1378 | "prost-types", 1379 | "regex", 1380 | "tempfile", 1381 | "which", 1382 | ] 1383 | 1384 | [[package]] 1385 | name = "prost-derive" 1386 | version = "0.11.0" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364" 1389 | dependencies = [ 1390 | "anyhow", 1391 | "itertools", 1392 | "proc-macro2", 1393 | "quote", 1394 | "syn", 1395 | ] 1396 | 1397 | [[package]] 1398 | name = "prost-types" 1399 | version = "0.11.1" 1400 | source = "registry+https://github.com/rust-lang/crates.io-index" 1401 | checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e" 1402 | dependencies = [ 1403 | "bytes", 1404 | "prost", 1405 | ] 1406 | 1407 | [[package]] 1408 | name = "quote" 1409 | version = "1.0.21" 1410 | source = "registry+https://github.com/rust-lang/crates.io-index" 1411 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 1412 | dependencies = [ 1413 | "proc-macro2", 1414 | ] 1415 | 1416 | [[package]] 1417 | name = "rand" 1418 | version = "0.8.5" 1419 | source = "registry+https://github.com/rust-lang/crates.io-index" 1420 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1421 | dependencies = [ 1422 | "libc", 1423 | "rand_chacha", 1424 | "rand_core", 1425 | ] 1426 | 1427 | [[package]] 1428 | name = "rand_chacha" 1429 | version = "0.3.1" 1430 | source = "registry+https://github.com/rust-lang/crates.io-index" 1431 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1432 | dependencies = [ 1433 | "ppv-lite86", 1434 | "rand_core", 1435 | ] 1436 | 1437 | [[package]] 1438 | name = "rand_core" 1439 | version = "0.6.3" 1440 | source = "registry+https://github.com/rust-lang/crates.io-index" 1441 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 1442 | dependencies = [ 1443 | "getrandom", 1444 | ] 1445 | 1446 | [[package]] 1447 | name = "redox_syscall" 1448 | version = "0.2.16" 1449 | source = "registry+https://github.com/rust-lang/crates.io-index" 1450 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1451 | dependencies = [ 1452 | "bitflags", 1453 | ] 1454 | 1455 | [[package]] 1456 | name = "redox_users" 1457 | version = "0.4.3" 1458 | source = "registry+https://github.com/rust-lang/crates.io-index" 1459 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1460 | dependencies = [ 1461 | "getrandom", 1462 | "redox_syscall", 1463 | "thiserror", 1464 | ] 1465 | 1466 | [[package]] 1467 | name = "regex" 1468 | version = "1.6.0" 1469 | source = "registry+https://github.com/rust-lang/crates.io-index" 1470 | checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" 1471 | dependencies = [ 1472 | "regex-syntax", 1473 | ] 1474 | 1475 | [[package]] 1476 | name = "regex-syntax" 1477 | version = "0.6.27" 1478 | source = "registry+https://github.com/rust-lang/crates.io-index" 1479 | checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" 1480 | 1481 | [[package]] 1482 | name = "remove_dir_all" 1483 | version = "0.5.3" 1484 | source = "registry+https://github.com/rust-lang/crates.io-index" 1485 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1486 | dependencies = [ 1487 | "winapi", 1488 | ] 1489 | 1490 | [[package]] 1491 | name = "ring" 1492 | version = "0.16.20" 1493 | source = "registry+https://github.com/rust-lang/crates.io-index" 1494 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1495 | dependencies = [ 1496 | "cc", 1497 | "libc", 1498 | "once_cell", 1499 | "spin 0.5.2", 1500 | "untrusted", 1501 | "web-sys", 1502 | "winapi", 1503 | ] 1504 | 1505 | [[package]] 1506 | name = "rtnetlink" 1507 | version = "0.11.0" 1508 | source = "registry+https://github.com/rust-lang/crates.io-index" 1509 | checksum = "46f1cfa18f8cebe685373a2697915d7e0db3b4554918bba118385e0f71f258a7" 1510 | dependencies = [ 1511 | "futures", 1512 | "log", 1513 | "netlink-packet-route", 1514 | "netlink-proto", 1515 | "nix", 1516 | "thiserror", 1517 | "tokio", 1518 | ] 1519 | 1520 | [[package]] 1521 | name = "rust_decimal" 1522 | version = "1.26.1" 1523 | source = "registry+https://github.com/rust-lang/crates.io-index" 1524 | checksum = "ee9164faf726e4f3ece4978b25ca877ddc6802fa77f38cdccb32c7f805ecd70c" 1525 | dependencies = [ 1526 | "arrayvec", 1527 | "num-traits", 1528 | "serde", 1529 | ] 1530 | 1531 | [[package]] 1532 | name = "rustls" 1533 | version = "0.20.6" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" 1536 | dependencies = [ 1537 | "log", 1538 | "ring", 1539 | "sct", 1540 | "webpki", 1541 | ] 1542 | 1543 | [[package]] 1544 | name = "rustls-pemfile" 1545 | version = "1.0.1" 1546 | source = "registry+https://github.com/rust-lang/crates.io-index" 1547 | checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" 1548 | dependencies = [ 1549 | "base64", 1550 | ] 1551 | 1552 | [[package]] 1553 | name = "rustversion" 1554 | version = "1.0.9" 1555 | source = "registry+https://github.com/rust-lang/crates.io-index" 1556 | checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" 1557 | 1558 | [[package]] 1559 | name = "ryu" 1560 | version = "1.0.11" 1561 | source = "registry+https://github.com/rust-lang/crates.io-index" 1562 | checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" 1563 | 1564 | [[package]] 1565 | name = "same-file" 1566 | version = "1.0.6" 1567 | source = "registry+https://github.com/rust-lang/crates.io-index" 1568 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1569 | dependencies = [ 1570 | "winapi-util", 1571 | ] 1572 | 1573 | [[package]] 1574 | name = "scopeguard" 1575 | version = "1.1.0" 1576 | source = "registry+https://github.com/rust-lang/crates.io-index" 1577 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1578 | 1579 | [[package]] 1580 | name = "scratch" 1581 | version = "1.0.2" 1582 | source = "registry+https://github.com/rust-lang/crates.io-index" 1583 | checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" 1584 | 1585 | [[package]] 1586 | name = "sct" 1587 | version = "0.7.0" 1588 | source = "registry+https://github.com/rust-lang/crates.io-index" 1589 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 1590 | dependencies = [ 1591 | "ring", 1592 | "untrusted", 1593 | ] 1594 | 1595 | [[package]] 1596 | name = "sea-orm" 1597 | version = "0.9.3" 1598 | source = "registry+https://github.com/rust-lang/crates.io-index" 1599 | checksum = "84c7282fc3d7f79f6c5bd57e603319862fc778bf74118c0ce2a0dc82d9141dee" 1600 | dependencies = [ 1601 | "async-stream", 1602 | "async-trait", 1603 | "chrono", 1604 | "futures", 1605 | "futures-util", 1606 | "log", 1607 | "once_cell", 1608 | "ouroboros", 1609 | "rust_decimal", 1610 | "sea-orm-macros", 1611 | "sea-query", 1612 | "sea-strum", 1613 | "serde", 1614 | "serde_json", 1615 | "sqlx", 1616 | "time", 1617 | "tracing", 1618 | "url", 1619 | "uuid", 1620 | ] 1621 | 1622 | [[package]] 1623 | name = "sea-orm-macros" 1624 | version = "0.9.3" 1625 | source = "registry+https://github.com/rust-lang/crates.io-index" 1626 | checksum = "f96b8a479d25d8110751a0511265556dd9139bc11e342357a98e60910fbb07e3" 1627 | dependencies = [ 1628 | "bae", 1629 | "heck 0.3.3", 1630 | "proc-macro2", 1631 | "quote", 1632 | "syn", 1633 | ] 1634 | 1635 | [[package]] 1636 | name = "sea-query" 1637 | version = "0.26.4" 1638 | source = "registry+https://github.com/rust-lang/crates.io-index" 1639 | checksum = "15e36a9680854b4e5d2ea5230f94e7ef81562260905b770fe20c3df9b3e7a536" 1640 | dependencies = [ 1641 | "chrono", 1642 | "postgres-types", 1643 | "rust_decimal", 1644 | "sea-query-derive", 1645 | "sea-query-driver", 1646 | "serde_json", 1647 | "time", 1648 | "uuid", 1649 | ] 1650 | 1651 | [[package]] 1652 | name = "sea-query-derive" 1653 | version = "0.2.0" 1654 | source = "registry+https://github.com/rust-lang/crates.io-index" 1655 | checksum = "34cdc022b4f606353fe5dc85b09713a04e433323b70163e81513b141c6ae6eb5" 1656 | dependencies = [ 1657 | "heck 0.3.3", 1658 | "proc-macro2", 1659 | "quote", 1660 | "syn", 1661 | "thiserror", 1662 | ] 1663 | 1664 | [[package]] 1665 | name = "sea-query-driver" 1666 | version = "0.2.2" 1667 | source = "registry+https://github.com/rust-lang/crates.io-index" 1668 | checksum = "7d7f0cae2e7ebb2affc378c40bc343c8197181d601d6755c3e66f1bd18cac253" 1669 | dependencies = [ 1670 | "proc-macro2", 1671 | "quote", 1672 | "syn", 1673 | ] 1674 | 1675 | [[package]] 1676 | name = "sea-strum" 1677 | version = "0.23.0" 1678 | source = "registry+https://github.com/rust-lang/crates.io-index" 1679 | checksum = "391d06a6007842cfe79ac6f7f53911b76dfd69fc9a6769f1cf6569d12ce20e1b" 1680 | dependencies = [ 1681 | "sea-strum_macros", 1682 | ] 1683 | 1684 | [[package]] 1685 | name = "sea-strum_macros" 1686 | version = "0.23.0" 1687 | source = "registry+https://github.com/rust-lang/crates.io-index" 1688 | checksum = "69b4397b825df6ccf1e98bcdabef3bbcfc47ff5853983467850eeab878384f21" 1689 | dependencies = [ 1690 | "heck 0.3.3", 1691 | "proc-macro2", 1692 | "quote", 1693 | "rustversion", 1694 | "syn", 1695 | ] 1696 | 1697 | [[package]] 1698 | name = "serde" 1699 | version = "1.0.143" 1700 | source = "registry+https://github.com/rust-lang/crates.io-index" 1701 | checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553" 1702 | dependencies = [ 1703 | "serde_derive", 1704 | ] 1705 | 1706 | [[package]] 1707 | name = "serde_derive" 1708 | version = "1.0.143" 1709 | source = "registry+https://github.com/rust-lang/crates.io-index" 1710 | checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391" 1711 | dependencies = [ 1712 | "proc-macro2", 1713 | "quote", 1714 | "syn", 1715 | ] 1716 | 1717 | [[package]] 1718 | name = "serde_json" 1719 | version = "1.0.86" 1720 | source = "registry+https://github.com/rust-lang/crates.io-index" 1721 | checksum = "41feea4228a6f1cd09ec7a3593a682276702cd67b5273544757dae23c096f074" 1722 | dependencies = [ 1723 | "itoa", 1724 | "ryu", 1725 | "serde", 1726 | ] 1727 | 1728 | [[package]] 1729 | name = "sha2" 1730 | version = "0.10.6" 1731 | source = "registry+https://github.com/rust-lang/crates.io-index" 1732 | checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" 1733 | dependencies = [ 1734 | "cfg-if", 1735 | "cpufeatures", 1736 | "digest", 1737 | ] 1738 | 1739 | [[package]] 1740 | name = "simplelog" 1741 | version = "0.12.0" 1742 | source = "registry+https://github.com/rust-lang/crates.io-index" 1743 | checksum = "48dfff04aade74dd495b007c831cd6f4e0cee19c344dd9dc0884c0289b70a786" 1744 | dependencies = [ 1745 | "log", 1746 | "termcolor", 1747 | "time", 1748 | ] 1749 | 1750 | [[package]] 1751 | name = "slab" 1752 | version = "0.4.7" 1753 | source = "registry+https://github.com/rust-lang/crates.io-index" 1754 | checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" 1755 | dependencies = [ 1756 | "autocfg", 1757 | ] 1758 | 1759 | [[package]] 1760 | name = "smallvec" 1761 | version = "1.10.0" 1762 | source = "registry+https://github.com/rust-lang/crates.io-index" 1763 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1764 | 1765 | [[package]] 1766 | name = "socket2" 1767 | version = "0.4.4" 1768 | source = "registry+https://github.com/rust-lang/crates.io-index" 1769 | checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" 1770 | dependencies = [ 1771 | "libc", 1772 | "winapi", 1773 | ] 1774 | 1775 | [[package]] 1776 | name = "spin" 1777 | version = "0.5.2" 1778 | source = "registry+https://github.com/rust-lang/crates.io-index" 1779 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1780 | 1781 | [[package]] 1782 | name = "spin" 1783 | version = "0.9.4" 1784 | source = "registry+https://github.com/rust-lang/crates.io-index" 1785 | checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" 1786 | dependencies = [ 1787 | "lock_api", 1788 | ] 1789 | 1790 | [[package]] 1791 | name = "sqlformat" 1792 | version = "0.2.0" 1793 | source = "registry+https://github.com/rust-lang/crates.io-index" 1794 | checksum = "f87e292b4291f154971a43c3774364e2cbcaec599d3f5bf6fa9d122885dbc38a" 1795 | dependencies = [ 1796 | "itertools", 1797 | "nom", 1798 | "unicode_categories", 1799 | ] 1800 | 1801 | [[package]] 1802 | name = "sqlx" 1803 | version = "0.6.2" 1804 | source = "registry+https://github.com/rust-lang/crates.io-index" 1805 | checksum = "9249290c05928352f71c077cc44a464d880c63f26f7534728cca008e135c0428" 1806 | dependencies = [ 1807 | "sqlx-core", 1808 | "sqlx-macros", 1809 | ] 1810 | 1811 | [[package]] 1812 | name = "sqlx-core" 1813 | version = "0.6.2" 1814 | source = "registry+https://github.com/rust-lang/crates.io-index" 1815 | checksum = "dcbc16ddba161afc99e14d1713a453747a2b07fc097d2009f4c300ec99286105" 1816 | dependencies = [ 1817 | "ahash", 1818 | "atoi", 1819 | "bitflags", 1820 | "byteorder", 1821 | "bytes", 1822 | "chrono", 1823 | "crc", 1824 | "crossbeam-queue", 1825 | "dotenvy", 1826 | "either", 1827 | "event-listener", 1828 | "flume", 1829 | "futures-channel", 1830 | "futures-core", 1831 | "futures-executor", 1832 | "futures-intrusive", 1833 | "futures-util", 1834 | "hashlink", 1835 | "hex", 1836 | "indexmap", 1837 | "itoa", 1838 | "libc", 1839 | "libsqlite3-sys", 1840 | "log", 1841 | "memchr", 1842 | "num-bigint", 1843 | "once_cell", 1844 | "paste", 1845 | "percent-encoding", 1846 | "rust_decimal", 1847 | "rustls", 1848 | "rustls-pemfile", 1849 | "serde", 1850 | "serde_json", 1851 | "sha2", 1852 | "smallvec", 1853 | "sqlformat", 1854 | "sqlx-rt", 1855 | "stringprep", 1856 | "thiserror", 1857 | "time", 1858 | "tokio-stream", 1859 | "url", 1860 | "uuid", 1861 | "webpki-roots", 1862 | ] 1863 | 1864 | [[package]] 1865 | name = "sqlx-macros" 1866 | version = "0.6.2" 1867 | source = "registry+https://github.com/rust-lang/crates.io-index" 1868 | checksum = "b850fa514dc11f2ee85be9d055c512aa866746adfacd1cb42d867d68e6a5b0d9" 1869 | dependencies = [ 1870 | "dotenvy", 1871 | "either", 1872 | "heck 0.4.0", 1873 | "once_cell", 1874 | "proc-macro2", 1875 | "quote", 1876 | "serde_json", 1877 | "sha2", 1878 | "sqlx-core", 1879 | "sqlx-rt", 1880 | "syn", 1881 | "url", 1882 | ] 1883 | 1884 | [[package]] 1885 | name = "sqlx-rt" 1886 | version = "0.6.2" 1887 | source = "registry+https://github.com/rust-lang/crates.io-index" 1888 | checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396" 1889 | dependencies = [ 1890 | "once_cell", 1891 | "tokio", 1892 | "tokio-rustls", 1893 | ] 1894 | 1895 | [[package]] 1896 | name = "stringprep" 1897 | version = "0.1.2" 1898 | source = "registry+https://github.com/rust-lang/crates.io-index" 1899 | checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" 1900 | dependencies = [ 1901 | "unicode-bidi", 1902 | "unicode-normalization", 1903 | ] 1904 | 1905 | [[package]] 1906 | name = "strsim" 1907 | version = "0.10.0" 1908 | source = "registry+https://github.com/rust-lang/crates.io-index" 1909 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1910 | 1911 | [[package]] 1912 | name = "subtle" 1913 | version = "2.4.1" 1914 | source = "registry+https://github.com/rust-lang/crates.io-index" 1915 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 1916 | 1917 | [[package]] 1918 | name = "syn" 1919 | version = "1.0.99" 1920 | source = "registry+https://github.com/rust-lang/crates.io-index" 1921 | checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" 1922 | dependencies = [ 1923 | "proc-macro2", 1924 | "quote", 1925 | "unicode-ident", 1926 | ] 1927 | 1928 | [[package]] 1929 | name = "sync_wrapper" 1930 | version = "0.1.1" 1931 | source = "registry+https://github.com/rust-lang/crates.io-index" 1932 | checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" 1933 | 1934 | [[package]] 1935 | name = "syslog" 1936 | version = "6.0.1" 1937 | source = "registry+https://github.com/rust-lang/crates.io-index" 1938 | checksum = "978044cc68150ad5e40083c9f6a725e6fd02d7ba1bcf691ec2ff0d66c0b41acc" 1939 | dependencies = [ 1940 | "error-chain", 1941 | "hostname", 1942 | "libc", 1943 | "log", 1944 | "time", 1945 | ] 1946 | 1947 | [[package]] 1948 | name = "tempfile" 1949 | version = "3.3.0" 1950 | source = "registry+https://github.com/rust-lang/crates.io-index" 1951 | checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" 1952 | dependencies = [ 1953 | "cfg-if", 1954 | "fastrand", 1955 | "libc", 1956 | "redox_syscall", 1957 | "remove_dir_all", 1958 | "winapi", 1959 | ] 1960 | 1961 | [[package]] 1962 | name = "termcolor" 1963 | version = "1.1.3" 1964 | source = "registry+https://github.com/rust-lang/crates.io-index" 1965 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 1966 | dependencies = [ 1967 | "winapi-util", 1968 | ] 1969 | 1970 | [[package]] 1971 | name = "textwrap" 1972 | version = "0.15.0" 1973 | source = "registry+https://github.com/rust-lang/crates.io-index" 1974 | checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" 1975 | 1976 | [[package]] 1977 | name = "thiserror" 1978 | version = "1.0.37" 1979 | source = "registry+https://github.com/rust-lang/crates.io-index" 1980 | checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" 1981 | dependencies = [ 1982 | "thiserror-impl", 1983 | ] 1984 | 1985 | [[package]] 1986 | name = "thiserror-impl" 1987 | version = "1.0.37" 1988 | source = "registry+https://github.com/rust-lang/crates.io-index" 1989 | checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" 1990 | dependencies = [ 1991 | "proc-macro2", 1992 | "quote", 1993 | "syn", 1994 | ] 1995 | 1996 | [[package]] 1997 | name = "time" 1998 | version = "0.3.13" 1999 | source = "registry+https://github.com/rust-lang/crates.io-index" 2000 | checksum = "db76ff9fa4b1458b3c7f077f3ff9887394058460d21e634355b273aaf11eea45" 2001 | dependencies = [ 2002 | "itoa", 2003 | "libc", 2004 | "num_threads", 2005 | "time-macros", 2006 | ] 2007 | 2008 | [[package]] 2009 | name = "time-macros" 2010 | version = "0.2.4" 2011 | source = "registry+https://github.com/rust-lang/crates.io-index" 2012 | checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" 2013 | 2014 | [[package]] 2015 | name = "tinyvec" 2016 | version = "1.6.0" 2017 | source = "registry+https://github.com/rust-lang/crates.io-index" 2018 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2019 | dependencies = [ 2020 | "tinyvec_macros", 2021 | ] 2022 | 2023 | [[package]] 2024 | name = "tinyvec_macros" 2025 | version = "0.1.0" 2026 | source = "registry+https://github.com/rust-lang/crates.io-index" 2027 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 2028 | 2029 | [[package]] 2030 | name = "tokio" 2031 | version = "1.20.1" 2032 | source = "registry+https://github.com/rust-lang/crates.io-index" 2033 | checksum = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581" 2034 | dependencies = [ 2035 | "autocfg", 2036 | "bytes", 2037 | "libc", 2038 | "memchr", 2039 | "mio", 2040 | "num_cpus", 2041 | "once_cell", 2042 | "pin-project-lite", 2043 | "socket2", 2044 | "tokio-macros", 2045 | "winapi", 2046 | ] 2047 | 2048 | [[package]] 2049 | name = "tokio-io-timeout" 2050 | version = "1.2.0" 2051 | source = "registry+https://github.com/rust-lang/crates.io-index" 2052 | checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" 2053 | dependencies = [ 2054 | "pin-project-lite", 2055 | "tokio", 2056 | ] 2057 | 2058 | [[package]] 2059 | name = "tokio-macros" 2060 | version = "1.8.0" 2061 | source = "registry+https://github.com/rust-lang/crates.io-index" 2062 | checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" 2063 | dependencies = [ 2064 | "proc-macro2", 2065 | "quote", 2066 | "syn", 2067 | ] 2068 | 2069 | [[package]] 2070 | name = "tokio-rustls" 2071 | version = "0.23.4" 2072 | source = "registry+https://github.com/rust-lang/crates.io-index" 2073 | checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" 2074 | dependencies = [ 2075 | "rustls", 2076 | "tokio", 2077 | "webpki", 2078 | ] 2079 | 2080 | [[package]] 2081 | name = "tokio-stream" 2082 | version = "0.1.9" 2083 | source = "registry+https://github.com/rust-lang/crates.io-index" 2084 | checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9" 2085 | dependencies = [ 2086 | "futures-core", 2087 | "pin-project-lite", 2088 | "tokio", 2089 | ] 2090 | 2091 | [[package]] 2092 | name = "tokio-util" 2093 | version = "0.7.3" 2094 | source = "registry+https://github.com/rust-lang/crates.io-index" 2095 | checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" 2096 | dependencies = [ 2097 | "bytes", 2098 | "futures-core", 2099 | "futures-sink", 2100 | "pin-project-lite", 2101 | "tokio", 2102 | "tracing", 2103 | ] 2104 | 2105 | [[package]] 2106 | name = "tonic" 2107 | version = "0.8.0" 2108 | source = "registry+https://github.com/rust-lang/crates.io-index" 2109 | checksum = "498f271adc46acce75d66f639e4d35b31b2394c295c82496727dafa16d465dd2" 2110 | dependencies = [ 2111 | "async-stream", 2112 | "async-trait", 2113 | "axum", 2114 | "base64", 2115 | "bytes", 2116 | "futures-core", 2117 | "futures-util", 2118 | "h2", 2119 | "http", 2120 | "http-body", 2121 | "hyper", 2122 | "hyper-timeout", 2123 | "percent-encoding", 2124 | "pin-project", 2125 | "prost", 2126 | "prost-derive", 2127 | "rustls-pemfile", 2128 | "tokio", 2129 | "tokio-rustls", 2130 | "tokio-stream", 2131 | "tokio-util", 2132 | "tower", 2133 | "tower-layer", 2134 | "tower-service", 2135 | "tracing", 2136 | "tracing-futures", 2137 | ] 2138 | 2139 | [[package]] 2140 | name = "tonic-build" 2141 | version = "0.8.0" 2142 | source = "registry+https://github.com/rust-lang/crates.io-index" 2143 | checksum = "2fbcd2800e34e743b9ae795867d5f77b535d3a3be69fd731e39145719752df8c" 2144 | dependencies = [ 2145 | "prettyplease", 2146 | "proc-macro2", 2147 | "prost-build", 2148 | "quote", 2149 | "syn", 2150 | ] 2151 | 2152 | [[package]] 2153 | name = "tower" 2154 | version = "0.4.13" 2155 | source = "registry+https://github.com/rust-lang/crates.io-index" 2156 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 2157 | dependencies = [ 2158 | "futures-core", 2159 | "futures-util", 2160 | "indexmap", 2161 | "pin-project", 2162 | "pin-project-lite", 2163 | "rand", 2164 | "slab", 2165 | "tokio", 2166 | "tokio-util", 2167 | "tower-layer", 2168 | "tower-service", 2169 | "tracing", 2170 | ] 2171 | 2172 | [[package]] 2173 | name = "tower-http" 2174 | version = "0.3.4" 2175 | source = "registry+https://github.com/rust-lang/crates.io-index" 2176 | checksum = "3c530c8675c1dbf98facee631536fa116b5fb6382d7dd6dc1b118d970eafe3ba" 2177 | dependencies = [ 2178 | "bitflags", 2179 | "bytes", 2180 | "futures-core", 2181 | "futures-util", 2182 | "http", 2183 | "http-body", 2184 | "http-range-header", 2185 | "pin-project-lite", 2186 | "tower", 2187 | "tower-layer", 2188 | "tower-service", 2189 | ] 2190 | 2191 | [[package]] 2192 | name = "tower-layer" 2193 | version = "0.3.1" 2194 | source = "registry+https://github.com/rust-lang/crates.io-index" 2195 | checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" 2196 | 2197 | [[package]] 2198 | name = "tower-service" 2199 | version = "0.3.2" 2200 | source = "registry+https://github.com/rust-lang/crates.io-index" 2201 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 2202 | 2203 | [[package]] 2204 | name = "tracing" 2205 | version = "0.1.36" 2206 | source = "registry+https://github.com/rust-lang/crates.io-index" 2207 | checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" 2208 | dependencies = [ 2209 | "cfg-if", 2210 | "log", 2211 | "pin-project-lite", 2212 | "tracing-attributes", 2213 | "tracing-core", 2214 | ] 2215 | 2216 | [[package]] 2217 | name = "tracing-attributes" 2218 | version = "0.1.22" 2219 | source = "registry+https://github.com/rust-lang/crates.io-index" 2220 | checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" 2221 | dependencies = [ 2222 | "proc-macro2", 2223 | "quote", 2224 | "syn", 2225 | ] 2226 | 2227 | [[package]] 2228 | name = "tracing-core" 2229 | version = "0.1.29" 2230 | source = "registry+https://github.com/rust-lang/crates.io-index" 2231 | checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" 2232 | dependencies = [ 2233 | "once_cell", 2234 | ] 2235 | 2236 | [[package]] 2237 | name = "tracing-futures" 2238 | version = "0.2.5" 2239 | source = "registry+https://github.com/rust-lang/crates.io-index" 2240 | checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" 2241 | dependencies = [ 2242 | "pin-project", 2243 | "tracing", 2244 | ] 2245 | 2246 | [[package]] 2247 | name = "try-lock" 2248 | version = "0.2.3" 2249 | source = "registry+https://github.com/rust-lang/crates.io-index" 2250 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 2251 | 2252 | [[package]] 2253 | name = "typenum" 2254 | version = "1.15.0" 2255 | source = "registry+https://github.com/rust-lang/crates.io-index" 2256 | checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" 2257 | 2258 | [[package]] 2259 | name = "unicode-bidi" 2260 | version = "0.3.8" 2261 | source = "registry+https://github.com/rust-lang/crates.io-index" 2262 | checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" 2263 | 2264 | [[package]] 2265 | name = "unicode-ident" 2266 | version = "1.0.3" 2267 | source = "registry+https://github.com/rust-lang/crates.io-index" 2268 | checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" 2269 | 2270 | [[package]] 2271 | name = "unicode-normalization" 2272 | version = "0.1.22" 2273 | source = "registry+https://github.com/rust-lang/crates.io-index" 2274 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 2275 | dependencies = [ 2276 | "tinyvec", 2277 | ] 2278 | 2279 | [[package]] 2280 | name = "unicode-segmentation" 2281 | version = "1.10.0" 2282 | source = "registry+https://github.com/rust-lang/crates.io-index" 2283 | checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" 2284 | 2285 | [[package]] 2286 | name = "unicode-width" 2287 | version = "0.1.10" 2288 | source = "registry+https://github.com/rust-lang/crates.io-index" 2289 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 2290 | 2291 | [[package]] 2292 | name = "unicode_categories" 2293 | version = "0.1.1" 2294 | source = "registry+https://github.com/rust-lang/crates.io-index" 2295 | checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" 2296 | 2297 | [[package]] 2298 | name = "untrusted" 2299 | version = "0.7.1" 2300 | source = "registry+https://github.com/rust-lang/crates.io-index" 2301 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 2302 | 2303 | [[package]] 2304 | name = "url" 2305 | version = "2.3.0" 2306 | source = "registry+https://github.com/rust-lang/crates.io-index" 2307 | checksum = "22fe195a4f217c25b25cb5058ced57059824a678474874038dc88d211bf508d3" 2308 | dependencies = [ 2309 | "form_urlencoded", 2310 | "idna", 2311 | "percent-encoding", 2312 | ] 2313 | 2314 | [[package]] 2315 | name = "uuid" 2316 | version = "1.2.1" 2317 | source = "registry+https://github.com/rust-lang/crates.io-index" 2318 | checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83" 2319 | dependencies = [ 2320 | "getrandom", 2321 | "serde", 2322 | ] 2323 | 2324 | [[package]] 2325 | name = "vcpkg" 2326 | version = "0.2.15" 2327 | source = "registry+https://github.com/rust-lang/crates.io-index" 2328 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 2329 | 2330 | [[package]] 2331 | name = "version_check" 2332 | version = "0.9.4" 2333 | source = "registry+https://github.com/rust-lang/crates.io-index" 2334 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2335 | 2336 | [[package]] 2337 | name = "walkdir" 2338 | version = "2.3.2" 2339 | source = "registry+https://github.com/rust-lang/crates.io-index" 2340 | checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" 2341 | dependencies = [ 2342 | "same-file", 2343 | "winapi", 2344 | "winapi-util", 2345 | ] 2346 | 2347 | [[package]] 2348 | name = "want" 2349 | version = "0.3.0" 2350 | source = "registry+https://github.com/rust-lang/crates.io-index" 2351 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 2352 | dependencies = [ 2353 | "log", 2354 | "try-lock", 2355 | ] 2356 | 2357 | [[package]] 2358 | name = "wasi" 2359 | version = "0.11.0+wasi-snapshot-preview1" 2360 | source = "registry+https://github.com/rust-lang/crates.io-index" 2361 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2362 | 2363 | [[package]] 2364 | name = "wasm-bindgen" 2365 | version = "0.2.82" 2366 | source = "registry+https://github.com/rust-lang/crates.io-index" 2367 | checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" 2368 | dependencies = [ 2369 | "cfg-if", 2370 | "wasm-bindgen-macro", 2371 | ] 2372 | 2373 | [[package]] 2374 | name = "wasm-bindgen-backend" 2375 | version = "0.2.82" 2376 | source = "registry+https://github.com/rust-lang/crates.io-index" 2377 | checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" 2378 | dependencies = [ 2379 | "bumpalo", 2380 | "log", 2381 | "once_cell", 2382 | "proc-macro2", 2383 | "quote", 2384 | "syn", 2385 | "wasm-bindgen-shared", 2386 | ] 2387 | 2388 | [[package]] 2389 | name = "wasm-bindgen-macro" 2390 | version = "0.2.82" 2391 | source = "registry+https://github.com/rust-lang/crates.io-index" 2392 | checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" 2393 | dependencies = [ 2394 | "quote", 2395 | "wasm-bindgen-macro-support", 2396 | ] 2397 | 2398 | [[package]] 2399 | name = "wasm-bindgen-macro-support" 2400 | version = "0.2.82" 2401 | source = "registry+https://github.com/rust-lang/crates.io-index" 2402 | checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" 2403 | dependencies = [ 2404 | "proc-macro2", 2405 | "quote", 2406 | "syn", 2407 | "wasm-bindgen-backend", 2408 | "wasm-bindgen-shared", 2409 | ] 2410 | 2411 | [[package]] 2412 | name = "wasm-bindgen-shared" 2413 | version = "0.2.82" 2414 | source = "registry+https://github.com/rust-lang/crates.io-index" 2415 | checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" 2416 | 2417 | [[package]] 2418 | name = "web-sys" 2419 | version = "0.3.59" 2420 | source = "registry+https://github.com/rust-lang/crates.io-index" 2421 | checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" 2422 | dependencies = [ 2423 | "js-sys", 2424 | "wasm-bindgen", 2425 | ] 2426 | 2427 | [[package]] 2428 | name = "webpki" 2429 | version = "0.22.0" 2430 | source = "registry+https://github.com/rust-lang/crates.io-index" 2431 | checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" 2432 | dependencies = [ 2433 | "ring", 2434 | "untrusted", 2435 | ] 2436 | 2437 | [[package]] 2438 | name = "webpki-roots" 2439 | version = "0.22.5" 2440 | source = "registry+https://github.com/rust-lang/crates.io-index" 2441 | checksum = "368bfe657969fb01238bb756d351dcade285e0f6fcbd36dcb23359a5169975be" 2442 | dependencies = [ 2443 | "webpki", 2444 | ] 2445 | 2446 | [[package]] 2447 | name = "which" 2448 | version = "4.2.5" 2449 | source = "registry+https://github.com/rust-lang/crates.io-index" 2450 | checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" 2451 | dependencies = [ 2452 | "either", 2453 | "lazy_static", 2454 | "libc", 2455 | ] 2456 | 2457 | [[package]] 2458 | name = "winapi" 2459 | version = "0.3.9" 2460 | source = "registry+https://github.com/rust-lang/crates.io-index" 2461 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2462 | dependencies = [ 2463 | "winapi-i686-pc-windows-gnu", 2464 | "winapi-x86_64-pc-windows-gnu", 2465 | ] 2466 | 2467 | [[package]] 2468 | name = "winapi-i686-pc-windows-gnu" 2469 | version = "0.4.0" 2470 | source = "registry+https://github.com/rust-lang/crates.io-index" 2471 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2472 | 2473 | [[package]] 2474 | name = "winapi-util" 2475 | version = "0.1.5" 2476 | source = "registry+https://github.com/rust-lang/crates.io-index" 2477 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2478 | dependencies = [ 2479 | "winapi", 2480 | ] 2481 | 2482 | [[package]] 2483 | name = "winapi-x86_64-pc-windows-gnu" 2484 | version = "0.4.0" 2485 | source = "registry+https://github.com/rust-lang/crates.io-index" 2486 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2487 | 2488 | [[package]] 2489 | name = "windows-sys" 2490 | version = "0.36.1" 2491 | source = "registry+https://github.com/rust-lang/crates.io-index" 2492 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 2493 | dependencies = [ 2494 | "windows_aarch64_msvc", 2495 | "windows_i686_gnu", 2496 | "windows_i686_msvc", 2497 | "windows_x86_64_gnu", 2498 | "windows_x86_64_msvc", 2499 | ] 2500 | 2501 | [[package]] 2502 | name = "windows_aarch64_msvc" 2503 | version = "0.36.1" 2504 | source = "registry+https://github.com/rust-lang/crates.io-index" 2505 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 2506 | 2507 | [[package]] 2508 | name = "windows_i686_gnu" 2509 | version = "0.36.1" 2510 | source = "registry+https://github.com/rust-lang/crates.io-index" 2511 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 2512 | 2513 | [[package]] 2514 | name = "windows_i686_msvc" 2515 | version = "0.36.1" 2516 | source = "registry+https://github.com/rust-lang/crates.io-index" 2517 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 2518 | 2519 | [[package]] 2520 | name = "windows_x86_64_gnu" 2521 | version = "0.36.1" 2522 | source = "registry+https://github.com/rust-lang/crates.io-index" 2523 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 2524 | 2525 | [[package]] 2526 | name = "windows_x86_64_msvc" 2527 | version = "0.36.1" 2528 | source = "registry+https://github.com/rust-lang/crates.io-index" 2529 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 2530 | --------------------------------------------------------------------------------