diff --git a/.github/continuous-integration.sh b/.github/continuous-integration.sh index 4bda10c5a..9a8a952b2 100755 --- a/.github/continuous-integration.sh +++ b/.github/continuous-integration.sh @@ -58,8 +58,8 @@ function run-mlir-tests { run-step ninja -C $ARC_MLIR_BUILD/llvm-build/ check-arc-mlir } -function run-runtime-tests { - cd arc-runtime +function run-sys-tests { + cd arc-sys run-step arc-cargo "$@" } @@ -123,8 +123,8 @@ case $1 in ;; cargo) - # We assume this is a arc-runtime cargo command line + # We assume this is a arc-sys cargo command line shift - run-runtime-tests "$@" + run-sys-tests "$@" ;; esac diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index d9f830343..77d6d3dc3 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -32,16 +32,12 @@ jobs: toolchain: nightly override: true - - name: Cache arc-runtime-docs - id: cache-arc-runtime-docs - uses: actions/cache@v2 - - name: Cache arc-sys-docs id: cache-arc-sys-docs uses: actions/cache@v3 with: path: arc-docs/src/target - key: ${{ runner.os }}-cargo-${{ hashFiles('arc-runtime/**') }} + key: ${{ runner.os }}-cargo-${{ hashFiles('arc-sys/**') }} - name: Cache arc-preprocessor id: cache-arc-preprocessor @@ -71,11 +67,13 @@ jobs: path: ~/.cargo/bin/zola key: ${{ runner.os }}-cargo-${{ env.ZOLA_VERSION }} - - name: Build arc-runtime-docs - if: steps.cache-arc-runtime-docs.outputs.cache-hit != 'true' - run: | - cargo +nightly doc --document-private-items --no-deps --target-dir=arc-docs/src/target --manifest-path=arc-runtime/Cargo.toml - cargo +nightly doc --document-private-items --no-deps --target-dir=arc-docs/src/target --manifest-path=arc-runtime/macros/Cargo.toml + - name: Build arc-sys-docs + if: steps.cache-arc-sys-docs.outputs.cache-hit != 'true' + env: + ARC_LANG_CMD: 'NONE' # Do not build Arc-Lang + ARC_MLIR_CMD: 'NONE' # Do not build Arc-MLIR + RUSTDOCFLAGS: '--enable-index-page -Zunstable-options' + run: cargo +nightly doc --document-private-items --no-deps --target-dir=arc-docs/src/target --manifest-path=arc-sys/Cargo.toml - name: Build arc-preprocessor if: steps.cache-arc-preprocessor.outputs.cache-hit != 'true' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6d5e2537..18e8c7e9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: mv README.md "$package" mv arc-mlir/build/llvm-build/bin/{arc,arc-lang,arc-mlir} "$package/bin" - mv {arc-runtime,arc-lang/stdlib} "$package/share" + mv {arc-sys,arc-lang/stdlib} "$package/share" tar cvf "$package.tar" "$package" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ecf80fae..8ba84eab5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: paths: - "arc-lang/**" - "arc-mlir/**" - - "arc-runtime/**" + - "arc-sys/**" - "arc-python/**" - ".github/workflows/test.yml" branches: @@ -38,7 +38,7 @@ jobs: env: ARC_MLIR_BUILD: ${{ format('{0}/build', runner.temp) }} - - name: Pre-build arc-runtime + - name: Pre-build arc-sys run: ./.github/continuous-integration.sh cargo test env: ARC_MLIR_BUILD: ${{ format('{0}/build', runner.temp) }} @@ -48,7 +48,7 @@ jobs: env: ARC_MLIR_BUILD: ${{ format('{0}/build', runner.temp) }} - - name: "Run arc-runtime test: clippy" + - name: "Run arc-sys test: clippy" run: ./.github/continuous-integration.sh cargo clippy env: ARC_MLIR_BUILD: ${{ format('{0}/build', runner.temp) }} @@ -56,7 +56,7 @@ jobs: - name: "Ccache/Sccache statistics" run: ./.github/continuous-integration.sh check-ccache -# - name: "Run arc-runtime test: fmt -- -v --check" +# - name: "Run arc-sys test: fmt -- -v --check" # run: ./.github/continuous-integration.sh cargo fmt -- -v --check # env: # ARC_MLIR_BUILD: ${{ format('{0}/build', runner.temp) }} diff --git a/arc-runtime/.gitignore b/arc-runtime/.gitignore deleted file mode 100644 index eb5a316cb..000000000 --- a/arc-runtime/.gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/arc-runtime/Cargo.toml b/arc-runtime/Cargo.toml deleted file mode 100644 index ab335ae0a..000000000 --- a/arc-runtime/Cargo.toml +++ /dev/null @@ -1,45 +0,0 @@ -[package] -name = "arc-runtime" -version = "0.0.0" -authors = ["Klas Segeljakt "] -edition = "2021" -description = "A runtime for arc-lang" - -[lib] -name = "arc_runtime" -path = "src/lib.rs" - -[features] -dataframes = ["polars"] - -[dependencies] -macros = { path = "./macros" } -kompact = { git = "https://github.com/kompics/kompact", rev = "e9deae8", features = ["silent_logging"]} -slog = { version = "2.7.0" } -time = { version = "0.3.5", features = ["rand", "macros"] } -wheel = { version = "1.1.0", package = "hierarchical_hash_wheel_timer" } -uuid = { version = "0.8.2" } -rand = { version = "0.8.3" } -dyn-clone = { version = "1.0.4" } -comet = { git = "https://github.com/Starlight-JS/comet", package = "comet-extra", rev = "c2f96f8" } -tokio = { version = "1.15.0", features = ["sync"] } -derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "deref", "deref_mut", "constructor", "as_ref"] } -futures = { version = "0.3.19" } -replace_with = { version = "0.1.7" } -hexf = { version = "0.2.1" } -serde_derive = { version = "1.0.136" } -serde = { version = "1.0.136" } -# serde_traitobject = { version = "0.2.7" } -polars = { git = "https://github.com/pola-rs/polars", rev = "a04786c", optional = true } - -# crossfire = { version = "0.1.7" } -# paste = { version = "1.0.5" } -# coz = { version = "0.1.3" } -# arrayvec = { version = "0.7.0" } -# lazy_static = { version = "1.4.0" } -# async-recursion = { version = "0.3.2" } -# erased-serde = { version = "0.3.17" } - -[dev-dependencies] -arrow2 = { version = "0.9.1" } -omnipaxos = { git = "https://github.com/haraldng/omnipaxos", rev = "36dd86d" } diff --git a/arc-runtime/examples/consensus/Cargo.toml b/arc-runtime/examples/consensus/Cargo.toml deleted file mode 100644 index 36d0ed1d2..000000000 --- a/arc-runtime/examples/consensus/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "consensus" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -omnipaxos = { git = "https://github.com/haraldng/omnipaxos", rev = "36dd86d" } -hocon = { version = "0.5.2" } -kompact = { git = "https://github.com/kompics/kompact", rev = "e9deae8" } -arc-runtime = { path = "../../" } -rand = { version = "0.8.4" } diff --git a/arc-runtime/examples/consensus/omnipaxos.conf b/arc-runtime/examples/consensus/omnipaxos.conf deleted file mode 100644 index 60c648726..000000000 --- a/arc-runtime/examples/consensus/omnipaxos.conf +++ /dev/null @@ -1,6 +0,0 @@ -wait_timeout: 10 s -num_threads: 8 -num_nodes: 20 -ble_hb_delay: 5 -increment_delay: 2 -num_proposals: 20 diff --git a/arc-runtime/examples/consensus/src/ble.rs b/arc-runtime/examples/consensus/src/ble.rs deleted file mode 100644 index 75e87a7bf..000000000 --- a/arc-runtime/examples/consensus/src/ble.rs +++ /dev/null @@ -1,132 +0,0 @@ -use kompact::prelude::*; - -use kompact::config_keys::system::LABEL; -use kompact::config_keys::system::THREADS; -use kompact::executors::crossbeam_workstealing_pool; - -use omnipaxos::leader_election::ballot_leader_election::messages::BLEMessage; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatMsg; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatReply; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatRequest; -use omnipaxos::leader_election::ballot_leader_election::Ballot; -use omnipaxos::leader_election::ballot_leader_election::BallotLeaderElection; -use omnipaxos::messages::AcceptDecide; -use omnipaxos::messages::AcceptSync; -use omnipaxos::messages::Accepted; -use omnipaxos::messages::Decide; -use omnipaxos::messages::FirstAccept; -use omnipaxos::messages::Message; -use omnipaxos::messages::PaxosMsg; -use omnipaxos::messages::Prepare; -use omnipaxos::messages::Promise; -use omnipaxos::paxos::ProposeErr; -use omnipaxos::storage::memory_storage::MemorySequence; -use omnipaxos::storage::memory_storage::MemoryState; -use omnipaxos::utils::hocon_kv::CONFIG_ID; -use omnipaxos::utils::hocon_kv::HB_DELAY; -use omnipaxos::utils::hocon_kv::INITIAL_DELAY_FACTOR; -use omnipaxos::utils::hocon_kv::LOG_FILE_PATH; -use omnipaxos::utils::hocon_kv::PID; -use omnipaxos::utils::hocon_kv::PRIORITY; -use omnipaxos::utils::logger::create_logger; -type OmniPaxos = omnipaxos::paxos::OmniPaxos, MemoryState>; - -use arc_runtime::prelude::*; - -use std::collections::HashMap; -use std::collections::VecDeque; -use std::time::Duration; - -use crate::port::BallotPort; - -const START_TIMEOUT: Duration = Duration::from_millis(1000); -const REGISTRATION_TIMEOUT: Duration = Duration::from_millis(1000); -const STOP_COMPONENT_TIMEOUT: Duration = Duration::from_millis(1000); -const BLE_TIMER_TIMEOUT: Duration = Duration::from_millis(100); - -#[derive(ComponentDefinition, Deref, DerefMut)] -pub struct BallotLeaderElectionComp { - ctx: ComponentContext, - ble_port: ProvidedPort, - pub(crate) peers: HashMap>, - pub leader: Option, - timer: Option, - pub(crate) asks: VecDeque>, - #[deref] - #[deref_mut] - ble: BallotLeaderElection, -} - -impl BallotLeaderElectionComp { - pub fn new(ble: BallotLeaderElection) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - ble_port: ProvidedPort::uninitialised(), - peers: HashMap::new(), - leader: None, - timer: None, - ble, - asks: VecDeque::new(), - } - } - - fn send_outgoing_msgs(&mut self) { - for msg in self.ble.get_outgoing_msgs() { - self.peers.get(&msg.to).unwrap().tell(msg) - } - } - - fn answer_future(&mut self, b: Ballot) { - if let Some(ask) = self.asks.pop_front() { - ask.reply(b).unwrap(); - } - } -} - -impl Actor for BallotLeaderElectionComp { - type Message = BLEMessage; - - fn receive_local(&mut self, msg: Self::Message) -> Handled { - self.ble.handle(msg); - Handled::Ok - } - - fn receive_network(&mut self, msg: NetMessage) -> Handled { - todo!() - } -} - -impl ComponentLifecycle for BallotLeaderElectionComp { - fn on_start(&mut self) -> Handled { - self.ble.new_hb_round(); - self.timer = self - .schedule_periodic(BLE_TIMER_TIMEOUT, BLE_TIMER_TIMEOUT, move |c, _| { - if let Some(l) = c.ble.tick() { - c.answer_future(l); - c.ble_port.trigger(l); - } - c.send_outgoing_msgs(); - Handled::Ok - }) - .into(); - Handled::Ok - } - - fn on_stop(&mut self) -> Handled { - if let Some(timer) = self.timer.take() { - self.cancel_timer(timer); - } - Handled::Ok - } - - fn on_kill(&mut self) -> Handled { - Handled::Ok - } -} - -impl Provide for BallotLeaderElectionComp { - fn handle(&mut self, _: Never) -> Handled { - // ignore - Handled::Ok - } -} diff --git a/arc-runtime/examples/consensus/src/config.rs b/arc-runtime/examples/consensus/src/config.rs deleted file mode 100644 index 5d7feca45..000000000 --- a/arc-runtime/examples/consensus/src/config.rs +++ /dev/null @@ -1,33 +0,0 @@ -use hocon::Error; -use hocon::Hocon; -use hocon::HoconLoader; - -use std::time::Duration; - -pub struct Config { - pub wait_timeout: Duration, - pub num_threads: usize, - pub num_nodes: usize, - pub ble_hb_delay: u64, - pub ble_initial_delay_factor: Option, - pub num_proposals: u64, - pub num_elections: u64, - pub gc_idx: u64, -} - -impl Config { - pub fn load(path: &str) -> Result { - let cfg = HoconLoader::new().load_file(path)?.hocon()?; - - Ok(Config { - wait_timeout: cfg["wait_timeout"].as_duration().unwrap_or_default(), - num_threads: cfg["num_threads"].as_i64().unwrap_or_default() as usize, - num_nodes: cfg["num_nodes"].as_i64().unwrap_or_default() as usize, - ble_hb_delay: cfg["ble_hb_delay"].as_i64().unwrap_or_default() as u64, - num_proposals: cfg["num_proposals"].as_i64().unwrap_or_default() as u64, - num_elections: cfg["num_elections"].as_i64().unwrap_or_default() as u64, - gc_idx: cfg["gc_idx"].as_i64().unwrap_or_default() as u64, - ble_initial_delay_factor: cfg["ble_initial_delay_factor"].as_i64().map(|x| x as u64), - }) - } -} diff --git a/arc-runtime/examples/consensus/src/main.rs b/arc-runtime/examples/consensus/src/main.rs deleted file mode 100644 index a0bbc77f1..000000000 --- a/arc-runtime/examples/consensus/src/main.rs +++ /dev/null @@ -1,64 +0,0 @@ -#![allow(unused)] - -mod ble; -mod config; -mod omni; -mod port; -mod state; -mod system; - -use crate::config::Config; -use crate::state::State; -use crate::system::System; - -use kompact::prelude::*; -use omnipaxos::leader_election::ballot_leader_election::Ballot; -use omnipaxos::storage::Entry; -use rand::Rng; - -use arc_runtime::prelude::*; - -fn main() { - let config = Config::load("omnipaxos.conf").unwrap(); - let ble_initial_leader = None; - - let system = System::new( - config.num_nodes, - config.num_threads, - config.ble_hb_delay, - config.ble_initial_delay_factor, - ble_initial_leader, - ); - - let node = system.nodes.get(&1).unwrap(); - - let (ble_promise, ble_future) = promise(); - node.ble - .on_definition(|c| c.asks.push_back(Ask::new(ble_promise, ()))); - - system.start_all_nodes(); - - let elected_leader = ble_future.wait_timeout(config.wait_timeout).unwrap(); - - let mut proposal_node: u64; - - loop { - proposal_node = rand::thread_rng().gen_range(1..=config.num_nodes as u64); - - if proposal_node != elected_leader.pid { - break; - } - } - - let node = system.nodes.get(&proposal_node).unwrap(); - - let (omni_promise, omni_future) = promise(); - node.omni.on_definition(|c| { - c.asks.push_back(Ask::new(omni_promise, ())); - c.propose_normal(State::new("abc".to_owned(), 123)).unwrap(); - }); - - omni_future.wait_timeout(config.wait_timeout).unwrap(); - - system.kompact.shutdown(); -} diff --git a/arc-runtime/examples/consensus/src/omni.rs b/arc-runtime/examples/consensus/src/omni.rs deleted file mode 100644 index 3e52b6d62..000000000 --- a/arc-runtime/examples/consensus/src/omni.rs +++ /dev/null @@ -1,129 +0,0 @@ -use kompact::prelude::*; - -use kompact::config_keys::system::LABEL; -use kompact::config_keys::system::THREADS; -use kompact::executors::crossbeam_workstealing_pool; - -use omnipaxos::leader_election::ballot_leader_election::messages::BLEMessage; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatMsg; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatReply; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatRequest; -use omnipaxos::leader_election::ballot_leader_election::Ballot; -use omnipaxos::leader_election::ballot_leader_election::BallotLeaderElection; -use omnipaxos::messages::AcceptDecide; -use omnipaxos::messages::AcceptSync; -use omnipaxos::messages::Accepted; -use omnipaxos::messages::Decide; -use omnipaxos::messages::FirstAccept; -use omnipaxos::messages::Message; -use omnipaxos::messages::PaxosMsg; -use omnipaxos::messages::Prepare; -use omnipaxos::messages::Promise; -use omnipaxos::paxos::ProposeErr; -use omnipaxos::storage::memory_storage::MemorySequence; -use omnipaxos::storage::memory_storage::MemoryState; -use omnipaxos::storage::Entry; -use omnipaxos::storage::PaxosState; -use omnipaxos::storage::Sequence; -use omnipaxos::storage::StopSign; -use omnipaxos::utils::hocon_kv::CONFIG_ID; -use omnipaxos::utils::hocon_kv::HB_DELAY; -use omnipaxos::utils::hocon_kv::INITIAL_DELAY_FACTOR; -use omnipaxos::utils::hocon_kv::LOG_FILE_PATH; -use omnipaxos::utils::hocon_kv::PID; -use omnipaxos::utils::hocon_kv::PRIORITY; -use omnipaxos::utils::logger::create_logger; -type OmniPaxos = omnipaxos::paxos::OmniPaxos, MemoryState>; - -use arc_runtime::prelude::*; - -use crate::port::BallotPort; - -use std::collections::HashMap; -use std::collections::VecDeque; - -use std::time::Duration; - -use std::ops::Deref; -use std::ops::DerefMut; - -const OMNI_TIMER_TIMEOUT: Duration = Duration::from_millis(1); - -#[derive(ComponentDefinition, Deref, DerefMut)] -pub struct OmniPaxosComp { - ctx: ComponentContext, - ble_port: RequiredPort, - pub(crate) peers: HashMap>>, - timer: Option, - pub(crate) asks: VecDeque>>, - #[deref] - #[deref_mut] - paxos: OmniPaxos, -} - -impl OmniPaxosComp { - pub fn new(paxos: OmniPaxos) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - ble_port: RequiredPort::uninitialised(), - peers: HashMap::new(), - timer: None, - paxos, - asks: VecDeque::new(), - } - } - - pub fn send_outgoing_msgs(&mut self) { - for msg in self.paxos.get_outgoing_msgs() { - self.peers.get(&msg.to).unwrap().tell(msg); - } - } - - fn answer_future(&mut self) { - if !self.asks.is_empty() { - for entry in self.paxos.get_latest_decided_entries() { - self.asks.pop_front().unwrap().reply(entry.clone()); - } - } - } -} - -impl Actor for OmniPaxosComp { - type Message = Message; - - fn receive_local(&mut self, msg: Self::Message) -> Handled { - self.paxos.handle(msg); - Handled::Ok - } - - fn receive_network(&mut self, msg: NetMessage) -> Handled { - todo!() - } -} - -impl ComponentLifecycle for OmniPaxosComp { - fn on_start(&mut self) -> Handled { - self.timer = self - .schedule_periodic(OMNI_TIMER_TIMEOUT, OMNI_TIMER_TIMEOUT, move |c, _| { - c.send_outgoing_msgs(); - c.answer_future(); - Handled::Ok - }) - .into(); - Handled::Ok - } - - fn on_kill(&mut self) -> Handled { - if let Some(timer) = self.timer.take() { - self.cancel_timer(timer); - } - Handled::Ok - } -} - -impl Require for OmniPaxosComp { - fn handle(&mut self, msg: Ballot) -> Handled { - self.paxos.handle_leader(msg); - Handled::Ok - } -} diff --git a/arc-runtime/examples/consensus/src/port.rs b/arc-runtime/examples/consensus/src/port.rs deleted file mode 100644 index 91d1c200d..000000000 --- a/arc-runtime/examples/consensus/src/port.rs +++ /dev/null @@ -1,39 +0,0 @@ -use kompact::prelude::*; - -use kompact::config_keys::system::LABEL; -use kompact::config_keys::system::THREADS; -use kompact::executors::crossbeam_workstealing_pool; - -use omnipaxos::leader_election::ballot_leader_election::messages::BLEMessage; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatMsg; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatReply; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatRequest; -use omnipaxos::leader_election::ballot_leader_election::Ballot; -use omnipaxos::leader_election::ballot_leader_election::BallotLeaderElection; -use omnipaxos::messages::AcceptDecide; -use omnipaxos::messages::AcceptSync; -use omnipaxos::messages::Accepted; -use omnipaxos::messages::Decide; -use omnipaxos::messages::FirstAccept; -use omnipaxos::messages::Message; -use omnipaxos::messages::PaxosMsg; -use omnipaxos::messages::Prepare; -use omnipaxos::messages::Promise; -use omnipaxos::paxos::ProposeErr; -use omnipaxos::storage::memory_storage::MemorySequence; -use omnipaxos::storage::memory_storage::MemoryState; -use omnipaxos::utils::hocon_kv::CONFIG_ID; -use omnipaxos::utils::hocon_kv::HB_DELAY; -use omnipaxos::utils::hocon_kv::INITIAL_DELAY_FACTOR; -use omnipaxos::utils::hocon_kv::LOG_FILE_PATH; -use omnipaxos::utils::hocon_kv::PID; -use omnipaxos::utils::hocon_kv::PRIORITY; -use omnipaxos::utils::logger::create_logger; -type OmniPaxos = omnipaxos::paxos::OmniPaxos, MemoryState>; - -pub struct BallotPort; - -impl Port for BallotPort { - type Indication = Ballot; - type Request = Never; -} diff --git a/arc-runtime/examples/consensus/src/state.rs b/arc-runtime/examples/consensus/src/state.rs deleted file mode 100644 index 852d58269..000000000 --- a/arc-runtime/examples/consensus/src/state.rs +++ /dev/null @@ -1,14 +0,0 @@ -use arc_runtime::prelude::*; - -#[derive(Clone, Debug, New)] -pub struct State { - pub key: String, - pub value: u64, -} - -impl IntoSendable for State { - type T = State; - fn into_sendable(self) -> Self::T { - todo!() - } -} diff --git a/arc-runtime/examples/consensus/src/system.rs b/arc-runtime/examples/consensus/src/system.rs deleted file mode 100644 index 9f9197fbf..000000000 --- a/arc-runtime/examples/consensus/src/system.rs +++ /dev/null @@ -1,173 +0,0 @@ -use kompact::prelude::*; - -use kompact::config_keys::system::LABEL; -use kompact::config_keys::system::THREADS; -use kompact::executors::crossbeam_workstealing_pool; - -use omnipaxos::leader_election::ballot_leader_election::messages::BLEMessage; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatMsg; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatReply; -use omnipaxos::leader_election::ballot_leader_election::messages::HeartbeatRequest; -use omnipaxos::leader_election::ballot_leader_election::Ballot; -use omnipaxos::leader_election::ballot_leader_election::BallotLeaderElection; -use omnipaxos::messages::AcceptDecide; -use omnipaxos::messages::AcceptSync; -use omnipaxos::messages::Accepted; -use omnipaxos::messages::Decide; -use omnipaxos::messages::FirstAccept; -use omnipaxos::messages::Message; -use omnipaxos::messages::PaxosMsg; -use omnipaxos::messages::Prepare; -use omnipaxos::messages::Promise; -use omnipaxos::paxos::ProposeErr; -use omnipaxos::storage::memory_storage::MemorySequence; -use omnipaxos::storage::memory_storage::MemoryState; -use omnipaxos::utils::hocon_kv::CONFIG_ID; -use omnipaxos::utils::hocon_kv::HB_DELAY; -use omnipaxos::utils::hocon_kv::INITIAL_DELAY_FACTOR; -use omnipaxos::utils::hocon_kv::LOG_FILE_PATH; -use omnipaxos::utils::hocon_kv::PID; -use omnipaxos::utils::hocon_kv::PRIORITY; -use omnipaxos::utils::logger::create_logger; -type OmniPaxos = omnipaxos::paxos::OmniPaxos, MemoryState>; -use std::pin::Pin - -use arc_runtime::prelude::*; - -use std::collections::HashMap; -use std::time::Duration; - -use crate::ble::BallotLeaderElectionComp; -use crate::omni::OmniPaxosComp; - -const START_TIMEOUT: Duration = Duration::from_millis(1000); -const REGISTRATION_TIMEOUT: Duration = Duration::from_millis(1000); -const STOP_COMPONENT_TIMEOUT: Duration = Duration::from_millis(1000); -const BLE_TIMER_TIMEOUT: Duration = Duration::from_millis(100); - -pub struct System { - pub(crate) kompact: KompactSystem, - pub(crate) nodes: HashMap>, -} - -#[derive(New)] -pub struct Node { - pub ble: Arc>, - pub omni: Arc>>, -} - -fn build_kompact_system(num_threads: usize) -> KompactSystem { - let mut conf = KompactConfig::default(); - conf.set_config_value(&THREADS, num_threads); - - match num_threads { - _ if num_threads <= 32 => conf.executor(|t| crossbeam_workstealing_pool::small_pool(t)), - _ if num_threads <= 64 => conf.executor(|t| crossbeam_workstealing_pool::large_pool(t)), - _ => conf.executor(|t| crossbeam_workstealing_pool::dyn_pool(t)), - }; - - let mut net = NetworkConfig::default(); - net.set_tcp_nodelay(true); - - conf.system_components(DeadletterBox::new, net.build()); - conf.build().unwrap() -} - -impl System { - pub fn new( - num_nodes: usize, - num_threads: usize, - ble_hb_delay: u64, - ble_initial_delay_factor: Option, - ble_initial_leader: Option, - ) -> Self { - let kompact = build_kompact_system(num_threads); - - let mut nodes = HashMap::new(); - let mut pids = (1..=num_nodes as u64).collect::>(); - let mut ble_refs = HashMap::new(); - let mut omni_refs = HashMap::new(); - - for pid in 1..=num_nodes as u64 { - let mut peer_pids = pids.clone(); - peer_pids.retain(|peer| peer != &pid); - - let priority = None; - let logger = None; - let log_file_path = None; - - let (ble_comp, ble_path) = kompact.create_and_register(|| { - BallotLeaderElectionComp::new(BallotLeaderElection::with( - pid, - peer_pids.clone(), - priority, - ble_hb_delay, - ble_initial_leader, - ble_initial_delay_factor, - logger, - log_file_path, - )) - }); - - let config_id = 1; - let skip_prepare_use_leader = None; - let logger = None; - let log_file_path = None; - - let (omni_comp, omni_path) = kompact.create_and_register(|| { - OmniPaxosComp::new(OmniPaxos::with( - config_id, - pid, - peer_pids.clone(), - skip_prepare_use_leader, - logger, - log_file_path, - )) - }); - - biconnect_components(&ble_comp, &omni_comp); - - ble_path.wait_timeout(REGISTRATION_TIMEOUT).unwrap(); - omni_path.wait_timeout(REGISTRATION_TIMEOUT).unwrap(); - - ble_refs.insert(pid, ble_comp.actor_ref()); - omni_refs.insert(pid, omni_comp.actor_ref()); - - nodes.insert(pid, Node::new(ble_comp, omni_comp)); - } - - for node in nodes.values() { - node.ble.on_definition(|c| c.peers = ble_refs.clone()); - node.omni.on_definition(|c| c.peers = omni_refs.clone()); - } - - Self { kompact, nodes } - } - - pub fn start_all_nodes(&self) { - for node in self.nodes.values() { - self.kompact - .stop_notify(&node.ble) - .wait_timeout(STOP_COMPONENT_TIMEOUT) - .unwrap(); - - self.kompact - .start_notify(&node.omni) - .wait_timeout(START_TIMEOUT) - .unwrap(); - } - } - - pub fn kill_node(&mut self, id: u64) { - let node = self.nodes.remove(&id).unwrap(); - self.kompact - .kill_notify(node.ble) - .wait_timeout(STOP_COMPONENT_TIMEOUT) - .unwrap(); - - self.kompact - .kill_notify(node.omni) - .wait_timeout(STOP_COMPONENT_TIMEOUT) - .unwrap(); - } -} diff --git a/arc-runtime/examples/remote/Cargo.lock b/arc-runtime/examples/remote/Cargo.lock deleted file mode 100644 index c5d68aa28..000000000 --- a/arc-runtime/examples/remote/Cargo.lock +++ /dev/null @@ -1,2126 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom 0.2.3", - "once_cell", - "version_check 0.9.4", -] - -[[package]] -name = "aho-corasick" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" -dependencies = [ - "memchr", -] - -[[package]] -name = "arc-runtime" -version = "0.0.0" -dependencies = [ - "arrayvec", - "async-recursion", - "comet", - "coz", - "crossfire", - "derive_more", - "dyn-clone", - "erased-serde", - "hierarchical_hash_wheel_timer", - "kompact", - "lazy_static", - "paste", - "rand 0.8.4", - "slog", - "time 0.2.27", - "tokio", - "uuid", -] - -[[package]] -name = "arc-swap" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabe5a181f83789739c194cbe5a897dde195078fac08568d09221fd6137a7ba8" - -[[package]] -name = "arr_macro" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a105bfda48707cf19220129e78fca01e9639433ffaef4163546ed8fb04120a5" -dependencies = [ - "arr_macro_impl", - "proc-macro-hack", -] - -[[package]] -name = "arr_macro_impl" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609c78bd572f4edc74310dfb63a01f5609d53fa8b4dd7c4d98aef3b3e8d72d1" -dependencies = [ - "proc-macro-hack", - "quote", - "syn", -] - -[[package]] -name = "arrayvec" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" - -[[package]] -name = "as_num" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62eaa19b325e1b3dc2f7b9b6de544dd536619e3dcf986fc391b2c643f10d68c0" - -[[package]] -name = "async-channel" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-executor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "once_cell", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" -dependencies = [ - "async-channel", - "async-executor", - "async-io", - "async-mutex", - "blocking", - "futures-lite", - "num_cpus", - "once_cell", -] - -[[package]] -name = "async-io" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" -dependencies = [ - "concurrent-queue", - "futures-lite", - "libc", - "log", - "once_cell", - "parking", - "polling", - "slab", - "socket2", - "waker-fn", - "winapi", -] - -[[package]] -name = "async-lock" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-mutex" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-recursion" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "async-std" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" -dependencies = [ - "async-channel", - "async-global-executor", - "async-io", - "async-lock", - "crossbeam-utils 0.8.6", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "num_cpus", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-task" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" - -[[package]] -name = "async-trait" -version = "0.1.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "atomic" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "atomic-waker" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" - -[[package]] -name = "backtrace" -version = "0.3.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" -dependencies = [ - "addr2line", - "cc", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base-x" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitfields" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a0dd3fdef66457be053e25548d0f9b75f389547c897739daa13d39db01bf0a" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitmaps" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" -dependencies = [ - "typenum", -] - -[[package]] -name = "blocking" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427" -dependencies = [ - "async-channel", - "async-task", - "atomic-waker", - "fastrand", - "futures-lite", - "once_cell", -] - -[[package]] -name = "bumpalo" -version = "3.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" - -[[package]] -name = "bytes" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" -dependencies = [ - "serde", -] - -[[package]] -name = "cache-padded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" - -[[package]] -name = "cc" -version = "1.0.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "time 0.1.43", - "winapi", -] - -[[package]] -name = "comet" -version = "0.1.0" -source = "git+https://github.com/Starlight-JS/comet?branch=multi-threaded#716b34c70c469178008727699d132a2ebd41f1e6" -dependencies = [ - "ahash", - "atomic", - "bit-vec", - "crossbeam 0.8.1", - "flume", - "hashbrown", - "im", - "libc", - "memx", - "mopa", - "parking_lot", - "rand 0.8.4", - "rosalloc", - "scoped_threadpool", - "threadfin", - "winapi", -] - -[[package]] -name = "concurrent-queue" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" -dependencies = [ - "cache-padded", -] - -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - -[[package]] -name = "coz" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef55b3fe2f5477d59e12bc792e8b3c95a25bd099eadcfae006ecea136de76e2" -dependencies = [ - "libc", - "once_cell", -] - -[[package]] -name = "crossbeam" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-channel 0.4.4", - "crossbeam-deque 0.7.4", - "crossbeam-epoch 0.8.2", - "crossbeam-queue 0.2.3", - "crossbeam-utils 0.7.2", -] - -[[package]] -name = "crossbeam" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-channel 0.5.2", - "crossbeam-deque 0.8.1", - "crossbeam-epoch 0.9.6", - "crossbeam-queue 0.3.3", - "crossbeam-utils 0.8.6", -] - -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", -] - -[[package]] -name = "crossbeam-deque" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" -dependencies = [ - "crossbeam-epoch 0.8.2", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch 0.9.6", - "crossbeam-utils 0.8.6", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "lazy_static", - "maybe-uninit", - "memoffset 0.5.6", - "scopeguard", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", - "lazy_static", - "memoffset 0.6.5", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" -dependencies = [ - "crossbeam-utils 0.6.6", -] - -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b979d76c9fcb84dffc80a73f7290da0f83e4c95773494674cb44b76d13a7a110" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", -] - -[[package]] -name = "crossbeam-utils" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" -dependencies = [ - "cfg-if 0.1.10", - "lazy_static", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120" -dependencies = [ - "cfg-if 1.0.0", - "lazy_static", -] - -[[package]] -name = "crossfire" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c0493a3bfdcd4102975721ca3a958e0e5b31203ed50093d396819519f8ef24" -dependencies = [ - "async-trait", - "crossbeam 0.7.3", - "futures", -] - -[[package]] -name = "ctor" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if 1.0.0", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - -[[package]] -name = "dyn-clone" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" - -[[package]] -name = "encoding" -version = "0.2.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" -dependencies = [ - "encoding-index-japanese", - "encoding-index-korean", - "encoding-index-simpchinese", - "encoding-index-singlebyte", - "encoding-index-tradchinese", -] - -[[package]] -name = "encoding-index-japanese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" -dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding-index-korean" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" -dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding-index-simpchinese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" -dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding-index-singlebyte" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" -dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding-index-tradchinese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" -dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding_index_tests" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" - -[[package]] -name = "erased-serde" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44a5d80251b806a14cd3e4e1a582e912d5cbf6904ab19fdefbd7a56adca088e1" -dependencies = [ - "serde", -] - -[[package]] -name = "event-listener" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" - -[[package]] -name = "executors" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99e7b1533b6caa2e16120bfc652aeb087c9197b1bf419edfc8587e6022f2fc9" -dependencies = [ - "arr_macro", - "async-task", - "crossbeam-channel 0.4.4", - "crossbeam-deque 0.7.4", - "crossbeam-utils 0.7.2", - "log", - "num_cpus", - "rand 0.7.3", - "synchronoise", - "threadpool", -] - -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "fastrand" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779d043b6a0b90cc4c0ed7ee380a6504394cee7efd7db050e3774eee387324b2" -dependencies = [ - "instant", -] - -[[package]] -name = "flume" -version = "0.10.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d04dafd11240188e146b6f6476a898004cace3be31d4ec5e08e216bf4947ac0" -dependencies = [ - "futures-core", - "futures-sink", - "nanorand", - "pin-project", - "spin", -] - -[[package]] -name = "futures" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28560757fe2bb34e79f907794bb6b22ae8b0e5c669b638a1132f2592b19035b4" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3dda0b6588335f360afc675d0564c17a77a2bda81ca178a4b6081bd86c7f0b" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7" - -[[package]] -name = "futures-executor" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d6d2ff5bb10fb95c85b8ce46538a2e5f5e7fdc755623a7d4529ab8a4ed9d2a" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2" - -[[package]] -name = "futures-lite" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-macro" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3055baccb68d74ff6480350f8d6eb8fcfa3aa11bdc1a1ae3afdd0514617d508" - -[[package]] -name = "futures-task" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72" - -[[package]] -name = "futures-util" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "libc", - "wasi 0.10.2+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" - -[[package]] -name = "gloo-timers" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f16c88aa13d2656ef20d1c042086b8767bbe2bdb62526894275a1b062161b2e" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hierarchical_hash_wheel_timer" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58ffa8e952c33857fbaad0fab19d41ecd3a7a68c15c4e7b79c698e6379ded79" -dependencies = [ - "crossbeam-channel 0.5.2", - "rustc-hash", - "uuid", -] - -[[package]] -name = "hocon" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8249bcd360b81ac97a9c42fe46e08c520f0c9942a16cae6670979e6ea1759b4" -dependencies = [ - "failure", - "java-properties", - "memchr", - "nom", - "serde_path_to_error", - "uuid", -] - -[[package]] -name = "im" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111c1983f3c5bb72732df25cddacee9b546d08325fb584b5ebd38148be7b0246" -dependencies = [ - "bitmaps", - "rand_core 0.5.1", - "rand_xoshiro", - "sized-chunks", - "typenum", - "version_check 0.9.4", -] - -[[package]] -name = "indexmap" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - -[[package]] -name = "itoa" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" - -[[package]] -name = "java-properties" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20e9b11dedd144ceb96484add3f9088c131795e4295ce51448ef755e0ec19c07" -dependencies = [ - "encoding", - "lazy_static", - "regex", -] - -[[package]] -name = "js-sys" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "kompact" -version = "0.10.1" -source = "git+https://github.com/segeljakt/kompact#bb1d33c9bd406fe356b5288d9dd682f65b54265b" -dependencies = [ - "arc-swap", - "as_num", - "async-std", - "bitfields", - "bytes", - "crossbeam-channel 0.4.4", - "crossbeam-queue 0.2.3", - "crossbeam-utils 0.7.2", - "executors", - "futures", - "hierarchical_hash_wheel_timer", - "hocon", - "iovec", - "kompact-actor-derive", - "kompact-component-derive", - "log", - "mio", - "num_cpus", - "oncemutex", - "owning_ref", - "rustc-hash", - "rustc_version 0.2.3", - "serde", - "slog", - "slog-async", - "slog-term", - "synchronoise", - "uuid", -] - -[[package]] -name = "kompact-actor-derive" -version = "0.10.1" -source = "git+https://github.com/segeljakt/kompact#bb1d33c9bd406fe356b5288d9dd682f65b54265b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "kompact-component-derive" -version = "0.10.1" -source = "git+https://github.com/segeljakt/kompact#bb1d33c9bd406fe356b5288d9dd682f65b54265b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.112" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" - -[[package]] -name = "lock_api" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", - "value-bag", -] - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "memchr" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" - -[[package]] -name = "memoffset" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memx" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902bfec851b10e18f2d749bb2a6ea639fa725383575a2737ffd2a8ac4f2ae01a" -dependencies = [ - "rustc_version 0.4.0", -] - -[[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg", -] - -[[package]] -name = "mio" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" -dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", -] - -[[package]] -name = "mopa" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a785740271256c230f57462d3b83e52f998433a7062fc18f96d5999474a9f915" - -[[package]] -name = "nanorand" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729eb334247daa1803e0a094d0a5c55711b85571179f5ec6e53eccfdf7008958" -dependencies = [ - "getrandom 0.2.3", -] - -[[package]] -name = "nom" -version = "4.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" -dependencies = [ - "memchr", - "version_check 0.1.5", -] - -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" - -[[package]] -name = "oncemutex" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d11de466f4a3006fe8a5e7ec84e93b79c70cb992ae0aa0eb631ad2df8abfe2" - -[[package]] -name = "owning_ref" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" -dependencies = [ - "stable_deref_trait", -] - -[[package]] -name = "parking" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", -] - -[[package]] -name = "paste" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" - -[[package]] -name = "pin-project" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "polling" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "log", - "wepoll-ffi", - "winapi", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" - -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro2" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "quote" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47aa80447ce4daf1717500037052af176af5d38cc3e571d9ec1c7353fc10c87d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - -[[package]] -name = "rand" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", - "rand_hc 0.3.1", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom 0.2.3", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core 0.6.3", -] - -[[package]] -name = "rand_xoshiro" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9fcdd2e881d02f1d9390ae47ad8e5696a9e4be7b547a1da2afbc61973217004" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "redox_syscall" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" -dependencies = [ - "getrandom 0.2.3", - "redox_syscall", -] - -[[package]] -name = "regex" -version = "1.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" - -[[package]] -name = "remote" -version = "0.1.0" -dependencies = [ - "arc-runtime", - "lazy_static", -] - -[[package]] -name = "rosalloc" -version = "0.1.0" -source = "git+https://github.com/playxe/rosalloc#ac11a8684b5c1d8e043cf33a153de0fa9e9564e4" -dependencies = [ - "indexmap", - "libc", - "memx", - "parking_lot", - "thread_local", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.4", -] - -[[package]] -name = "rustversion" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" - -[[package]] -name = "ryu" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" - -[[package]] -name = "scoped_threadpool" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012" - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "serde" -version = "1.0.133" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" - -[[package]] -name = "serde_derive" -version = "1.0.133" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2bb9cd061c5865d345bb02ca49fcef1391741b672b54a0bf7b679badec3142" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_path_to_error" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd186dd4e1748b2798a2e86789dd77f5834ecda0bf15db76962e8e104bfc9bd" -dependencies = [ - "serde", -] - -[[package]] -name = "sha1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" - -[[package]] -name = "sized-chunks" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" -dependencies = [ - "bitmaps", - "typenum", -] - -[[package]] -name = "slab" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" - -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" - -[[package]] -name = "slog-async" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "766c59b252e62a34651412870ff55d8c4e6d04df19b43eecb2703e417b097ffe" -dependencies = [ - "crossbeam-channel 0.5.2", - "slog", - "take_mut", - "thread_local", -] - -[[package]] -name = "slog-term" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95c1e7e5aab61ced6006149ea772770b84a0d16ce0f7885def313e4829946d76" -dependencies = [ - "atty", - "chrono", - "slog", - "term", - "thread_local", -] - -[[package]] -name = "smallvec" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" - -[[package]] -name = "socket2" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "spin" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511254be0c5bcf062b019a6c89c01a664aa359ded62f78aa72c6fc137c0590e5" -dependencies = [ - "lock_api", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check 0.9.4", -] - -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1", - "syn", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - -[[package]] -name = "syn" -version = "1.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "synchronoise" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d717ed0efc9d39ab3b642a096bc369a3e02a38a51c41845d7fe31bdad1d6eaeb" -dependencies = [ - "crossbeam-queue 0.1.2", -] - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - -[[package]] -name = "take_mut" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" - -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", -] - -[[package]] -name = "thread_local" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" -dependencies = [ - "once_cell", -] - -[[package]] -name = "threadfin" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4b647a40fefe14511723ec89557e4469fb273f59dc13deccf48385091b45a1" -dependencies = [ - "crossbeam-channel 0.5.2", - "num_cpus", - "once_cell", - "waker-fn", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "rand 0.7.3", - "standback", - "stdweb", - "time-macros", - "version_check 0.9.4", - "winapi", -] - -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn", -] - -[[package]] -name = "tokio" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838" -dependencies = [ - "pin-project-lite", -] - -[[package]] -name = "typenum" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.3", -] - -[[package]] -name = "value-bag" -version = "1.0.0-alpha.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f" -dependencies = [ - "ctor", - "version_check 0.9.4", -] - -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - -[[package]] -name = "wasm-bindgen" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" -dependencies = [ - "cfg-if 1.0.0", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" - -[[package]] -name = "web-sys" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/arc-runtime/examples/remote/Cargo.toml b/arc-runtime/examples/remote/Cargo.toml deleted file mode 100644 index b294bdb46..000000000 --- a/arc-runtime/examples/remote/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "remote" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -arc-runtime = { path = "../../" } -lazy_static = { version = "1.4.0" } diff --git a/arc-runtime/examples/remote/application.conf b/arc-runtime/examples/remote/application.conf deleted file mode 100644 index e4b81492a..000000000 --- a/arc-runtime/examples/remote/application.conf +++ /dev/null @@ -1,9 +0,0 @@ -buncher { - batch-size = 100 - timeout = 100 ms -} - -omega { - initial-period = 10 ms - delta = 1 ms -} diff --git a/arc-runtime/examples/remote/src/main.rs b/arc-runtime/examples/remote/src/main.rs deleted file mode 100644 index 9204d6922..000000000 --- a/arc-runtime/examples/remote/src/main.rs +++ /dev/null @@ -1,128 +0,0 @@ -#![feature(arbitrary_self_types)] -#![allow(unused_mut)] -#![allow(unreachable_code)] - -use arc_runtime::channels::local::concurrent::channel; -use arc_runtime::channels::local::concurrent::Pullable; -use arc_runtime::channels::local::concurrent::Pushable; -use arc_runtime::prelude::*; - -lazy_static::lazy_static! { - static ref EXECUTOR: Executor = Executor::new(); -} - -#[derive(Actor, ComponentDefinition)] -struct Source + Data, T: Data> -where - ::IntoIter: Data, -{ - ctx: ComponentContext, - iter: I, - pushable: Pushable, -} -impl + Data, T: Data> Source -where - ::IntoIter: Data, -{ - fn new(iter: I, pushable: Pushable) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - iter, - pushable, - } - } - - async fn run(mut self: ComponentDefinitionAccess) -> Control<()> { - let i = self.iter.clone(); - for x in i { - self.pushable.push(x).await?; - } - Control::Finished - } -} - -#[derive(Actor, ComponentDefinition)] -struct Log { - ctx: ComponentContext, - pullable: Pullable, -} - -impl Log { - fn new(pullable: Pullable) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - pullable, - } - } - - async fn run(mut self: ComponentDefinitionAccess) -> Control<()> { - loop { - let data = self.pullable.pull().await?; -// info!(self.log(), "{:?}", data); - } - } -} - -impl + Data, T: Data> ComponentLifecycle for Source -where - ::IntoIter: Data, -{ - fn on_start(&mut self) -> Handled { - self.spawn_local(move |async_self| async move { - async_self.run().await; - Handled::DieNow - }); - Handled::Ok - } -} - -impl ComponentLifecycle for Log { - fn on_start(&mut self) -> Handled { - self.spawn_local(move |async_self| async move { - async_self.run().await; - Handled::DieNow - }); - Handled::Ok - } -} -fn source(i: I) -> Pullable -where - I: IntoIterator, - ::IntoIter: Data, -{ - let (a0, a1) = channel(&EXECUTOR); - EXECUTOR.create_task(move || Source::new(i, a0)); - a1 -} - -fn log(a: Pullable) { - EXECUTOR.create_task(move || Log::new(a)); -} - -fn read_stream() -> Pullable { - todo!() -} - -fn master() { - log(source(0..100)); -} - -fn worker() { - todo!() -} - -fn main() { - EXECUTOR.init({ - let mut cfg = KompactConfig::default(); - cfg.load_config_file("./application.conf"); - cfg.system_components(DeadletterBox::new, NetworkConfig::default().build()); - cfg.build().expect("KompactSystem") - }); - - match std::env::args().nth(1).as_ref().map(|x| x.as_str()) { - Some("--master") => master(), - Some("--worker") => worker(), - _ => panic!("Expected --master or --worker"), - } - EXECUTOR.await_termination(); -} diff --git a/arc-runtime/macros/src/lib.rs b/arc-runtime/macros/src/lib.rs deleted file mode 100644 index ad6fe1875..000000000 --- a/arc-runtime/macros/src/lib.rs +++ /dev/null @@ -1,317 +0,0 @@ -#![feature(proc_macro_span)] - -use proc_macro::TokenStream; -use proc_macro2 as pm2; - -mod proc_macro_derives; -mod proc_macro_attrs { - pub mod rewrite { - pub mod driver; - pub mod enums; - pub mod externs; - pub mod functions; - pub mod impls; - pub mod nonpersistent_tasks; - pub mod persistent_tasks; - pub mod structs; - } -} -mod proc_macros; - -#[proc_macro_derive(Abstract)] -pub fn derive_abstract(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_abstract(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro_derive(Collectable)] -pub fn derive_collectable(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_collectable(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro_derive(Finalize)] -pub fn derive_finalize(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_finalize(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro_derive(NoTrace)] -pub fn derive_notrace(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_notrace(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro_derive(Trace)] -pub fn derive_trace(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_trace(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro_derive(Garbage)] -pub fn derive_garbage(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_garbage(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro_derive(Alloc)] -pub fn derive_alloc(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_alloc(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro_derive(Send)] -pub fn derive_send(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_send(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro_derive(Sync)] -pub fn derive_sync(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_sync(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro_derive(Unpin)] -pub fn derive_unpin(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_unpin(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro_derive(NoSerde)] -pub fn derive_noserde(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_noserde(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro_derive(NoDebug)] -pub fn derive_nodebug(input: TokenStream) -> TokenStream { - proc_macro_derives::derive_nodebug(syn::parse_macro_input!(input as syn::DeriveInput)) -} - -#[proc_macro] -pub fn call(input: TokenStream) -> TokenStream { - proc_macros::call(syn::parse_macro_input!(input as syn::Expr)) -} - -#[proc_macro] -pub fn call_async(input: TokenStream) -> TokenStream { - proc_macros::call_async(syn::parse_macro_input!(input as syn::Expr)) -} - -#[proc_macro] -pub fn call_indirect(input: TokenStream) -> TokenStream { - proc_macros::call_indirect(syn::parse_macro_input!(input as syn::Expr)) -} - -/// Enwraps a value into an enum-variant. -/// -/// ``` -/// use arc_runtime::prelude::*; -/// mod foo { -/// use arc_runtime::prelude::*; -/// #[rewrite] -/// pub enum Bar { -/// Baz(i32), -/// Qux(i32) -/// } -/// } -/// let x = enwrap!(foo::Bar::Baz, 5); -/// ``` -#[proc_macro] -pub fn enwrap(input: TokenStream) -> TokenStream { - proc_macros::enwrap(input) -} - -/// Returns `true` if enum is a certain variant, else `false`. -/// -/// ``` -/// use arc_runtime::prelude::*; -/// mod foo { -/// use arc_runtime::prelude::*; -/// #[rewrite] -/// pub enum Bar { -/// Baz(i32), -/// Qux(i32) -/// } -/// } -/// -/// let x = enwrap!(foo::Bar::Baz, 5); -/// assert!(is!(foo::Bar::Baz, x)); -/// ``` -#[proc_macro] -pub fn is(input: TokenStream) -> TokenStream { - proc_macros::is(input) -} - -/// Unwraps a value out of an enum-variant. -/// -/// ``` -/// use arc_runtime::prelude::*; -/// mod foo { -/// use arc_runtime::prelude::*; -/// #[rewrite] -/// pub enum Bar { -/// Baz(i32), -/// Qux(i32) -/// } -/// } -/// -/// let x = enwrap!(foo::Bar::Baz, 5); -/// let y = unwrap!(foo::Bar::Baz, x); -/// ``` -#[proc_macro] -pub fn unwrap(input: TokenStream) -> TokenStream { - proc_macros::unwrap(input) -} - -/// Constructs a struct. -/// -/// ``` -/// use arc_runtime::prelude::*; -/// mod foo { -/// use arc_runtime::prelude::*; -/// #[rewrite] -/// pub struct Bar { -/// x: i32, -/// y: i32 -/// } -/// } -/// let x = new!(foo::Bar { x: i32, y: i32 }); -/// ``` -#[proc_macro] -pub fn new(input: TokenStream) -> TokenStream { - proc_macros::new(input) -} - -#[proc_macro] -pub fn vector(input: TokenStream) -> TokenStream { - proc_macros::vector(input) -} - -#[proc_macro] -pub fn erase(input: TokenStream) -> TokenStream { - proc_macros::erase(input) -} - -#[proc_macro] -pub fn unerase(input: TokenStream) -> TokenStream { - proc_macros::unerase(input) -} - -#[proc_macro] -pub fn push(input: TokenStream) -> TokenStream { - proc_macros::push(input) -} - -#[proc_macro] -pub fn pull(input: TokenStream) -> TokenStream { - proc_macros::pull(input) -} - -#[proc_macro] -pub fn pull_transition(input: TokenStream) -> TokenStream { - proc_macros::pull_transition(input) -} - -#[proc_macro] -pub fn push_transition(input: TokenStream) -> TokenStream { - proc_macros::push_transition(input) -} - -#[proc_macro] -pub fn transition(input: TokenStream) -> TokenStream { - proc_macros::transition(input) -} - -#[proc_macro] -pub fn terminate(input: TokenStream) -> TokenStream { - proc_macros::terminate(input) -} - -#[proc_macro] -pub fn wait(input: TokenStream) -> TokenStream { - proc_macros::wait(input) -} - -#[proc_macro_attribute] -pub fn rewrite(attr: TokenStream, input: TokenStream) -> TokenStream { - let attr = syn::parse_macro_input!(attr as syn::AttributeArgs); - let item = syn::parse_macro_input!(input as syn::Item); - match item { - syn::Item::Enum(item) => proc_macro_attrs::rewrite::enums::rewrite(attr, item), - syn::Item::Struct(item) => proc_macro_attrs::rewrite::structs::rewrite(attr, item), - syn::Item::Fn(item) if has_meta_name_val("unmangled", &get_metas(&attr)) => { - proc_macro_attrs::rewrite::externs::rewrite(attr, item) - } - syn::Item::Fn(item) - if item.sig.asyncness.is_some() && has_meta_key("nonpersistent", &get_metas(&attr)) => - { - proc_macro_attrs::rewrite::nonpersistent_tasks::rewrite(attr, item) - } - syn::Item::Mod(item) if has_meta_key("persistent", &get_metas(&attr)) => { - proc_macro_attrs::rewrite::persistent_tasks::rewrite(attr, item) - } - syn::Item::Fn(item) if has_meta_key("main", &get_metas(&attr)) => { - proc_macro_attrs::rewrite::driver::rewrite(attr, item) - } - syn::Item::Fn(item) => proc_macro_attrs::rewrite::functions::rewrite(attr, item), - syn::Item::Impl(item) => proc_macro_attrs::rewrite::impls::rewrite(attr, item), - _ => panic!("#[rewrite] expects an enum, struct, function, impl, or module as input."), - } -} - -pub(crate) fn new_id(s: impl ToString) -> syn::Ident { - syn::Ident::new(&s.to_string(), pm2::Span::call_site()) -} - -pub(crate) fn get_metas(attr: &[syn::NestedMeta]) -> Vec { - attr.into_iter() - .filter_map(|a| match a { - syn::NestedMeta::Meta(m) => Some(m.clone()), - _ => None, - }) - .collect() -} - -pub(crate) fn has_attr_key(name: &str, attr: &[syn::Attribute]) -> bool { - attr.iter() - .any(|a| matches!(a.parse_meta(), Ok(syn::Meta::Path(x)) if x.is_ident(name))) -} - -pub(crate) fn has_meta_key(name: &str, meta: &[syn::Meta]) -> bool { - meta.iter() - .any(|m| matches!(m, syn::Meta::Path(x) if x.is_ident(name))) -} - -pub(crate) fn has_meta_name_val(name: &str, meta: &[syn::Meta]) -> bool { - meta.iter() - .any(|m| matches!(m, syn::Meta::NameValue(x) if x.path.is_ident(name))) -} - -pub(crate) fn _has_nested_meta_key(name: &str, meta: &[syn::NestedMeta]) -> bool { - meta.iter().any(|m| match m { - syn::NestedMeta::Meta(syn::Meta::Path(x)) if x.is_ident(name) => true, - _ => false, - }) -} - -#[allow(unused)] -pub(crate) fn get_attr_val(name: &str, attr: &[syn::NestedMeta]) -> syn::Ident { - attr.iter() - .find_map(|arg| match arg { - syn::NestedMeta::Meta(meta) => match meta { - syn::Meta::NameValue(nv) if nv.path.is_ident(name) => match &nv.lit { - syn::Lit::Str(x) => { - Some(x.parse().expect("Expected attr value to be an identifier")) - } - _ => None, - }, - _ => None, - }, - syn::NestedMeta::Lit(_) => None, - }) - .unwrap_or_else(|| panic!("`{} = ` missing from identifiers", name)) -} - -pub(crate) fn split_name_type(params: Vec) -> (Vec, Vec) { - params - .into_iter() - .map(|p| match p { - syn::FnArg::Receiver(_) => unreachable!(), - syn::FnArg::Typed(p) => match *p.pat { - syn::Pat::Ident(i) => (i.ident, *p.ty), - _ => unreachable!(), - }, - }) - .unzip() -} diff --git a/arc-runtime/macros/src/proc_macro_attrs/rewrite/driver.rs b/arc-runtime/macros/src/proc_macro_attrs/rewrite/driver.rs deleted file mode 100644 index ebbb6f40a..000000000 --- a/arc-runtime/macros/src/proc_macro_attrs/rewrite/driver.rs +++ /dev/null @@ -1,49 +0,0 @@ -use proc_macro as pm; -use crate::new_id; - -pub(crate) fn rewrite(_attr: syn::AttributeArgs, item: syn::ItemFn) -> pm::TokenStream { - let block = &item.block; - let id = item.sig.ident; - let component_id = new_id(format!("{}Component", id)); - let run_id = new_id(format!("{}_run", id)); - - quote::quote! ( - - #[derive(ComponentDefinition, Actor)] - struct #component_id { - ctx: ComponentContext, - } - - impl #component_id { - fn new() -> Self { - Self { - ctx: ComponentContext::uninitialised() - } - } - } - - #[rewrite] - fn #run_id() { - #block - } - - impl ComponentLifecycle for #component_id { - fn on_start(&mut self) -> Handled { - let component = self.ctx().component(); - let mutator = instantiate_immix(ImmixOptions::default()); - let ctx = Context::new(component, mutator); - call!(#run_id()); - self.ctx().system().shutdown_async(); - Handled::DieNow - } - } - - pub fn #id() { - let system = KompactConfig::default().build().unwrap(); - let component = system.create(move || #component_id::new()); - system.start(&component); - system.await_termination(); - } - ) - .into() -} diff --git a/arc-runtime/macros/src/proc_macro_attrs/rewrite/enums.rs b/arc-runtime/macros/src/proc_macro_attrs/rewrite/enums.rs deleted file mode 100644 index 87227cef0..000000000 --- a/arc-runtime/macros/src/proc_macro_attrs/rewrite/enums.rs +++ /dev/null @@ -1,160 +0,0 @@ -//! Codegen for enums - -use proc_macro as pm; -use quote::quote; - -use crate::new_id; - -#[allow(unused)] -pub(crate) fn rewrite(_: syn::AttributeArgs, mut item: syn::ItemEnum) -> pm::TokenStream { - let (_, type_generics, where_clause) = item.generics.split_for_impl(); - - let mut sharable_impl_generics = item.generics.params.clone(); - let mut sendable_impl_generics = item.generics.params.clone(); - - sharable_impl_generics.iter_mut().for_each(|g| { - if let syn::GenericParam::Type(t) = g { - t.bounds.push(syn::parse_quote!(Sharable)) - } - }); - sendable_impl_generics.iter_mut().for_each(|g| { - if let syn::GenericParam::Type(t) = g { - t.bounds.push(syn::parse_quote!(Sendable)) - } - }); - let sharable_impl_generics = quote::quote!(<#sharable_impl_generics>); - let sendable_impl_generics = quote::quote!(<#sendable_impl_generics>); - - let into_generics: Vec<_> = item - .generics - .params - .iter() - .filter_map(|g| { - if let syn::GenericParam::Type(t) = g { - let id = &t.ident; - Some(quote::quote!(#id::T)) - } else { - None - } - }) - .collect(); - let into_generics = if into_generics.is_empty() { - quote::quote!() - } else { - quote::quote!(<#(#into_generics),*>) - }; - - let abstract_id = item.ident.clone(); - let concrete_id = new_id(format!("Concrete{}", abstract_id)); - let sharable_mod_id = new_id(format!("sharable_{}", abstract_id)); - let sendable_mod_id = new_id(format!("sendable_{}", abstract_id)); - - let mut concrete_sharable_item = item.clone(); - let mut concrete_sendable_item = item.clone(); - - concrete_sharable_item - .generics - .params - .iter_mut() - .for_each(|g| { - if let syn::GenericParam::Type(t) = g { - t.bounds.push(syn::parse_quote!(Sharable)) - } - }); - concrete_sendable_item - .generics - .params - .iter_mut() - .for_each(|g| { - if let syn::GenericParam::Type(t) = g { - t.bounds.push(syn::parse_quote!(Sendable)) - } - }); - - concrete_sharable_item.ident = concrete_id.clone(); - concrete_sendable_item.ident = concrete_id.clone(); - - concrete_sendable_item - .variants - .iter_mut() - .for_each(|f| { - f.fields.iter_mut().for_each(|f| { - let ty = f.ty.clone(); - if let syn::Type::Path(t) = &ty { - if !item.generics.params.iter().any(|x| match x { - syn::GenericParam::Type(x) => t.path.is_ident(&x.ident), - _ => false, - }) { - f.ty = syn::parse_quote!(<#ty as DynSharable>::T); - } - } else { - f.ty = syn::parse_quote!(<#ty as DynSharable>::T); - } - }) - }); - - let variant_id = concrete_sharable_item - .variants - .iter() - .map(|v| &v.ident) - .collect::>(); - - quote!( - - use arc_runtime::prelude::*; - pub mod #sharable_mod_id { - use super::*; - use arc_runtime::prelude::*; - - #[derive(Clone, Debug, Abstract, Send, Sync, Unpin, Alloc, Collectable, Finalize, Trace)] - pub struct #abstract_id #sharable_impl_generics (pub Gc<#concrete_id #type_generics>) #where_clause; - - #[derive(Clone, Debug, Collectable, Finalize, Trace)] - #concrete_sharable_item - } - - pub mod #sendable_mod_id { - use super::*; - use arc_runtime::prelude::*; - - #[derive(Clone, Debug, From, Abstract, Serialize, Deserialize)] - #[serde(bound = "")] - #[from(forward)] - pub struct #abstract_id #sendable_impl_generics(pub Box<#concrete_id #type_generics>) #where_clause; - - #[derive(Clone, Debug, Serialize, Deserialize)] - #[serde(bound = "")] - #concrete_sendable_item - } - - use #sharable_mod_id::#abstract_id; - use #sharable_mod_id::#concrete_id::*; - use #sharable_mod_id::#concrete_id; - - impl #sharable_impl_generics DynSharable for #sharable_mod_id::#abstract_id #type_generics #where_clause { - type T = #sendable_mod_id::#abstract_id #into_generics; - fn into_sendable(&self, ctx: Context) -> Self::T { - match &*self.0 { - #( - #sharable_mod_id::#concrete_id::#variant_id(x) => - #sendable_mod_id::#concrete_id::#variant_id(x.clone().into_sendable(ctx)).into() - ),* - } - } - } - - impl #sendable_impl_generics DynSendable for #sendable_mod_id::#abstract_id #type_generics #where_clause { - type T = #sharable_mod_id::#abstract_id #into_generics; - fn into_sharable(&self, ctx: Context) -> Self::T { - match &*self.0 { - #( - #sendable_mod_id::#concrete_id::#variant_id(x) => - #sharable_mod_id::#concrete_id::#variant_id(x.into_sharable(ctx)).alloc(ctx) - ),* - } - } - } - - ) - .into() -} diff --git a/arc-runtime/macros/src/proc_macro_attrs/rewrite/externs.rs b/arc-runtime/macros/src/proc_macro_attrs/rewrite/externs.rs deleted file mode 100644 index 2a27dd8b4..000000000 --- a/arc-runtime/macros/src/proc_macro_attrs/rewrite/externs.rs +++ /dev/null @@ -1,21 +0,0 @@ -use crate::get_attr_val; -use proc_macro as pm; - -pub(crate) fn rewrite(attr: syn::AttributeArgs, mut item: syn::ItemFn) -> pm::TokenStream { - let unmangled = get_attr_val("unmangled", &attr); - if unmangled != item.sig.ident { - let tys = item.sig.inputs.iter().map(|arg| { - if let syn::FnArg::Typed(p) = arg { - &p.ty - } else { - unreachable!() - } - }); - item.sig.abi = None; - item.sig.inputs = syn::parse_quote!(x: (#(#tys,)*), ctx: Context); - item.block = syn::parse_quote!({ #unmangled(x, ctx) }); - quote::quote!(#item).into() - } else { - quote::quote!().into() - } -} diff --git a/arc-runtime/macros/src/proc_macro_attrs/rewrite/functions.rs b/arc-runtime/macros/src/proc_macro_attrs/rewrite/functions.rs deleted file mode 100644 index b522a852d..000000000 --- a/arc-runtime/macros/src/proc_macro_attrs/rewrite/functions.rs +++ /dev/null @@ -1,208 +0,0 @@ -use crate::has_attr_key; -use proc_macro as pm; -use proc_macro2 as pm2; -// use quote::quote; -use quote::quote; -use std::collections::HashMap; -use syn::visit_mut::VisitMut; - -pub(crate) fn rewrite(_attr: syn::AttributeArgs, mut item: syn::ItemFn) -> pm::TokenStream { - item.sig.generics.params.iter_mut().for_each(|p| { - if let syn::GenericParam::Type(ref mut p) = *p { - p.bounds.push(syn::parse_quote!(Sharable)); - } - }); - use crate::new_id; - Visitor::default().visit_item_fn_mut(&mut item); - let (ids, tys): (Vec<_>, Vec<_>) = item - .sig - .inputs - .iter() - .map(|x| match x { - syn::FnArg::Receiver(_) => unreachable!(), - syn::FnArg::Typed(t) => (&t.pat, &t.ty), - }) - .unzip(); - - let id = new_id(format!("_{}", item.sig.ident)); - let mut wrapper_item = item.clone(); - if wrapper_item.sig.asyncness.is_some() { - wrapper_item.block = syn::parse_quote!({ #id(#(#ids,)* ctx).await }); - } else { - wrapper_item.block = syn::parse_quote!({ #id(#(#ids,)* ctx) }); - } - wrapper_item.sig.inputs = syn::parse_quote!((#(#ids,)*) : (#(#tys,)*), ctx: Context); - item.sig.ident = id; - item.sig.inputs.push(syn::parse_quote!(ctx: Context)); - quote::quote!( - #wrapper_item - #item - ) - .into() -} - -pub(crate) struct Visitor { - scopes: Vec>, -} - -impl Default for Visitor { - fn default() -> Self { - Self { - scopes: vec![HashMap::new()], - } - } -} - -#[derive(Debug, Clone, Copy)] -enum MemKind { - Heap, - Stack, -} - -impl VisitMut for Visitor { - // Every function call must pass an implicit context parameter - fn visit_expr_call_mut(&mut self, i: &mut syn::ExprCall) { - i.args.push(syn::parse_quote!(ctx)); - syn::visit_mut::visit_expr_call_mut(self, i); - } - - fn visit_pat_ident_mut(&mut self, i: &mut syn::PatIdent) { - let kind = MemKind::Heap; - - self.scopes - .last_mut() - .map(|s| s.insert(i.ident.clone(), kind)) - .unwrap(); - } - - fn visit_pat_type_mut(&mut self, i: &mut syn::PatType) { - let kind = if is_primitive(&i.ty) { - MemKind::Stack - } else { - MemKind::Heap - }; - - let last = self.scopes.last_mut().unwrap(); - match i.pat.as_ref() { - syn::Pat::Ident(p) => { - last.insert(p.ident.clone(), kind); - } - syn::Pat::Tuple(p) => { - for p in p.elems.iter() { - match p { - syn::Pat::Ident(p) => { - last.insert(p.ident.clone(), kind); - } - _ => panic!("Expected id- or tuple-id pattern, got {}", quote!(#i)), - } - } - } - _ => panic!("Expected id- or tuple-id pattern, got {}", quote!(#i)), - } - } - - fn visit_block_mut(&mut self, i: &mut syn::Block) { - self.scopes.push(HashMap::new()); - syn::visit_mut::visit_block_mut(self, i); - self.scopes.pop(); - } - - fn visit_expr_assign_mut(&mut self, i: &mut syn::ExprAssign) { - syn::visit_mut::visit_expr_mut(self, &mut i.right); - } - - fn visit_expr_mut(&mut self, i: &mut syn::Expr) { - syn::visit_mut::visit_expr_mut(self, i); - if let syn::Expr::Path(expr) = i { - if let Some(ident) = get_path_ident(&expr.path) { - if let Some(MemKind::Heap) = self.scopes.iter().rev().find_map(|s| s.get(&ident)) { - *i = syn::parse_quote!(#ident.clone()) - } - } - } - } - - fn visit_expr_macro_mut(&mut self, i: &mut syn::ExprMacro) { - syn::visit_mut::visit_expr_macro_mut(self, i); - i.mac.tokens = self.visit_token_stream(i.mac.tokens.clone()); - } - - // Visit expr before pattern - fn visit_local_mut(&mut self, i: &mut syn::Local) { - if let Some(it) = &mut i.init { - self.visit_expr_mut(&mut *(it).1); - } - self.visit_pat_mut(&mut i.pat); - } - - // Every let binding must use the context parameter for allocation - fn visit_stmt_mut(&mut self, i: &mut syn::Stmt) { - syn::visit_mut::visit_stmt_mut(self, i); - if let syn::Stmt::Local(l) = i { - if has_attr_key("alloc", &l.attrs) { - let expr = &l.init.as_ref().unwrap().1; - match &l.pat { - syn::Pat::Ident(pat) => { - *i = syn::parse_quote!(letroot!(#pat = ctx.mutator().shadow_stack(), #expr);); - } - syn::Pat::Type(pat) => { - if !is_primitive(&*pat.ty) { - *i = syn::parse_quote!(letroot!(#pat = ctx.mutator().shadow_stack(), #expr);); - } - } - _ => todo!(), - } - } - } - } -} - -fn is_primitive(t: &syn::Type) -> bool { - match t { - syn::Type::Path(p) => [ - "i8", "i16", "i32", "i64", "u8", "u16", "u32", "u64", "f32", "f64", "unit", - ] - .contains(&p.path.segments.last().unwrap().ident.to_string().as_str()), - syn::Type::Reference(tr) => match &*tr.elem { - syn::Type::Path(p) => { - ["str"].contains(&p.path.segments.last().unwrap().ident.to_string().as_str()) - } - _ => false, - }, - _ => false, - } -} - -fn get_path_ident(p: &syn::Path) -> Option { - if p.segments.len() == 1 { - Some(p.segments[0].ident.clone()) - } else { - None - } -} - -impl Visitor { - fn visit_token_stream(&mut self, tokens: pm2::TokenStream) -> pm2::TokenStream { - let mut result = pm2::TokenStream::new(); - for token in tokens { - let token = match &token { - pm2::TokenTree::Group(g) => { - let stream = self.visit_token_stream(g.stream()); - let delim = g.delimiter(); - pm2::Group::new(delim, stream).into() - } - pm2::TokenTree::Punct(_) => token, - pm2::TokenTree::Ident(i) => { - if let Some(MemKind::Heap) = self.scopes.iter().rev().find_map(|s| s.get(&i)) { - result.extend(quote::quote!((#i.clone()))); - continue; - } - token - } - pm2::TokenTree::Literal(_) => token, - }; - result.extend([token]); - } - result - } -} diff --git a/arc-runtime/macros/src/proc_macro_attrs/rewrite/impls.rs b/arc-runtime/macros/src/proc_macro_attrs/rewrite/impls.rs deleted file mode 100644 index 27753020e..000000000 --- a/arc-runtime/macros/src/proc_macro_attrs/rewrite/impls.rs +++ /dev/null @@ -1,48 +0,0 @@ -use proc_macro as pm; -use quote::quote; - -pub(crate) fn rewrite(_attr: syn::AttributeArgs, item: syn::ItemImpl) -> pm::TokenStream { - use crate::new_id; - let mut functions = Vec::new(); - let ty_name = if let syn::Type::Path(x) = item.self_ty.as_ref() { - &x.path.segments.last().unwrap().ident - } else { - unreachable!("Found non-path type in impl") - }; - let (impl_generics, ty_generics, where_clause) = item.generics.split_for_impl(); - for item in &item.items { - if let syn::ImplItem::Method(item) = item { - let mut inputs = item.sig.inputs.clone().into_iter().collect::>(); - let method_name = &item.sig.ident; - let name = new_id(format!("{}_{}", ty_name, method_name)); - let output = &item.sig.output; - if matches!(inputs[0], syn::FnArg::Receiver(_)) { - inputs[0] = syn::parse_quote!(self_param: #ty_name #ty_generics); - } - let ctx = match inputs.pop().unwrap() { - syn::FnArg::Receiver(_) => unreachable!("Receiver in impl method"), - syn::FnArg::Typed(p) => p, - }; - let ctx_id = ctx.pat; - let ctx_ty = ctx.ty; - let (ids, tys): (Vec<_>, Vec<_>) = inputs - .iter() - .map(|i| match i { - syn::FnArg::Receiver(_) => unreachable!(), - syn::FnArg::Typed(i) => (&i.pat, &i.ty), - }) - .unzip(); - functions.push(quote! { - pub fn #name #impl_generics ((#(#ids,)*):(#(#tys,)*), #ctx_id: #ctx_ty) #output #where_clause { - #ty_name::#method_name(#(#ids,)* #ctx_id) - } - }); - } - } - - quote::quote!( - #item - #(#functions)* - ) - .into() -} diff --git a/arc-runtime/macros/src/proc_macro_attrs/rewrite/nonpersistent_tasks.rs b/arc-runtime/macros/src/proc_macro_attrs/rewrite/nonpersistent_tasks.rs deleted file mode 100644 index db52a423a..000000000 --- a/arc-runtime/macros/src/proc_macro_attrs/rewrite/nonpersistent_tasks.rs +++ /dev/null @@ -1,168 +0,0 @@ -#![allow(unused)] - -use crate::has_attr_key; -use crate::new_id; -use crate::split_name_type; - -use proc_macro as pm; -use proc_macro2 as pm2; -use quote::quote; -use syn::parse::*; -use syn::punctuated::Punctuated; -use syn::token::Comma; - -/// ```no_run -/// task id(a:Pullable[i32], b:Pullable[i32]): (c:Pushable[i32], d:Pushable[i32]) { -/// val x = receive a; -/// val y = receive b; -/// c ! x; -/// d ! y; -/// } -/// ``` -/// -/// Becomes -/// -/// ```no_run -/// #[rewrite(impersistent)] -/// mod my_task { -/// fn task(a:Pullable, #[output] b:Pushable) { -/// let x = pull!(a); -/// push!(b, x); -/// } -/// } -/// ``` - -pub(crate) fn rewrite(attr: syn::AttributeArgs, item: syn::ItemFn) -> pm::TokenStream { - let task_name = item.sig.ident.clone(); - - let mod_name = new_id(format!("mod_{task_name}")); - - let task_body = item.block.clone(); - - let (iparams, oparams): (Vec<_>, Vec<_>) = - item.sig.inputs.clone().into_iter().partition(|p| match p { - syn::FnArg::Receiver(_) => unreachable!(), - syn::FnArg::Typed(p) => !has_attr_key("output", &p.attrs), - }); - - let (iparam_name, iparam_type): (Vec<_>, Vec<_>) = split_name_type(iparams); - let (oparam_name, oparam_type): (Vec<_>, Vec<_>) = split_name_type(oparams); - - let oparam_pull_name = oparam_name - .iter() - .map(|name| new_id(format!("{name}_pull"))) - .collect::>(); - - let oparam_pull_type = oparam_type - .iter() - .map(|ty| quote!(<#ty as Channel>::Pullable)) - .collect::>(); - - quote!( - use #mod_name::#task_name; - #[allow(clippy::all)] - #[allow(non_snake_case)] - #[allow(unreachable_code)] - pub mod #mod_name { - use arc_runtime::prelude::*; - use arc_runtime::data::channels::local::multicast::Pushable; - use arc_runtime::data::channels::local::multicast::Pullable; - use super::*; - - #[derive(Send)] - struct Task { - pub ctx: ComponentContext, - pub event_time: DateTime, - #(pub #iparam_name: #iparam_type,)* - #(pub #oparam_name: #oparam_type,)* - } - - #[allow(unused_parens)] - pub fn #task_name((#(#iparam_name,)*): (#(#iparam_type,)*), ctx: Context) -> (#(#oparam_pull_type),*) { - #(let #iparam_name = #iparam_name.into_sendable(ctx);)* - #(let #iparam_name = #iparam_name.into_sharable(ctx);)* - #(let (#oparam_name, #oparam_pull_name) = <#oparam_type as Channel>::channel(ctx);)* - ctx.launch(move || Task::new(#(#iparam_name,)* #(#oparam_name,)*)); - (#(#oparam_pull_name),*) - } - - impl Task { - #[allow(deprecated)] // NOTE: DateTime::unix_epoch is deprecated - fn new(#(#iparam_name: #iparam_type,)* #(#oparam_name: #oparam_type,)*) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - event_time: DateTime::new(date!(1970-01-01), time!(0:0:0)), - #(#iparam_name,)* - #(#oparam_name,)* - } - } - - async fn run(#(mut #iparam_name: #iparam_type,)* #(#oparam_name: #oparam_type,)* ctx: Context) -> Control<()> { - #task_body - Control::Finished - } - } - - impl ComponentDefinition for Task { - fn setup(&mut self, self_component: Arc>) { - self.ctx.initialise(self_component.clone()); - } - - fn execute(&mut self, _max_events: usize, _skip: usize) -> ExecuteResult { - ExecuteResult::new(false, 0, 0) - } - - fn ctx_mut(&mut self) -> &mut ComponentContext { - &mut self.ctx - } - - fn ctx(&self) -> &ComponentContext { - &self.ctx - } - - fn type_name() -> &'static str { - stringify!(#task_name) - } - } - - impl Actor for Task { - type Message = TaskMessage; - - fn receive_local(&mut self, _: Self::Message) -> Handled { - Handled::Ok - } - - fn receive_network(&mut self, _: NetMessage) -> Handled { - todo!() - } - } - - impl ComponentLifecycle for Task { - fn on_start(&mut self) -> Handled { - self.spawn_local(move |async_self| async move { - let component = async_self.ctx().component(); - let mutator = instantiate_immix(ImmixOptions::default()); - let ctx = Context::new(component, mutator); - #(let #iparam_name = async_self.#iparam_name.clone();)* - #(let #oparam_name = async_self.#oparam_name.clone();)* - Task::run(#(#iparam_name,)* #(#oparam_name,)* ctx).await; - ctx.destroy(); - Handled::DieNow - }); - Handled::Ok - } - } - - impl DynamicPortAccess for Task { - fn get_provided_port_as_any(&mut self, _: TypeId) -> Option<&mut dyn Any> { - unreachable!(); - } - - fn get_required_port_as_any(&mut self, _: TypeId) -> Option<&mut dyn Any> { - unreachable!(); - } - } - } - ) - .into() -} diff --git a/arc-runtime/macros/src/proc_macro_attrs/rewrite/persistent_tasks.rs b/arc-runtime/macros/src/proc_macro_attrs/rewrite/persistent_tasks.rs deleted file mode 100644 index 94144f318..000000000 --- a/arc-runtime/macros/src/proc_macro_attrs/rewrite/persistent_tasks.rs +++ /dev/null @@ -1,232 +0,0 @@ -#![allow(unused)] - -use crate::has_attr_key; -use crate::new_id; -use crate::split_name_type; - -use proc_macro as pm; -use proc_macro2 as pm2; -use quote::quote; -use syn::parse::*; -use syn::punctuated::Punctuated; -use syn::token::Comma; - -/// ```no_run -/// task id(a:Pullable[i32], b:Pullable[i32]): (c:Pushable[i32], d:Pushable[i32]) { -/// val x = receive a; -/// val y = receive b; -/// c ! x; -/// d ! y; -/// } -/// ``` -/// -/// Becomes -/// -/// ```no_run -/// #[rewrite(impersistent)] -/// mod my_task { -/// fn task(a:Pullable, #[output] b:Pushable) { -/// let x = pull!(a); -/// push!(b, x); -/// } -/// } -/// ``` - -pub(crate) fn rewrite(attr: syn::AttributeArgs, item: syn::ItemMod) -> pm::TokenStream { - let task_name = item.ident.clone(); - - let mod_name = new_id(format!("mod_{task_name}")); - - let items = item.content.expect("Expected module to contain items").1; - - let mut state = items - .iter() - .filter_map(|item| match item { - syn::Item::Struct(item) => Some(item), - _ => None, - }) - .collect::>(); - - let state_name = state - .iter() - .map(|item| item.ident.clone()) - .collect::>(); - - let final_state_name = state_name.last().unwrap().clone(); - let first_state_name = state_name.first().unwrap().clone(); - - let transition = items - .iter() - .filter_map(|item| match item { - syn::Item::Fn(item) if item.sig.ident != "task" => Some(item), - _ => None, - }) - .collect::>(); - - let transition_name = transition - .iter() - .map(|item| item.sig.ident.clone()) - .collect::>(); - - let task = items - .iter() - .find_map(|item| match item { - syn::Item::Fn(item) if item.sig.ident == "task" => Some(item), - _ => None, - }) - .expect(r#"Expected a function with name "task" in module"#); - - let (iparams, oparams): (Vec<_>, Vec<_>) = - task.sig.inputs.clone().into_iter().partition(|p| match p { - syn::FnArg::Receiver(_) => unreachable!(), - syn::FnArg::Typed(p) => !has_attr_key("output", &p.attrs), - }); - - let (iparam_name, iparam_type): (Vec<_>, Vec<_>) = split_name_type(iparams); - let (oparam_name, oparam_type): (Vec<_>, Vec<_>) = split_name_type(oparams); - - let oparam_pull_name = oparam_name - .iter() - .map(|name| new_id(format!("{name}_pull"))) - .collect::>(); - - let oparam_pull_type = oparam_type - .iter() - .map(|ty| quote!(<#ty as Channel>::Pullable)) - .collect::>(); - - quote!( - use #mod_name::#task_name; - #[allow(clippy::all)] - #[allow(non_snake_case)] - #[allow(unreachable_code)] - #[allow(unused)] - pub mod #mod_name { - use arc_runtime::prelude::*; - use arc_runtime::data::channels::local::multicast::Pushable; - use arc_runtime::data::channels::local::multicast::Pullable; - use super::*; - - #[derive(Send)] - struct Task { - pub ctx: ComponentContext, - #(pub #iparam_name: #iparam_type,)* - #(pub #oparam_name: #oparam_type,)* - } - - impl Task { - fn new(#(#iparam_name: #iparam_type,)* #(#oparam_name: #oparam_type,)*) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - #(#iparam_name,)* - #(#oparam_name,)* - } - } - } - - pub fn #task_name((#(#iparam_name,)*): (#(#iparam_type,)*), ctx: Context) -> (#(#oparam_pull_type),*) { - #(let #iparam_name = #iparam_name.into_sendable(ctx);)* - #(let #iparam_name = #iparam_name.into_sharable(ctx);)* - #(let (#oparam_name, #oparam_pull_name) = <#oparam_type as Channel>::channel(ctx);)* - ctx.launch(move || Task::new(#(#iparam_name,)* #(#oparam_name,)*)); - (#(#oparam_pull_name),*) - } - - struct Pair(State, Context); - - #[derive(From)] - enum State { - #(#state_name(#state_name),)* - } - - #(#[derive(New)] #state)* - - #(#transition)* - - impl Future for Pair { - type Output = (); - - fn poll(self: Pin<&mut Self>, cx: &mut PollContext) -> Poll { - cx.waker().wake_by_ref(); - let Pair(state, ctx) = self.get_mut(); - replace_with_or_abort_and_return(state, |state| transition(state, cx, *ctx)) - } - } - - fn transition(mut state: State, cx: &mut PollContext, ctx: Context) -> (Poll<()>, State) { - loop { - let (poll, new_state) = match state { - #(State::#state_name(state) => #transition_name(state, cx, ctx),)* - }; - match &poll { - Ready(()) if matches!(&new_state, State::#final_state_name(_)) => return (poll, new_state), - Ready(()) => state = new_state, - Pending => return (poll, new_state), - } - } - } - - impl ComponentDefinition for Task { - fn setup(&mut self, self_component: Arc>) { - self.ctx.initialise(self_component.clone()); - } - - fn execute(&mut self, _max_events: usize, _skip: usize) -> ExecuteResult { - ExecuteResult::new(false, 0, 0) - } - - fn ctx_mut(&mut self) -> &mut ComponentContext { - &mut self.ctx - } - - fn ctx(&self) -> &ComponentContext { - &self.ctx - } - - fn type_name() -> &'static str { - stringify!(#task_name) - } - } - - impl Actor for Task { - type Message = TaskMessage; - - fn receive_local(&mut self, _: Self::Message) -> Handled { - Handled::Ok - } - - fn receive_network(&mut self, _: NetMessage) -> Handled { - todo!() - } - } - - impl ComponentLifecycle for Task { - fn on_start(&mut self) -> Handled { - self.spawn_local(move |mut async_self| async move { - let component = async_self.ctx().component(); - let mutator = instantiate_immix(ImmixOptions::default()); - let ctx = Context::new(component, mutator); - #(let #iparam_name = async_self.#iparam_name.clone();)* - #(let #oparam_name = async_self.#oparam_name.clone();)* - let state = #first_state_name::new(#(#iparam_name,)* #(#oparam_name,)*).into(); - Pair(state, ctx).await; - ctx.destroy(); - Handled::DieNow - }); - Handled::Ok - } - } - - impl DynamicPortAccess for Task { - fn get_provided_port_as_any(&mut self, _: TypeId) -> Option<&mut dyn Any> { - unreachable!(); - } - - fn get_required_port_as_any(&mut self, _: TypeId) -> Option<&mut dyn Any> { - unreachable!(); - } - } - } - ) - .into() -} diff --git a/arc-runtime/macros/src/proc_macro_attrs/rewrite/structs.rs b/arc-runtime/macros/src/proc_macro_attrs/rewrite/structs.rs deleted file mode 100644 index 066ab6205..000000000 --- a/arc-runtime/macros/src/proc_macro_attrs/rewrite/structs.rs +++ /dev/null @@ -1,152 +0,0 @@ -use proc_macro as pm; -use quote::quote; - -use crate::new_id; - -#[allow(unused)] -pub(crate) fn rewrite(args: syn::AttributeArgs, mut item: syn::ItemStruct) -> pm::TokenStream { - item.fields.iter_mut().for_each(|field| { - field.vis = syn::parse_quote!(pub); - }); - let (_, type_generics, where_clause) = item.generics.split_for_impl(); - - let mut sharable_impl_generics = item.generics.params.clone(); - let mut sendable_impl_generics = item.generics.params.clone(); - - sharable_impl_generics.iter_mut().for_each(|g| { - if let syn::GenericParam::Type(t) = g { - t.bounds.push(syn::parse_quote!(Sharable)) - } - }); - sendable_impl_generics.iter_mut().for_each(|g| { - if let syn::GenericParam::Type(t) = g { - t.bounds.push(syn::parse_quote!(Sendable)) - } - }); - let sharable_impl_generics = quote::quote!(<#sharable_impl_generics>); - let sendable_impl_generics = quote::quote!(<#sendable_impl_generics>); - - let into_generics: Vec<_> = item - .generics - .params - .iter() - .filter_map(|g| { - if let syn::GenericParam::Type(t) = g { - let id = &t.ident; - Some(quote::quote!(#id::T)) - } else { - None - } - }) - .collect(); - let into_generics = if into_generics.is_empty() { - quote::quote!() - } else { - quote::quote!(<#(#into_generics),*>) - }; - - let abstract_id = item.ident.clone(); - let concrete_id = new_id(format!("Concrete{}", item.ident)); - let sharable_mod_id = new_id(format!("sharable_{}", item.ident)); - let sendable_mod_id = new_id(format!("sendable_{}", item.ident)); - - let mut concrete_sharable_item = item.clone(); - let mut concrete_sendable_item = item.clone(); - - concrete_sharable_item - .generics - .params - .iter_mut() - .for_each(|g| { - if let syn::GenericParam::Type(t) = g { - t.bounds.push(syn::parse_quote!(Sharable)) - } - }); - concrete_sendable_item - .generics - .params - .iter_mut() - .for_each(|g| { - if let syn::GenericParam::Type(t) = g { - t.bounds.push(syn::parse_quote!(Sendable)) - } - }); - - concrete_sharable_item.ident = concrete_id.clone(); - concrete_sendable_item.ident = concrete_id.clone(); - - // Generate the sendable struct - concrete_sendable_item - .fields - .iter_mut() - .for_each(|f| { - let ty = f.ty.clone(); - if let syn::Type::Path(t) = &ty { - if !item.generics.params.iter().any(|x| match x { - syn::GenericParam::Type(x) => t.path.is_ident(&x.ident), - _ => false, - }) { - f.ty = syn::parse_quote!(<#ty as DynSharable>::T); - } - } else { - f.ty = syn::parse_quote!(<#ty as DynSharable>::T); - } - }); - - let field_id = concrete_sendable_item - .fields - .iter() - .map(|f| &f.ident) - .collect::>(); - - quote!( - - use arc_runtime::prelude::*; - pub mod #sharable_mod_id { - use super::*; - use arc_runtime::prelude::*; - - #[derive(Clone, Debug, Send, Sync, Alloc, Unpin, From, Deref, Abstract, Collectable, Finalize, Trace)] - pub struct #abstract_id #sharable_impl_generics(pub Gc<#concrete_id #type_generics>) #where_clause; - - #[derive(Clone, Debug, Collectable, Finalize, Trace)] - #concrete_sharable_item - } - - mod #sendable_mod_id { - use super::*; - use arc_runtime::prelude::*; - - #[derive(Clone, Debug, Deref, From, Abstract, Deserialize, Serialize)] - #[serde(bound = "")] - #[from(forward)] - pub struct #abstract_id #sendable_impl_generics(pub Box<#concrete_id #type_generics>) #where_clause; - - #[derive(Clone, Debug, Deserialize, Serialize)] - #[serde(bound = "")] - #concrete_sendable_item - } - - use #sharable_mod_id::#abstract_id; - use #sharable_mod_id::#concrete_id; - - impl #sharable_impl_generics DynSharable for #sharable_mod_id::#abstract_id #type_generics #where_clause { - type T = #sendable_mod_id::#abstract_id #into_generics; - fn into_sendable(&self, ctx: Context) -> Self::T { - #sendable_mod_id::#concrete_id { - #(#field_id: (self.0).#field_id.clone().into_sendable(ctx)),* - }.into() - } - } - - impl #sendable_impl_generics DynSendable for #sendable_mod_id::#abstract_id #type_generics #where_clause { - type T = #sharable_mod_id::#abstract_id #into_generics; - fn into_sharable(&self, ctx: Context) -> Self::T { - #sharable_mod_id::#concrete_id { - #(#field_id: (self.0).#field_id.into_sharable(ctx)),* - }.alloc(ctx) - } - } - - ).into() -} diff --git a/arc-runtime/macros/src/proc_macro_derives.rs b/arc-runtime/macros/src/proc_macro_derives.rs deleted file mode 100644 index 6eddb5860..000000000 --- a/arc-runtime/macros/src/proc_macro_derives.rs +++ /dev/null @@ -1,158 +0,0 @@ -use crate::new_id; -use proc_macro::TokenStream; - -pub fn derive_abstract(input: syn::DeriveInput) -> TokenStream { - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); - let abstract_ident = &input.ident; - let concrete_ident = new_id(format!("Concrete{}", abstract_ident)); - quote::quote!( - impl #impl_generics Abstract for #abstract_ident #type_generics #where_clause { - type Concrete = #concrete_ident #type_generics; - } - impl #impl_generics Concrete for #concrete_ident #type_generics #where_clause { - type Abstract = #abstract_ident #type_generics; - } - ) - .into() -} - -pub fn derive_collectable(input: syn::DeriveInput) -> TokenStream { - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); - let name = &input.ident; - quote::quote!(impl #impl_generics Collectable #where_clause for #name #type_generics {}).into() -} - -pub fn derive_finalize(input: syn::DeriveInput) -> TokenStream { - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); - let name = &input.ident; - quote::quote!(unsafe impl #impl_generics Finalize for #name #type_generics #where_clause {}) - .into() -} - -pub fn derive_notrace(input: syn::DeriveInput) -> TokenStream { - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); - let name = &input.ident; - quote::quote!( - unsafe impl #impl_generics Trace for #name #type_generics #where_clause { - fn trace(&mut self, vis: &mut dyn Visitor) { } - } - ) - .into() -} - -pub fn derive_trace(input: syn::DeriveInput) -> TokenStream { - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); - let name = &input.ident; - match &input.data { - syn::Data::Struct(data) => { - let field = data.fields.iter().enumerate().map(|(index, field)| { - field - .ident - .as_ref() - .map(|ident| quote::quote!(#ident)) - .unwrap_or_else(|| { - let index = syn::Index::from(index); - quote::quote!(#index) - }) - }); - quote::quote!( - unsafe impl #impl_generics Trace for #name #type_generics #where_clause { - fn trace(&mut self, vis: &mut dyn Visitor) { - #(self.#field.trace(vis));* - } - } - ) - .into() - } - syn::Data::Enum(data) => { - let variant = data.variants.iter().map(|v| &v.ident); - quote::quote!( - unsafe impl #impl_generics Trace for #name #type_generics #where_clause { - fn trace(&mut self, vis: &mut dyn Visitor) { - match self { - #(Self::#variant(data) => data.trace(vis),)* - } - } - } - ) - .into() - } - syn::Data::Union(_) => unreachable!(), - } -} - -pub fn derive_garbage(input: syn::DeriveInput) -> TokenStream { - let mut collectable = derive_collectable(input.clone()); - let finalize = derive_finalize(input.clone()); - let trace = derive_trace(input.clone()); - collectable.extend(finalize); - collectable.extend(trace); - collectable -} - -pub fn derive_nodebug(input: syn::DeriveInput) -> TokenStream { - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); - let name = &input.ident; - quote::quote!( - impl #impl_generics std::fmt::Debug for #name #type_generics #where_clause { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", stringify!(#name)) - } - } - ) - .into() -} - -pub fn derive_alloc(input: syn::DeriveInput) -> TokenStream { - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); - let abstract_id = &input.ident; - let concrete_id = new_id(format!("Concrete{}", abstract_id)); - quote::quote!( - impl #impl_generics Alloc<#abstract_id #type_generics> for #concrete_id #type_generics #where_clause { - fn alloc(self, ctx: Context) -> #abstract_id #type_generics { - #abstract_id(ctx.mutator().allocate(self, AllocationSpace::New).into()) - } - } - ) - .into() -} - -pub fn derive_send(input: syn::DeriveInput) -> TokenStream { - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); - let name = &input.ident; - quote::quote!(unsafe impl #impl_generics Send for #name #type_generics #where_clause {}).into() -} - -pub fn derive_sync(input: syn::DeriveInput) -> TokenStream { - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); - let name = &input.ident; - quote::quote!(unsafe impl #impl_generics Sync for #name #type_generics #where_clause {}).into() -} - -pub fn derive_unpin(input: syn::DeriveInput) -> TokenStream { - let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); - let name = &input.ident; - quote::quote!(impl #impl_generics Unpin for #name #type_generics #where_clause {}).into() -} - -pub fn derive_noserde(input: syn::DeriveInput) -> TokenStream { - let mut deserialize_generics = input.generics.clone(); - deserialize_generics.params.push(syn::parse_quote!('i)); - let (serialize_impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); - let (deserialize_impl_generics, _, _) = deserialize_generics.split_for_impl(); - let name = &input.ident; - quote::quote!( - impl #serialize_impl_generics Serialize for #name #type_generics #where_clause { - fn serialize(&self, _: S) -> Result { - panic!("Attempted to serialize an unserializable type {}", stringify!(#name)) - } - } - - impl #deserialize_impl_generics Deserialize<'i> for #name #type_generics #where_clause { - fn deserialize>(_: D) -> Result { - panic!("Attempted to deserialize an undeserializable type {}", stringify!(#name)) - } - } - ) - .into() -} diff --git a/arc-runtime/macros/src/proc_macros.rs b/arc-runtime/macros/src/proc_macros.rs deleted file mode 100644 index 32e939c1a..000000000 --- a/arc-runtime/macros/src/proc_macros.rs +++ /dev/null @@ -1,285 +0,0 @@ -use crate::new_id; - -use proc_macro as pm; -use proc_macro::TokenStream; -use proc_macro2 as pm2; - -pub fn call(input: syn::Expr) -> TokenStream { - match input { - syn::Expr::Call(e) => { - let func = e.func; - let args = e.args; - if args.len() == 1 && !args.trailing_punct() { - quote::quote!(#func((#args,), ctx)).into() - } else { - quote::quote!(#func((#args), ctx)).into() - } - } - _ => panic!("Expected function call expression"), - } -} - -pub fn call_async(input: syn::Expr) -> TokenStream { - match input { - syn::Expr::Call(e) => { - let func = e.func; - let args = e.args; - if args.len() == 1 && !args.trailing_punct() { - quote::quote!(#func((#args,), ctx).await).into() - } else { - quote::quote!(#func((#args), ctx).await).into() - } - } - _ => panic!("Expected function call expression"), - } -} - -pub fn call_indirect(input: syn::Expr) -> TokenStream { - match input { - syn::Expr::Call(e) => { - let func = e.func; - let args = e.args; - if args.len() == 1 && !args.trailing_punct() { - quote::quote!((#func.ptr)((#args,), ctx)).into() - } else { - quote::quote!((#func.ptr)((#args), ctx)).into() - } - } - _ => panic!("Expected function call expression"), - } -} - -pub fn enwrap(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let mut path: syn::Path = parse(&mut iter); - concrete_enum_path(&mut path); - let data: syn::Expr = parse(&mut iter); - quote::quote!(#path(#data).alloc(ctx)).into() -} - -pub fn is(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let mut path: syn::Path = parse(&mut iter); - concrete_enum_path(&mut path); - let data: syn::Expr = parse(&mut iter); - quote::quote!(matches!(*#data.0.clone(), #path(_))).into() -} - -pub fn unwrap(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let mut path: syn::Path = parse(&mut iter); - concrete_enum_path(&mut path); - let expr: syn::Expr = parse(&mut iter); - quote::quote!(if let #path(v) = &*#expr.0 { v.clone() } else { unreachable!() }).into() -} - -pub fn new(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let mut data: syn::ExprStruct = parse(&mut iter); - concrete_struct_path(&mut data.path); - quote::quote!((#data).alloc(ctx)).into() -} - -pub fn vector(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let data: Vec = parse_all(&mut iter); - quote::quote!(_vector!([#(#data),*], ctx)).into() -} - -pub fn erase(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let expr: syn::Expr = parse(&mut iter); - let ident: syn::Ident = parse(&mut iter); - let (wrapper_impl, wrapper_cons) = generate_wrapper(&ident); - let wrapper = wrapper_cons(expr); - quote::quote!( - { - #wrapper_impl - Erased::erase(#wrapper, ctx) - } - ) - .into() -} - -pub fn unerase(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let expr: syn::Expr = parse(&mut iter); - let id: syn::Ident = parse(&mut iter); - let (wrapper_impl, _) = generate_wrapper(&id); - quote::quote!( - { - #wrapper_impl - Erased::unerase::<#id>(#expr, ctx) - } - ) - .into() -} - -pub fn push(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let channel: syn::Expr = parse(&mut iter); - let data: syn::Expr = parse(&mut iter); - quote::quote!(#channel.push(#data, ctx).await?).into() -} - -pub fn pull(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let channel: syn::Expr = parse(&mut iter); - quote::quote!(#channel.pull(ctx).await?).into() -} - -/// Create a future for pulling data from a channel. -pub fn pull_transition(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let future: syn::Pat = parse(&mut iter); - let pullable: syn::Expr = parse(&mut iter); - let state: syn::Expr = parse(&mut iter); - quote::quote!( - { - let mut tmp = #pullable.clone(); - let #future = async move { tmp.pull(ctx).await }.boxed(); - transition!(#state); - } - ) - .into() -} - -/// Create a future for pushing data into a channel. -pub fn push_transition(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let future: syn::Pat = parse(&mut iter); - let pushable: syn::Expr = parse(&mut iter); - let data: syn::Expr = parse(&mut iter); - let state: syn::Expr = parse(&mut iter); - quote::quote!( - { - let mut tmp = #pushable.clone(); - let #future = async move { tmp.push(#data, ctx).await }.boxed(); - transition!(#state); - } - ) - .into() -} - -// /// Transition to a new state. -pub fn transition(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let state: syn::Expr = parse(&mut iter); - quote::quote!(return (Pending, #state.into())).into() -} - -// /// Terminate the state machine. -pub fn terminate(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let state: syn::Expr = parse(&mut iter); - quote::quote!(return (Ready(()), #state.into())).into() -} - -// /// Wait until a future completes. -pub fn wait(input: TokenStream) -> TokenStream { - let mut iter = input.into_iter(); - let arg: syn::Expr = parse(&mut iter); - let cx: syn::Expr = parse(&mut iter); - let finished: syn::Expr = parse(&mut iter); - let pending: syn::Expr = parse(&mut iter); - quote::quote!( - match #arg.as_mut().poll(#cx) { - Ready(Finished) => terminate!(#finished), - Ready(Continue(x)) => x, - Pending => transition!(#pending), - } - ) - .into() -} - -fn generate_wrapper(id: &syn::Ident) -> (pm2::TokenStream, impl Fn(syn::Expr) -> pm2::TokenStream) { - let span = id.span().unwrap().start(); - let line = span.line; - let column = span.column; - let abstract_id: syn::Ident = new_id(format!("Wrapper_{}_{}", line, column)); - let concrete_id: syn::Ident = new_id(format!("ConcreteWrapper_{}_{}", line, column)); - let sharable_wrapper_mod_id = new_id(format!("sharable_{}", abstract_id)); - let sendable_wrapper_mod_id = new_id(format!("sendable_{}", abstract_id)); - let wrapper_impl = quote::quote!( - mod #sharable_wrapper_mod_id { - use arc_runtime::prelude::*; - #[derive(Clone, Debug, Send, Sync, Unpin, From, Deref, Abstract, Collectable, Finalize, Trace)] - #[repr(transparent)] - pub struct #abstract_id(pub #concrete_id); - #[derive(Clone, Debug, Collectable, Finalize, Trace)] - #[repr(transparent)] - pub struct #concrete_id(pub super::#id); - } - - mod #sendable_wrapper_mod_id { - use arc_runtime::prelude::*; - #[derive(Clone, Debug, Deref, From, Abstract, Serialize, Deserialize)] - #[repr(transparent)] - pub struct #abstract_id(pub #concrete_id); - #[derive(Clone, Debug, Serialize, Deserialize)] - #[repr(transparent)] - pub struct #concrete_id(pub ::T); - } - - impl DynSharable for #sharable_wrapper_mod_id::#abstract_id { - type T = ::T; - fn into_sendable(&self, ctx: Context) -> Self::T { - Self::T::erase(#sendable_wrapper_mod_id::#abstract_id(#sendable_wrapper_mod_id::#concrete_id(self.0.0.into_sendable(ctx))), ctx) - } - } - - impl DynSendable for #sendable_wrapper_mod_id::#abstract_id { - type T = Erased; - fn into_sharable(&self, ctx: Context) -> Self::T { - Self::T::erase(#sharable_wrapper_mod_id::#abstract_id(#sharable_wrapper_mod_id::#concrete_id(self.0.0.into_sharable(ctx))), ctx) - } - } - ); - let wrapper_cons = move |expr| quote::quote!(#sharable_wrapper_mod_id::#abstract_id(#sharable_wrapper_mod_id::#concrete_id(#expr))); - (wrapper_impl, wrapper_cons) -} - -fn concrete_enum_path(path: &mut syn::Path) { - let mut x = path.segments.iter_mut(); - match (x.next(), x.next(), x.next()) { - (Some(_), Some(i), Some(_)) => i.ident = new_id(format!("Concrete{}", i.ident)), - (Some(i), Some(_), None) => i.ident = new_id(format!("Concrete{}", i.ident)), - (Some(_), None, None) => {} - _ => unreachable!(), - } -} - -fn concrete_struct_path(path: &mut syn::Path) { - let mut x = path.segments.iter_mut(); - match (x.next(), x.next()) { - (Some(_), Some(i)) => i.ident = new_id(format!("Concrete{}", i.ident)), - (Some(i), None) => i.ident = new_id(format!("Concrete{}", i.ident)), - _ => unreachable!(), - } -} - -fn parse(input: &mut impl Iterator) -> T { - let mut stream = pm::TokenStream::new(); - while let Some(token) = input.next() { - match token { - pm::TokenTree::Punct(t) if t.as_char() == ',' => break, - _ => stream.extend([token]), - } - } - syn::parse::(stream).unwrap() -} - -fn parse_all(input: &mut impl Iterator) -> Vec { - let mut nodes = Vec::new(); - let mut stream = pm::TokenStream::new(); - while let Some(token) = input.next() { - match token { - pm::TokenTree::Punct(t) if t.as_char() == ',' => { - nodes.push(syn::parse::(stream).unwrap()); - stream = pm::TokenStream::new(); - } - _ => stream.extend([token]), - } - } - nodes -} diff --git a/arc-runtime/src/context.rs b/arc-runtime/src/context.rs deleted file mode 100644 index 810fcb187..000000000 --- a/arc-runtime/src/context.rs +++ /dev/null @@ -1,59 +0,0 @@ -use comet::immix::Immix; -use comet::immix::ImmixOptions; -use comet::mutator::MutatorRef; -use derive_more::Constructor as New; -use kompact::prelude::*; - -use crate::prelude::Send; -use crate::prelude::Sync; -use crate::prelude::Unpin; -use std::sync::Arc; - -/// The context of a single task. -#[derive(Copy, Clone, Send, Sync, Unpin)] -pub struct Context(*mut Core); - -/// The data stored by the context. -#[derive(New)] -struct Core { - pub component: Arc, - pub mutator: MutatorRef, -} - -impl Context { - #[allow(clippy::mut_from_ref)] - fn as_mut(&self) -> &mut Core { - // SAFETY: This is safe because the context is only ever accessed from a single task. - unsafe { &mut *self.0 } - } -} - -impl Context { - pub fn new(component: Arc, mutator: MutatorRef) -> Self { - Self(Box::leak(Box::new(Core::new(component, mutator))) as *mut Core) - } - pub fn destroy(self) { - // SAFETY: This is safe because the context is managed entirely by the code generator. This - // function is only ever called once. - unsafe { - Box::from_raw(self.0); - } - } - #[allow(clippy::mut_from_ref)] - pub fn mutator(&self) -> &mut MutatorRef { - &mut self.as_mut().mutator - } - #[allow(clippy::mut_from_ref)] - pub fn component(&self) -> &mut Arc { - &mut self.as_mut().component - } - pub fn launch(&self, f: F) - where - F: FnOnce() -> C, - C: ComponentDefinition + 'static, - { - let system = self.as_mut().component.system(); - let c = system.create(f); - system.start(&c); - } -} diff --git a/arc-runtime/src/control.rs b/arc-runtime/src/control.rs deleted file mode 100644 index 51ee9783d..000000000 --- a/arc-runtime/src/control.rs +++ /dev/null @@ -1,29 +0,0 @@ -use std::ops::ControlFlow; -use std::ops::FromResidual; -use std::ops::Try; - -#[derive(Debug)] -pub enum Control { - Continue(T), - Finished, -} - -impl FromResidual<()> for Control { - fn from_residual(residual: ()) -> Self { - Control::Finished - } -} - -impl Try for Control { - type Output = T; - type Residual = (); - fn from_output(output: T) -> Self { - Control::Continue(output) - } - fn branch(self) -> ControlFlow<(), T> { - match self { - Control::Continue(output) => ControlFlow::Continue(output), - Control::Finished => ControlFlow::Break(()), - } - } -} diff --git a/arc-runtime/src/data/cells.rs b/arc-runtime/src/data/cells.rs deleted file mode 100644 index 996c28063..000000000 --- a/arc-runtime/src/data/cells.rs +++ /dev/null @@ -1,43 +0,0 @@ -use crate::prelude::*; - -pub mod sharable { - use crate::prelude::*; - #[derive(Clone, From, Finalize, Collectable, Trace, Debug, Send, Sync, Unpin)] - pub struct Cell(pub Gc); -} - -pub mod sendable { - use crate::prelude::*; - #[derive(Clone, From, Send, Serialize, Deserialize)] - #[serde(bound = "")] - pub struct Cell(pub T); -} - -impl DynSharable for sharable::Cell { - type T = sendable::Cell; - fn into_sendable(&self, ctx: Context) -> Self::T { - sendable::Cell(self.0.into_sendable(ctx)) - } -} - -impl DynSendable for sendable::Cell { - type T = sharable::Cell; - fn into_sharable(&self, ctx: Context) -> Self::T { - sharable::Cell::new(self.0.into_sharable(ctx), ctx) - } -} - -pub use sharable::Cell; - -#[rewrite] -impl Cell { - pub fn new(v: T, ctx: Context) -> Cell { - Cell(ctx.mutator().allocate(v, AllocationSpace::New).into()) - } - pub fn get(self, ctx: Context) -> T { - self.0.inner() - } - pub fn set(mut self, v: T, ctx: Context) { - self.0 = ctx.mutator().allocate(v, AllocationSpace::New).into(); - } -} diff --git a/arc-runtime/src/data/channels/datagen.rs b/arc-runtime/src/data/channels/datagen.rs deleted file mode 100644 index 2d2e1e2b4..000000000 --- a/arc-runtime/src/data/channels/datagen.rs +++ /dev/null @@ -1,47 +0,0 @@ -#![allow(deprecated)] -#![allow(dead_code)] - -use crate::data::Data; -use crate::prelude::DateTime; - -use rand::distributions::Distribution; -use rand::distributions::Standard; -use rand::Rng; - -use std::marker::PhantomData; - -pub struct DataGen { - offset: i64, - count: usize, - rng: rand::prelude::ThreadRng, - marker: PhantomData, -} - -impl DataGen { - fn new(count: usize) -> Self { - Self { - offset: 0, - count, - rng: rand::prelude::thread_rng(), - marker: PhantomData, - } - } -} - -impl Iterator for DataGen -where - Standard: Distribution, -{ - type Item = (DateTime, T); - - fn next(&mut self) -> Option { - self.offset += 1; - self.count -= 1; - if self.count > 0 { - todo!() - // Some((DateTime::from_unix_timestamp(self.offset), self.rng.gen())) - } else { - None - } - } -} diff --git a/arc-runtime/src/data/channels/local/multicast.rs b/arc-runtime/src/data/channels/local/multicast.rs deleted file mode 100644 index 0e407a024..000000000 --- a/arc-runtime/src/data/channels/local/multicast.rs +++ /dev/null @@ -1,60 +0,0 @@ -use kompact::prelude::*; -use std::marker::PhantomData; -use tokio::sync::broadcast::Receiver; -use tokio::sync::broadcast::Sender; - -use crate::control::Control; -use crate::data::Sharable; - -use crate::prelude::*; - -#[derive(Collectable, Finalize, NoTrace, NoSerde, NoDebug)] -pub struct Pushable(Sender); - -impl Clone for Pushable { - fn clone(&self) -> Self { - Pushable(self.0.clone()) - } -} - -#[derive(Collectable, Finalize, NoTrace, NoSerde, NoDebug)] -pub struct Pullable(Sender, Receiver); - -impl Clone for Pullable { - fn clone(&self) -> Self { - Pullable(self.0.clone(), self.0.subscribe()) - } -} - -crate::data::convert_reflexive!({T: Sharable} Pushable); -crate::data::convert_reflexive!({T: Sharable} Pullable); - -crate::data::channels::impl_channel!(); - -/// TODO: Processing will currently only stop if all pullers are dropped. -pub fn channel(_: Context) -> (Pushable, Pullable) -where - T::T: Sendable, -{ - let (l, r) = tokio::sync::broadcast::channel(100); - (Pushable(l.clone()), Pullable(l, r)) -} - -impl Pushable { - pub async fn push(&self, data: T, ctx: Context) -> Control<()> { - self.0 - .send(data.into_sendable(ctx)) - .map(|_| Control::Continue(())) - .unwrap_or(Control::Finished) - } -} - -impl Pullable { - pub async fn pull(&mut self, ctx: Context) -> Control<::T> { - self.1 - .recv() - .await - .map(|v| Control::Continue(v.into_sharable(ctx))) - .unwrap_or(Control::Finished) - } -} diff --git a/arc-runtime/src/data/channels/local/parallel.rs b/arc-runtime/src/data/channels/local/parallel.rs deleted file mode 100644 index 84d4e6a30..000000000 --- a/arc-runtime/src/data/channels/local/parallel.rs +++ /dev/null @@ -1,68 +0,0 @@ -use derive_more::Constructor as New; -use kompact::prelude::*; -use tokio::sync::broadcast::Receiver; -use tokio::sync::broadcast::Sender; - -use std::collections::hash_map::DefaultHasher; -use std::hash::Hash; -use std::hash::Hasher; -use std::marker::PhantomData; - -use crate::prelude::Collectable; -use crate::prelude::Context; -use crate::prelude::Control; -use crate::prelude::Deserialize; -use crate::prelude::Deserializer; -use crate::prelude::DynSendable; -use crate::prelude::DynSharable; -use crate::prelude::Finalize; -use crate::prelude::NoDebug; -use crate::prelude::NoSerde; -use crate::prelude::NoTrace; -use crate::prelude::Sendable; -use crate::prelude::Serialize; -use crate::prelude::Serializer; -use crate::prelude::Sharable; -use crate::prelude::Trace; -use crate::prelude::Visitor; - -use crate::data::channels::local::multicast as mc; - -#[derive(Clone, New, Collectable, Finalize, NoTrace, NoSerde, NoDebug)] -pub struct Pushable { - lanes: Vec>, - parallelism: u64, - extractor: fn(T) -> K, -} - -#[derive(Clone, New, Collectable, Finalize, NoTrace, NoSerde, NoDebug)] -pub struct Pullable { - lanes: Vec>, -} - -crate::data::convert_reflexive!({T: Sharable, K: Sharable + Hash} Pushable); -crate::data::convert_reflexive!({T: Sharable} Pullable); - -pub fn channel( - parallelism: u64, - extractor: fn(T) -> K, - ctx: Context, -) -> (Pushable, Pullable) { - let (l, r) = (0..parallelism).map(|_| mc::channel(ctx)).unzip(); - (Pushable::new(l, parallelism, extractor), Pullable::new(r)) -} - -impl Pushable { - pub async fn push(&self, data: T, ctx: Context) -> Control<()> { - let mut key = DefaultHasher::new(); - (self.extractor)(data.clone()).hash(&mut key); - let lane = key.finish() % self.parallelism; - self.lanes[lane as usize].push(data, ctx).await - } -} - -impl Pullable { - pub async fn pull(&mut self, lane: usize, ctx: Context) -> Control<::T> { - self.lanes[lane].pull(ctx).await - } -} diff --git a/arc-runtime/src/data/channels/local/window.rs b/arc-runtime/src/data/channels/local/window.rs deleted file mode 100644 index 03410518f..000000000 --- a/arc-runtime/src/data/channels/local/window.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub struct Pushable(T); -pub struct Pullable(T); diff --git a/arc-runtime/src/data/channels/mod.rs b/arc-runtime/src/data/channels/mod.rs deleted file mode 100644 index 758ba897d..000000000 --- a/arc-runtime/src/data/channels/mod.rs +++ /dev/null @@ -1,44 +0,0 @@ -use crate::context::Context; -use kompact::prelude::KompactSystem; - -// pub mod remote { -// pub mod multicast; -// pub mod parallel; -// pub mod window; -// } -pub mod local { - pub mod multicast; - pub mod parallel; - // pub mod window; -} - -/// A trait for a channel which is implemented for both endpoints (`Pushable` and `Pullable`). -pub trait Channel { - type Pushable; - type Pullable; - fn channel(ctx: Context) -> (Self::Pushable, Self::Pullable); -} - -macro_rules! impl_channel { - () => { - impl crate::data::channels::Channel for Pushable { - type Pushable = Self; - type Pullable = Pullable; - - fn channel(ctx: Context) -> (Self::Pushable, Self::Pullable) { - channel(ctx) - } - } - - impl crate::data::channels::Channel for Pullable { - type Pushable = Pushable; - type Pullable = Self; - - fn channel(ctx: Context) -> (Self::Pushable, Self::Pullable) { - channel(ctx) - } - } - }; -} - -pub(crate) use impl_channel; diff --git a/arc-runtime/src/data/channels/remote/broadcast.rs b/arc-runtime/src/data/channels/remote/broadcast.rs deleted file mode 100644 index dbb8fcba8..000000000 --- a/arc-runtime/src/data/channels/remote/broadcast.rs +++ /dev/null @@ -1,161 +0,0 @@ -//! A Broadcast channel. -//! Every data item in the channel can be pulled at most once by each consumer. -//! The channel maintains an offset for each consumer, and a minimum offset. -//! This requires that the number of consumers is known in advance. -//! Can be used to implement a "data-parallel" operator. - -use kompact::prelude::*; - -use crate::control::Control; -use crate::data::*; -use crate::prelude::*; - -use std::collections::HashMap; -use std::collections::VecDeque; - -#[derive(ComponentDefinition)] -pub(crate) struct Channel { - ctx: ComponentContext, - push_queue: VecDeque>, - data_queue: VecDeque, - pull_queue: VecDeque>, - min_offset: usize, - offsets: HashMap, - opened: bool, - pushers: usize, - pullers: usize, -} - -impl Channel { - fn new() -> Self { - Self { - ctx: ComponentContext::uninitialised(), - push_queue: VecDeque::with_capacity(100), - data_queue: VecDeque::with_capacity(10), - pull_queue: VecDeque::with_capacity(100), - min_offset: 0, - offsets: vec![(0, 0); 1].into_iter().collect(), - opened: false, - pullers: 1, - pushers: 1, - } - } -} - -pub fn channel(ctx: &mut Context) -> (Pushable, Pullable) { - let chan = ctx.component.system().create(Channel::new); - ctx.component.system().start(&chan); - (Pushable(chan.actor_ref()), Pullable(chan.actor_ref(), 1)) -} - -impl ComponentLifecycle for Channel {} - -#[derive(Debug)] -pub(crate) enum Message { - PushRequest(Ask), - PullRequest(Ask), - Open, - AddPusher, - AddPuller(Ask<(), usize>), - DelPusher, - DelPuller(usize), -} - -impl Actor for Channel { - type Message = Message; - - fn receive_local(&mut self, msg: Self::Message) -> Handled { - match msg { - Message::PushRequest(ask) => self.push_queue.push_back(ask), - Message::PullRequest(ask) => self.pull_queue.push_back(ask), - Message::Open => self.opened = true, - Message::AddPusher => self.pushers += 1, - Message::AddPuller(ask) => { - ask.reply(self.pullers); - self.pullers += 1; - } - Message::DelPusher => self.pushers -= 1, - Message::DelPuller(id) => { - self.pullers -= 1; - self.offsets.remove(&id); - } - } - if self.opened { - while !self.push_queue.is_empty() - && self.data_queue.len() < self.data_queue.capacity() - { - let (promise, data) = self.push_queue.pop_front().unwrap().take(); - promise.fulfil(()).unwrap(); - self.data_queue.push_back(data); - } - while !self.pull_queue.is_empty() && !self.data_queue.is_empty() { - let (promise, id) = self.pull_queue.pop_front().unwrap().take(); - let offset = self.offsets[&id] - self.min_offset; - let data = self.data_queue.pop_front().unwrap(); - promise.fulfil(data).unwrap(); - } - } - if self.pushers == 0 || self.offsets.len() == 0 { - Handled::DieNow - } else { - Handled::Ok - } - } - - fn receive_network(&mut self, msg: NetMessage) -> Handled { - todo!() - } -} - -pub struct Pushable(pub(crate) ActorRef>); - -pub struct Pullable(pub(crate) ActorRef>, pub(crate) usize); - -impl Clone for Pushable { - fn clone(&self) -> Self { - self.0.tell(Message::AddPusher); - Pushable(self.0.clone()) - } -} - -impl Clone for Pullable { - fn clone(&self) -> Self { - let id = self - .0 - .ask_with(|promise| Message::AddPuller(Ask::new(promise, ()))) - .wait(); - Pullable(self.0.clone(), id) - } -} - -impl Drop for Pushable { - fn drop(&mut self) { - self.0.tell(Message::DelPusher); - } -} - -impl Drop for Pullable { - fn drop(&mut self) { - self.0.tell(Message::DelPuller(self.1)); - } -} - -impl Pushable { - pub async fn push(&self, data: T) -> Control<()> { - self.0 - .ask_with(|promise| Message::PushRequest(Ask::new(promise, data))) - .await - .map(Control::Continue) - .unwrap_or(Control::Finished) - } -} - -impl Pullable { - pub async fn pull(&self) -> Control { - self.0 - .ask_with(|promise| Message::PullRequest(Ask::new(promise, self.1))) - .await - .map(Control::Continue) - .unwrap_or(Control::Finished) - } -} diff --git a/arc-runtime/src/data/channels/remote/task_parallel.rs b/arc-runtime/src/data/channels/remote/task_parallel.rs deleted file mode 100644 index 3050ccacd..000000000 --- a/arc-runtime/src/data/channels/remote/task_parallel.rs +++ /dev/null @@ -1,139 +0,0 @@ -use kompact::component::AbstractComponent; -use kompact::prelude::*; -use time::*; - -use crate::control::Control; -use crate::data::*; -use crate::prelude::*; - -use std::collections::HashMap; -use std::collections::VecDeque; -use std::ops::ControlFlow; -use std::ops::FromResidual; -use std::ops::Try; -use std::sync::Arc; -use std::time::Duration; - -#[derive(ComponentDefinition)] -pub(crate) struct Channel { - ctx: ComponentContext, - push_queue: VecDeque>, - data_queue: VecDeque, - pull_queue: VecDeque>, - pushers: usize, - pullers: usize, -} - -impl Channel { - pub fn new() -> Self { - Channel { - ctx: ComponentContext::uninitialised(), - push_queue: VecDeque::with_capacity(100), - data_queue: VecDeque::with_capacity(10), - pull_queue: VecDeque::with_capacity(100), - pullers: 1, - pushers: 1, - } - } -} - -pub fn channel(ctx: &mut Context) -> (Pushable, Pullable) { - let chan = ctx.component.system().create(Channel::new); - ctx.component.system().start(&chan); - (Pushable(chan.actor_ref()), Pullable(chan.actor_ref())) -} - -impl ComponentLifecycle for Channel {} - -#[derive(Debug)] -pub(crate) enum Message { - PushRequest(Ask), - PullRequest(Ask<(), T>), - AddPusher, - AddPuller, - DelPusher, - DelPuller, -} - -impl Actor for Channel { - type Message = Message; - - fn receive_local(&mut self, msg: Self::Message) -> Handled { - match msg { - Message::PushRequest(ask) => self.push_queue.push_back(ask), - Message::PullRequest(ask) => self.pull_queue.push_back(ask), - Message::AddPusher => self.pushers += 1, - Message::AddPuller => self.pullers += 1, - Message::DelPusher => self.pushers -= 1, - Message::DelPuller => self.pullers -= 1, - } - while !self.push_queue.is_empty() && self.data_queue.len() < self.data_queue.capacity() { - let (promise, data) = self.push_queue.pop_front().unwrap().take(); - promise.fulfil(()).unwrap(); - self.data_queue.push_back(data); - } - while !self.pull_queue.is_empty() && !self.data_queue.is_empty() { - let (promise, id) = self.pull_queue.pop_front().unwrap().take(); - let data = self.data_queue.pop_front().unwrap(); - promise.fulfil(data).unwrap(); - } - if self.pushers == 0 && self.data_queue.is_empty() || self.pullers == 0 { - Handled::DieNow - } else { - Handled::Ok - } - } - - fn receive_network(&mut self, msg: NetMessage) -> Handled { - todo!() - } -} - -pub struct Pushable(pub(crate) ActorRef>); - -pub struct Pullable(pub(crate) ActorRef>); - -impl Clone for Pushable { - fn clone(&self) -> Self { - self.0.tell(Message::AddPusher); - Pushable(self.0.clone()) - } -} - -impl Clone for Pullable { - fn clone(&self) -> Self { - Pullable(self.0.clone()) - } -} - -impl Drop for Pushable { - fn drop(&mut self) { - self.0.tell(Message::DelPusher); - } -} - -impl Drop for Pullable { - fn drop(&mut self) { - self.0.tell(Message::DelPuller); - } -} - -impl Pushable { - pub async fn push(&self, data: T) -> Control<()> { - self.0 - .ask_with(|promise| Message::PushRequest(Ask::new(promise, data))) - .await - .map(Control::Continue) - .unwrap_or(Control::Finished) - } -} - -impl Pullable { - pub async fn pull(&self) -> Control { - self.0 - .ask_with(|promise| Message::PullRequest(Ask::new(promise, ()))) - .await - .map(Control::Continue) - .unwrap_or(Control::Finished) - } -} diff --git a/arc-runtime/src/data/channels/remote/window.rs b/arc-runtime/src/data/channels/remote/window.rs deleted file mode 100644 index e69de29bb..000000000 diff --git a/arc-runtime/src/data/dataframe.rs b/arc-runtime/src/data/dataframe.rs deleted file mode 100644 index c1c52060a..000000000 --- a/arc-runtime/src/data/dataframe.rs +++ /dev/null @@ -1,48 +0,0 @@ -use crate::prelude::*; - -pub mod sharable { - use crate::prelude::*; - - #[derive( - Clone, From, Deref, DerefMut, Debug, Collectable, Finalize, Send, Sync, Unpin, NoTrace, - )] - #[from(forward)] - pub struct DataFrame(pub Gc); - - #[derive(Debug, Collectable, NoTrace, Finalize, Send, Sync, Unpin)] - pub struct ConcreteDataFrame(pub polars::frame::DataFrame); - - impl Alloc for ConcreteDataFrame { - fn alloc(self, ctx: Context) -> DataFrame { - DataFrame(ctx.mutator().allocate(self, AllocationSpace::New).into()) - } - } -} - -mod sendable { - use crate::prelude::*; - - #[derive(Clone, From, Send, Serialize, Deserialize)] - #[from(forward)] - pub struct String(pub ConcreteString); - - pub type ConcreteString = Box; -} - -impl DynSharable for sharable::DataFrame { - type T = (); - fn into_sendable(&self, ctx: Context) -> Self::T { - panic!("DataFrame is not sendable") - } -} - -pub use sharable::DataFrame; - -impl DataFrame { - pub fn new(ctx: Context) -> Self { - sharable::ConcreteDataFrame( - polars::frame::DataFrame::new::(vec![]).unwrap(), - ) - .alloc(ctx) - } -} diff --git a/arc-runtime/src/data/functions.rs b/arc-runtime/src/data/functions.rs deleted file mode 100644 index d9088c126..000000000 --- a/arc-runtime/src/data/functions.rs +++ /dev/null @@ -1,100 +0,0 @@ -use crate::context::Context; -use crate::data::DynSharable; -use comet::api::Collectable; -use comet::api::Finalize; -use comet::api::Trace; -use std::fmt::Debug; -use std::ptr::NonNull; - -#[macro_export] -macro_rules! declare_functions { - ($($id:ident),* $(,)?) => { - #[derive(Send, Sync, Unpin, Collectable, Finalize, NoTrace)] - pub struct Function { - pub ptr: fn(I, Context) -> O, - pub tag: FunctionTag, - } - #[derive(Debug, Copy, Send, Sync, Unpin, Serialize, Deserialize)] - pub struct FunctionTag(pub Tag, pub std::marker::PhantomData<(I, O)>); - #[derive(Debug, Clone, Copy, Send, Serialize, Deserialize)] - #[allow(non_camel_case_types)] - pub enum Tag { - $($id,)* - } - impl Clone for Function { - fn clone(&self) -> Self { - Self { ptr: self.ptr.clone(), tag: self.tag.clone() } - } - } - impl std::fmt::Debug for Function { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - Ok(()) - } - } - impl Clone for FunctionTag { - fn clone(&self) -> Self { - Self(self.0, std::marker::PhantomData) - } - } - impl DynSharable for Function { - type T = FunctionTag; - fn into_sendable(&self, ctx: Context) -> Self::T { - self.tag.clone() - } - } - impl DynSendable for FunctionTag { - type T = Function; - fn into_sharable(&self, ctx: Context) -> Self::T { - unsafe { - match self.0 { - $(Tag::$id => Function { - ptr: std::mem::transmute($id as usize), - tag: self.clone() - }),* - } - } - } - } - impl Serialize for Function { - fn serialize(&self, serializer: S) -> Result { - self.tag.0.serialize(serializer) - } - } - impl<'i, I, O> Deserialize<'i> for Function { - fn deserialize>(deserializer: D) -> Result { - unsafe { - match Tag::deserialize(deserializer)? { - $(Tag::$id => Ok(Function { - ptr: std::mem::transmute($id as usize), - tag: FunctionTag(Tag::$id, std::marker::PhantomData) - }),)* - } - } - } - } - }; -} - -#[macro_export] -macro_rules! declare { - (functions:[$($id:ident),* $(,)?], tasks:[]) => { - declare_functions! { - $($id),* - } - }; -} - -#[macro_export] -macro_rules! function { - // Create a function value - ($fun:ident) => { - Function { - ptr: $fun, - tag: FunctionTag(Tag::$fun, std::marker::PhantomData), - } - }; - // Create a function type - (($($input:ty),* $(,)?) -> $output:ty) => { - Function<($($input,)*), $output> - }; -} diff --git a/arc-runtime/src/data/garbage.rs b/arc-runtime/src/data/garbage.rs deleted file mode 100644 index 47ab59772..000000000 --- a/arc-runtime/src/data/garbage.rs +++ /dev/null @@ -1,52 +0,0 @@ -use comet::api::Collectable; -use comet::api::Finalize; -use comet::api::Trace; -use comet::immix::Immix; - -use derive_more::AsRef; - -use crate::prelude::*; - -pub trait Garbage: Collectable + Trace + Finalize {} -impl Garbage for T where T: Collectable + Trace + Finalize {} - -#[derive(AsRef, Deref, DerefMut, From, Debug)] -#[deref(forward)] -#[deref_mut(forward)] -#[as_ref(forward)] -pub struct Gc(comet::api::Gc); - -impl PartialEq for Gc { - fn eq(&self, other: &Self) -> bool { - self.0 == other.0 - } -} - -impl Clone for Gc { - fn clone(&self) -> Self { - self.0.into() - } -} - -impl Gc { - pub fn inner(self) -> T { - (*self.0).clone() - } -} - -pub trait Alloc { - fn alloc(self, ctx: Context) -> T; -} - -macro_rules! alloc_identity { - { $ty:ty } => { - impl Alloc<$ty> for $ty { - #[inline(always)] - fn alloc(self, ctx: Context) -> $ty { - self - } - } - } -} - -pub(crate) use alloc_identity; diff --git a/arc-runtime/src/data/mod.rs b/arc-runtime/src/data/mod.rs deleted file mode 100644 index de48624d9..000000000 --- a/arc-runtime/src/data/mod.rs +++ /dev/null @@ -1,68 +0,0 @@ -pub mod functions; -pub mod garbage; -pub mod primitives; -pub mod strings; -pub mod vectors; -#[cfg(feature = "dataframes")] -pub mod dataframe; -pub mod series; -pub mod channels; -pub mod cells; - -use crate::data::garbage::Garbage; - -use comet::gc_base::GcBase; -use dyn_clone::DynClone; - -use std::fmt::Debug; -use std::hash::Hash; - -use crate::prelude::*; - -pub trait Concrete { - type Abstract; -} - -pub trait Abstract { - type Concrete; -} - -pub trait DynSendable: AsyncSafe + DynClone { - type T: Sharable; - fn into_sharable(&self, ctx: Context) -> Self::T; -} - -pub trait DynSharable: AsyncSafe + DynClone + Garbage + Debug { - type T: Sendable; - fn into_sendable(&self, ctx: Context) -> Self::T; -} - -pub trait AsyncSafe: Send + Sync + Unpin {} -impl AsyncSafe for T where T: Send + Sync + Unpin {} - -pub trait Sendable: Sized + DynSendable + Clone + Serialize + DeserializeOwned {} -pub trait Sharable: Sized + DynSharable + Clone {} -pub trait DataItem: Sized + Copy + Debug + AsyncSafe {} - -impl Sharable for T where T: Sized + DynSharable + Clone {} -impl Sendable for T where T: Sized + DynSendable + Clone + Serialize + DeserializeOwned {} -impl DataItem for T where T: Sized + Copy + Debug + AsyncSafe {} - -dyn_clone::clone_trait_object!( DynSharable); -dyn_clone::clone_trait_object!( DynSendable); - -#[macro_export] -macro_rules! convert_reflexive { - {$({$($impl_generics:tt)+})* $ty:ty $({$($where_clause:tt)+})*} => { - impl $(<$($impl_generics)+>)* DynSharable for $ty $($($where_clause)+)* { - type T = Self; - fn into_sendable(&self, _: Context) -> Self { self.clone() } - } - impl $(<$($impl_generics)+>)* DynSendable for $ty $($($where_clause)+)* { - type T = Self; - fn into_sharable(&self, _: Context) -> Self { self.clone() } - } - } -} - -pub use convert_reflexive; diff --git a/arc-runtime/src/data/primitives.rs b/arc-runtime/src/data/primitives.rs deleted file mode 100644 index 1e026823b..000000000 --- a/arc-runtime/src/data/primitives.rs +++ /dev/null @@ -1,78 +0,0 @@ -use crate::context::Context; -use crate::data::convert_reflexive; -use crate::data::garbage::alloc_identity; -use crate::data::strings::String; -use crate::data::Alloc; -use crate::data::DynSendable; -use crate::data::DynSharable; -use macros::rewrite; - -pub use bool; -pub use char; -pub use f32; -pub use f64; -pub use i128; -pub use i16; -pub use i32; -pub use i64; -pub use i8; -pub use u128; -pub use u16; -pub use u32; -pub use u64; -pub use u8; -#[allow(non_camel_case_types)] -pub type unit = (); -pub type Unit = (); -pub use std::ops::Range; - -convert_reflexive!(i8); -convert_reflexive!(i16); -convert_reflexive!(i32); -convert_reflexive!(i64); -convert_reflexive!(i128); -convert_reflexive!(u8); -convert_reflexive!(u16); -convert_reflexive!(u32); -convert_reflexive!(u64); -convert_reflexive!(u128); -convert_reflexive!(f32); -convert_reflexive!(f64); -convert_reflexive!(bool); -// convert_reflexive!(char); -convert_reflexive!(unit); - -alloc_identity!(i8); -alloc_identity!(i16); -alloc_identity!(i32); -alloc_identity!(i64); -alloc_identity!(i128); -alloc_identity!(u8); -alloc_identity!(u16); -alloc_identity!(u32); -alloc_identity!(u64); -alloc_identity!(f32); -alloc_identity!(f64); -alloc_identity!(bool); -alloc_identity!(char); -alloc_identity!(unit); - -#[allow(non_upper_case_globals)] -pub const unit: unit = (); -#[allow(non_upper_case_globals)] -pub const Unit: unit = (); - -#[rewrite] -pub fn assert(b: bool) { - assert!(b); -} - -#[rewrite] -pub fn panic(s: String) { - panic!("{}", s.as_str()) -} - -#[rewrite] -pub fn print(s: String) { - println!("{}", s.as_str()) -} diff --git a/arc-runtime/src/data/series.rs b/arc-runtime/src/data/series.rs deleted file mode 100644 index e69de29bb..000000000 diff --git a/arc-runtime/src/data/strings.rs b/arc-runtime/src/data/strings.rs deleted file mode 100644 index 1d2c8a77d..000000000 --- a/arc-runtime/src/data/strings.rs +++ /dev/null @@ -1,115 +0,0 @@ -use crate::prelude::*; - -pub mod sharable { - use crate::prelude::*; - - #[derive(Clone, From, Deref, DerefMut, Debug, Collectable, Finalize, Send, Sync, Unpin)] - #[from(forward)] - pub struct String(pub Gc); - - pub type ConcreteString = comet::alloc::string::String; - - impl Alloc for ConcreteString { - fn alloc(self, ctx: Context) -> String { - String(ctx.mutator().allocate(self, AllocationSpace::New).into()) - } - } - - unsafe impl Trace for String { - fn trace(&mut self, vis: &mut dyn Visitor) { - self.0.trace(vis) - } - } -} - -mod sendable { - use crate::prelude::*; - - #[derive(Clone, From, Send, Serialize, Deserialize)] - #[from(forward)] - pub struct String(pub ConcreteString); - - pub type ConcreteString = Box; -} - -impl DynSharable for sharable::String { - type T = sendable::String; - fn into_sendable(&self, ctx: Context) -> Self::T { - self.0.to_string().into() - } -} - -impl DynSendable for sendable::String { - type T = sharable::String; - fn into_sharable(&self, ctx: Context) -> Self::T { - String::from_str(self.0.as_ref(), ctx) - } -} - -pub use sharable::String; - -#[rewrite] -impl String { - pub fn new(ctx: Context) -> String { - sharable::ConcreteString::new(ctx.mutator()).alloc(ctx) - } - - pub fn with_capacity(capacity: usize, ctx: Context) -> String { - sharable::ConcreteString::with_capacity(ctx.mutator(), capacity).alloc(ctx) - } - - pub fn push_char(mut self, ch: char, ctx: Context) { - self.0.push(ctx.mutator(), ch) - } - - pub fn push_str(mut self, s: &str, ctx: Context) { - self.0.push_str(ctx.mutator(), s) - } - - pub fn from_str(s: &str, ctx: Context) -> String { - let mut new = sharable::ConcreteString::with_capacity(ctx.mutator(), s.len()); - new.push_str(ctx.mutator(), s); - new.alloc(ctx) - } - - pub fn remove(mut self, idx: u32, _ctx: Context) -> char { - self.0.remove(idx as usize) - } - - pub fn insert_char(mut self, idx: u32, ch: char, ctx: Context) { - self.0.insert(ctx.mutator(), idx as usize, ch) - } - - pub fn is_empty(mut self, _ctx: Context) -> bool { - self.0.is_empty() - } - - pub fn split_off(mut self, at: u32, ctx: Context) -> String { - self.0.split_off(ctx.mutator(), at as usize).alloc(ctx) - } - - pub fn clear(mut self, _ctx: Context) { - self.0.clear() - } - - pub fn len(self, _ctx: Context) -> u32 { - self.0.len() as u32 - } - - pub fn from_i32(i: i32, ctx: Context) -> String { - let mut new = String::new(ctx); - new.0.push_str(ctx.mutator(), &i.to_string()); - new - } - - pub fn eq(self, other: String, ctx: Context) -> bool { - self.0.eq(&other.0) - } - - pub fn concat(self, other: String, ctx: Context) -> String { - let mut new = String::new(ctx); - new.0.push_str(ctx.mutator(), &self.0); - new.0.push_str(ctx.mutator(), &other.0); - new - } -} diff --git a/arc-runtime/src/data/vectors.rs b/arc-runtime/src/data/vectors.rs deleted file mode 100644 index b112c1a94..000000000 --- a/arc-runtime/src/data/vectors.rs +++ /dev/null @@ -1,145 +0,0 @@ -use crate::prelude::*; - -pub mod sharable { - use crate::prelude::*; - - #[derive( - Clone, From, Deref, DerefMut, Finalize, Collectable, Debug, Send, Sync, Unpin, Trace, - )] - #[from(forward)] - pub struct Vec(pub Gc>); - - pub type ConcreteVec = comet::alloc::vector::Vector; - - impl Alloc> for ConcreteVec { - fn alloc(self, ctx: Context) -> Vec { - Vec(ctx.mutator().allocate(self, AllocationSpace::New).into()) - } - } -} - -mod sendable { - use crate::prelude::*; - - #[derive(Clone, From, Send, Serialize, Deserialize)] - #[serde(bound = "")] - #[from(forward)] - pub struct Vec(pub ConcreteVec); - - pub type ConcreteVec = std::vec::Vec; -} - -impl DynSharable for sharable::Vec { - type T = sendable::Vec; - fn into_sendable(&self, ctx: Context) -> Self::T { - self.0 - .iter() - .map(|v| v.clone().into_sendable(ctx)) - .collect::>() - .into_boxed_slice() - .into() - } -} - -impl DynSendable for sendable::Vec { - type T = sharable::Vec; - fn into_sharable(&self, ctx: Context) -> Self::T { - let mut s = Vec::::with_capacity(self.0.len(), ctx); - for v in self.0.iter() { - let v = v.into_sharable(ctx); - s.0.push(ctx.mutator(), v); - } - s - } -} - -pub use sharable::Vec; - -impl Vec { - pub fn as_slice(&self, ctx: Context) -> &[T] { - self.0.as_slice() - } - pub fn retain(mut self, f: F, ctx: Context) - where - F: FnMut(&T) -> bool, - { - self.0.retain(f); - } - pub fn as_slice_mut(&mut self, ctx: Context) -> &mut [T] { - self.0.as_slice_mut() - } - - pub fn dedup(mut self, ctx: Context) - where - T: PartialEq, - { - self.0.dedup(); - } - - pub fn write_barrier(mut self, ctx: Context) { - self.0.write_barrier(ctx.mutator()) - } - - pub fn shrink_to(mut self, min_capacity: usize, ctx: Context) { - self.0.shrink_to(ctx.mutator(), min_capacity); - } - - pub fn resize(mut self, new_len: usize, value: T, ctx: Context) { - self.0.resize(ctx.mutator(), new_len, value); - } -} - -#[rewrite] -impl Vec { - pub fn new(ctx: Context) -> Vec { - sharable::ConcreteVec::::new(ctx.mutator()).alloc(ctx) - } - - pub fn with_capacity(capacity: usize, ctx: Context) -> Vec { - sharable::ConcreteVec::::with_capacity(ctx.mutator(), capacity).alloc(ctx) - } - - pub fn capacity(self, ctx: Context) -> usize { - self.0.capacity() - } - - pub fn len(self, ctx: Context) -> usize { - self.0.len() - } - - pub fn clear(mut self, ctx: Context) { - self.0.clear(); - } - - pub fn push(mut self, value: T, ctx: Context) { - self.0.push(ctx.mutator(), value); - } - - pub fn pop(mut self, ctx: Context) -> Option { - self.0.pop() - } - - pub fn remove(mut self, index: usize, ctx: Context) -> T { - self.0.remove(index) - } - - pub fn get(self, index: usize, ctx: Context) -> T { - self.0.at(index).clone() - } - - pub fn insert(mut self, index: usize, value: T, ctx: Context) { - self.0.insert(ctx.mutator(), index, value); - } - - pub fn is_empty(self, ctx: Context) -> bool { - self.0.is_empty() - } -} - -#[allow(non_snake_case)] -pub fn Vec_dedup(self_param: Vec, ctx: Context) -where - T: PartialEq, -{ - Vec::dedup(self_param, ctx) -} diff --git a/arc-runtime/src/lib.rs b/arc-runtime/src/lib.rs deleted file mode 100644 index 6c6bd7ef4..000000000 --- a/arc-runtime/src/lib.rs +++ /dev/null @@ -1,220 +0,0 @@ -// #![feature(fn_traits)] -// #![feature(unboxed_closures)] -// #![feature(arbitrary_self_types)] -// #![feature(async_closure)] -// #![feature(async_stream)] -// #![feature(stream_from_iter)] -#![feature(try_trait_v2)] -#![feature(type_alias_impl_trait)] -#![feature(once_cell)] -#![feature(never_type)] -#![allow(unused)] -#![allow(clippy::type_complexity)] -#![allow(clippy::needless_doctest_main)] -#![allow(clippy::wrong_self_convention)] -#![allow(clippy::len_without_is_empty)] - -pub mod context; -pub mod control; -pub mod data; -pub mod macros; -pub mod operators; -pub mod runtime; -pub mod task; -pub mod timer; - -pub mod prelude { - // Data types - pub use crate::context::Context; - pub use crate::control::Control; - pub use crate::control::Control::Continue; - pub use crate::control::Control::Finished; - pub use crate::data::channels; - pub use crate::data::channels::Channel; - pub use crate::data::garbage::Alloc; - pub use crate::data::garbage::Gc; - pub use crate::data::primitives::bool; - pub use crate::data::primitives::char; - pub use crate::data::primitives::f32; - pub use crate::data::primitives::f64; - pub use crate::data::primitives::i128; - pub use crate::data::primitives::i16; - pub use crate::data::primitives::i32; - pub use crate::data::primitives::i64; - pub use crate::data::primitives::i8; - pub use crate::data::primitives::u128; - pub use crate::data::primitives::u16; - pub use crate::data::primitives::u32; - pub use crate::data::primitives::u64; - pub use crate::data::primitives::u8; - pub use crate::data::primitives::unit; - pub use crate::data::primitives::Unit; - pub use crate::data::Abstract; - pub use crate::data::Concrete; - pub use crate::data::DynSendable; - pub use crate::data::DynSharable; - pub use crate::data::Sendable; - pub use crate::data::Sharable; - pub use crate::runtime::Runtime; - pub use crate::task::message::TaskMessage; - - pub use crate::data::primitives::assert; - pub use crate::data::primitives::panic; - pub use crate::data::primitives::print; - - pub use crate::data::strings::String; - pub use crate::data::strings::String_clear; - pub use crate::data::strings::String_from_str; - pub use crate::data::strings::String_insert_char; - pub use crate::data::strings::String_is_empty; - pub use crate::data::strings::String_len; - pub use crate::data::strings::String_new; - pub use crate::data::strings::String_push_char; - pub use crate::data::strings::String_push_str; - pub use crate::data::strings::String_remove; - pub use crate::data::strings::String_split_off; - pub use crate::data::strings::String_with_capacity; - pub use crate::data::strings::String_from_i32; - pub use crate::data::strings::String_eq; - pub use crate::data::strings::String_concat; - - pub use crate::data::vectors::Vec; - pub use crate::data::vectors::Vec_capacity; - pub use crate::data::vectors::Vec_clear; - pub use crate::data::vectors::Vec_dedup; - pub use crate::data::vectors::Vec_get; - pub use crate::data::vectors::Vec_insert; - pub use crate::data::vectors::Vec_is_empty; - pub use crate::data::vectors::Vec_len; - pub use crate::data::vectors::Vec_new; - pub use crate::data::vectors::Vec_pop; - pub use crate::data::vectors::Vec_push; - pub use crate::data::vectors::Vec_remove; - pub use crate::data::vectors::Vec_with_capacity; - - pub use crate::data::cells::Cell; - pub use crate::data::cells::Cell_get; - pub use crate::data::cells::Cell_new; - pub use crate::data::cells::Cell_set; - - // Declarative macros - pub use crate::access; - pub use crate::convert_reflexive; - pub use crate::declare_functions; - pub use crate::declare; - pub use crate::function; - pub use crate::letroot; - pub use crate::val; - - // Hidden macros - pub use crate::_vector; - - // Procedural macros - pub use macros::call; - pub use macros::call_async; - pub use macros::call_indirect; - pub use macros::enwrap; - pub use macros::erase; - pub use macros::is; - pub use macros::new; - pub use macros::pull; - pub use macros::pull_transition; - pub use macros::push; - pub use macros::push_transition; - pub use macros::rewrite; - pub use macros::terminate; - pub use macros::transition; - pub use macros::unerase; - pub use macros::unwrap; - pub use macros::vector; - pub use macros::wait; - pub use macros::Abstract; - pub use macros::Alloc; - pub use macros::Collectable; - pub use macros::Finalize; - pub use macros::NoDebug; - pub use macros::NoSerde; - pub use macros::NoTrace; - pub use macros::Send; - pub use macros::Sync; - pub use macros::Trace; - pub use macros::Unpin; - - // Re-exports - pub use kompact::prelude::info; - pub use kompact::prelude::warn; - pub use kompact::prelude::Actor; - pub use kompact::prelude::ActorRaw; - pub use kompact::prelude::Component; - pub use kompact::prelude::ComponentContext; - pub use kompact::prelude::ComponentDefinition; - pub use kompact::prelude::ComponentDefinitionAccess; - pub use kompact::prelude::ComponentLifecycle; - pub use kompact::prelude::ComponentLogging; - pub use kompact::prelude::DeadletterBox; - pub use kompact::prelude::DynamicPortAccess; - pub use kompact::prelude::ExecuteResult; - pub use kompact::prelude::Handled; - pub use kompact::prelude::KompactConfig; - pub use kompact::prelude::KompactSystem; - pub use kompact::prelude::MsgEnvelope; - pub use kompact::prelude::NetMessage; - pub use kompact::prelude::NetworkConfig; - pub use kompact::prelude::Never; - pub use kompact::prelude::SystemHandle; - - pub use comet::api::Collectable; - pub use comet::api::Finalize; - pub use comet::api::Trace; - pub use comet::api::Visitor; - pub use comet::gc_base::AllocationSpace; - pub use comet::immix::instantiate_immix; - pub use comet::immix::Immix; - pub use comet::immix::ImmixOptions; - pub use comet::mopa::TraitObject; - pub use comet::mutator::MutatorRef; - pub use comet::shadow_stack::Rootable; - pub use comet::shadow_stack::Rooted; - pub use comet::shadow_stack::ShadowStack; - pub use comet::shadow_stack::ShadowStackInternal; - - pub use derive_more::Constructor as New; - pub use derive_more::Deref; - pub use derive_more::DerefMut; - pub use derive_more::From; - - pub use time::macros::date; - pub use time::macros::time; - pub use time::Duration; - pub use time::PrimitiveDateTime as DateTime; - - pub use futures::future::BoxFuture; - pub use futures::future::FutureExt; - pub use futures::executor::block_on; - - pub use replace_with::replace_with_or_abort_and_return; - - pub use hexf::hexf32; - pub use hexf::hexf64; - - pub use serde::de::DeserializeOwned; - pub use serde::Deserialize; - pub use serde::Deserializer; - pub use serde::Serialize; - pub use serde::Serializer; - pub use serde_derive::Deserialize; - pub use serde_derive::Serialize; - - pub use std::any::Any; - pub use std::any::TypeId; - pub use std::cell::UnsafeCell; - pub use std::fmt::Debug; - pub use std::future::Future; - pub use std::hash::Hash; - pub use std::pin::Pin; - pub use std::sync::Arc; - pub use std::task::Context as PollContext; - pub use std::task::Poll; - pub use std::task::Poll::Pending; - pub use std::task::Poll::Ready; -} diff --git a/arc-runtime/src/macros.rs b/arc-runtime/src/macros.rs deleted file mode 100644 index 49f962019..000000000 --- a/arc-runtime/src/macros.rs +++ /dev/null @@ -1,97 +0,0 @@ -/// Get the value of a variable. -/// -/// ``` -/// use arc_runtime::prelude::*; -/// let a = 5; -/// let b = val!(a); -/// ``` -#[macro_export] -macro_rules! val { - ($arg:expr) => { - $arg - }; -} - -macro_rules! inline { - ($($tt:tt)*) => { $($tt)* }; -} - -/// Access a struct's field. -/// -/// ``` -/// use arc_runtime::prelude::*; -/// #[rewrite] -/// pub struct Bar { -/// pub x: i32, -/// pub y: i32 -/// } -/// #[rewrite(main)] -/// fn main() { -/// let a = new!(Bar { x: 0, y: 1 }); -/// let b = access!(a, x); -/// } -/// ``` -#[macro_export] -macro_rules! access { - ($arg:expr, $field:tt) => { - $arg.clone().$field.clone() - }; -} - -#[macro_export] -macro_rules! letroot { - ($var_name:ident : $t:ty = $stack:expr, $value:expr) => { - let stack: &ShadowStack = &$stack; - let value = $value; - #[allow(unused_unsafe)] - let mut $var_name = unsafe { - ShadowStackInternal::<$t>::construct( - stack, - stack.head.get(), - core::mem::transmute::<_, TraitObject>(&value as &dyn Rootable).vtable as usize, - value, - ) - }; - #[allow(unused_unsafe)] - stack - .head - .set(unsafe { core::mem::transmute(&mut $var_name) }); - #[allow(unused_mut)] - let mut $var_name = unsafe { Rooted::construct(&mut $var_name.value) }; - }; - - ($var_name:ident = $stack:expr, $value:expr) => { - let stack: &ShadowStack = &$stack; - let value = $value; - #[allow(unused_unsafe)] - let mut $var_name = unsafe { - ShadowStackInternal::<_>::construct( - stack, - stack.head.get(), - core::mem::transmute::<_, TraitObject>(&value as &dyn Rootable).vtable as usize, - value, - ) - }; - #[allow(unused_unsafe)] - stack - .head - .set(unsafe { core::mem::transmute(&mut $var_name) }); - #[allow(unused_mut)] - #[allow(unused_unsafe)] - let mut $var_name = unsafe { Rooted::construct(&mut $var_name.value) }; - }; -} - -#[macro_export] -macro_rules! _vector { - ([$($x:expr),* $(,)?], $ctx:expr) => {{ - let stack = $ctx.mutator().shadow_stack(); - letroot!(vec = stack, Some(Vec::new($ctx))); - - $( - vec.as_mut().unwrap().0.push($ctx.mutator(), $x); - vec.as_mut().unwrap().0.write_barrier($ctx.mutator()); - )* - vec.take().unwrap() - }} -} diff --git a/arc-runtime/src/operators.rs b/arc-runtime/src/operators.rs deleted file mode 100644 index d1f56bf91..000000000 --- a/arc-runtime/src/operators.rs +++ /dev/null @@ -1,96 +0,0 @@ -//! Builtin streaming operators. Everything required to support the SQL-interface. -#![allow(clippy::type_complexity)] - -use crate::data::Sharable; -use crate::prelude::*; - -use crate::data::channels::local::multicast as clm; -// use crate::channels::local::data_parallel as cld; -// use crate::channels::local::data_parallel as clt; -// use crate::channels::local::window as clw; - -use crate::prelude::DateTime; - -use rand::distributions::Distribution; -use rand::distributions::Standard; -use rand::Rng; - -use std::marker::PhantomData; - -use kompact::prelude::*; - -use std::sync::Arc; - -impl clm::Pullable { - pub fn iterate(self, f: fn(Self) -> (Self, clm::Pullable)) -> clm::Pullable { - todo!() - } - -// pub fn key_by(self, f: fn(I) -> K) -> cld::Pullable { -// todo!() -// } - - pub fn map(self, f: fn(I) -> O) -> clm::Pullable { - todo!() - } - - pub fn filter(self, f: fn(I) -> bool) -> clm::Pullable { - todo!() - } - - pub fn flat_map(self, f: fn(I) -> clm::Pullable) -> clm::Pullable { - todo!() - } - - pub fn reduce(self, f: fn(O, I) -> O) -> clm::Pullable { - todo!() - } - -// pub fn join( -// self, -// other: clw::Pullable, -// f: fn(I, I) -> K, -// ) -> clm::Pullable { -// todo!() -// } -// -// pub fn tumbling_window(self, len: Duration) -> clw::Pullable { -// todo!() -// } -} - -pub struct DataGen { - offset: i64, - count: usize, - rng: rand::prelude::ThreadRng, - marker: PhantomData, -} - -impl DataGen { - fn new(count: usize) -> Self { - Self { - offset: 0, - count, - rng: rand::prelude::thread_rng(), - marker: PhantomData, - } - } -} - -impl Iterator for DataGen -where - Standard: Distribution, -{ - type Item = (DateTime, T); - - fn next(&mut self) -> Option { - self.offset += 1; - self.count -= 1; - if self.count > 0 { - todo!() - // Some((DateTime::from_unix_timestamp(self.offset), self.rng.gen())) - } else { - None - } - } -} diff --git a/arc-runtime/src/runtime.rs b/arc-runtime/src/runtime.rs deleted file mode 100644 index 983526c52..000000000 --- a/arc-runtime/src/runtime.rs +++ /dev/null @@ -1,21 +0,0 @@ -use comet::immix::Immix; -use comet::immix::ImmixOptions; -use comet::mutator::MutatorRef; -use kompact::prelude::*; - -pub struct Runtime { - pub system: KompactSystem, -} - -impl Runtime { - pub fn new() -> Self { - let system = KompactConfig::default().build().unwrap(); - Self { system } - } -} - -impl Default for Runtime { - fn default() -> Self { - Self::new() - } -} diff --git a/arc-runtime/src/task/message.rs b/arc-runtime/src/task/message.rs deleted file mode 100644 index ee57d63ab..000000000 --- a/arc-runtime/src/task/message.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[derive(Debug)] -pub enum TaskMessage { - Kill, -} diff --git a/arc-runtime/src/task/mod.rs b/arc-runtime/src/task/mod.rs deleted file mode 100644 index e216a5018..000000000 --- a/arc-runtime/src/task/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod message; diff --git a/arc-runtime/tests/allocation.rs b/arc-runtime/tests/allocation.rs deleted file mode 100644 index 931c6eb66..000000000 --- a/arc-runtime/tests/allocation.rs +++ /dev/null @@ -1,49 +0,0 @@ -use comet::api::Collectable; -use comet::api::Finalize; -use comet::api::Gc; -use comet::api::Trace; -use comet::api::Visitor; -use comet::gc_base::AllocationSpace; -use comet::immix::instantiate_immix; -use comet::immix::Immix; -use comet::immix::ImmixOptions; - -pub enum List { - Nil, - Cons(T, Gc, Immix>), -} - -unsafe impl Trace for List { - fn trace(&mut self, vis: &mut dyn Visitor) { - if let Self::Cons(data, next) = self { - data.trace(vis); - next.trace(vis); - } - } -} - -unsafe impl Finalize for List {} - -impl Collectable for List {} - -#[test] -fn main() { - let opts = ImmixOptions::default(); - let mut mutator = instantiate_immix(opts); - - let mut l: Gc, Immix> = mutator.allocate(List::Nil, AllocationSpace::New); - - for i in 0..100 { - l = mutator.allocate(List::Cons(i, l), AllocationSpace::New); - } - - for i in 0..100 { - match *l { - List::Nil => break, - List::Cons(data, tail) => { - assert_eq!(data, 99 - i); - l = tail; - } - } - } -} diff --git a/arc-runtime/tests/basic.rs b/arc-runtime/tests/basic.rs deleted file mode 100644 index 500238f23..000000000 --- a/arc-runtime/tests/basic.rs +++ /dev/null @@ -1,75 +0,0 @@ -#![allow(unused_mut)] -#![allow(unreachable_code)] -#![allow(unused_variables)] -#![feature(arbitrary_self_types)] -use arc_runtime::data::channels::local::multicast::*; -use arc_runtime::prelude::*; - -#[derive(ComponentDefinition)] -struct DoThing { - ctx: ComponentContext, - a: Pullable, - b: Pullable, - c: Pushable, -} - -impl Actor for DoThing { - type Message = TaskMessage; - - fn receive_local(&mut self, msg: Self::Message) -> Handled { - Handled::Ok - } - - fn receive_network(&mut self, msg: kompact::prelude::NetMessage) -> Handled { - Handled::Ok - } -} - -impl DoThing { - fn new(a: Pullable, b: Pullable, c: Pushable) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - a, - b, - c, - } - } - - async fn run(mut self: ComponentDefinitionAccess, ctx: Context) -> Control<()> { - loop { - let x = self.a.pull(ctx).await?; - let y = self.b.pull(ctx).await?; - self.c.push(x + y, ctx).await?; - } - Control::Finished - } -} - -fn do_thing(a: Pullable, b: Pullable, ctx: Context) -> Pullable { - let (c0, c1): (Pushable, Pullable) = channel(ctx); - let task = ctx.component().system().create(move || DoThing::new(a, b, c0)); - ctx.component().system().start(&task); - c1 -} - -impl ComponentLifecycle for DoThing { - fn on_start(&mut self) -> Handled { - self.spawn_local(move |mut async_self| async move { - let ctx = todo!(); - async_self.run(ctx).await; - Handled::DieNow - }); - Handled::Ok - } -} - -fn read_stream() -> Pullable { - todo!() -} - -fn main() { - let ctx = todo!(); - let a: Pullable = read_stream(); - let b: Pullable = read_stream(); - let c = do_thing(a, b, ctx); -} diff --git a/arc-runtime/tests/closures.rs b/arc-runtime/tests/closures.rs deleted file mode 100644 index db1340cfc..000000000 --- a/arc-runtime/tests/closures.rs +++ /dev/null @@ -1,26 +0,0 @@ -#![allow(unused)] - -#[allow(non_camel_case_types)] -#[cfg(test)] -mod test_toplevel { - - use arc_runtime::prelude::*; - - declare_functions!(f); - - #[rewrite] - fn f(a: i32) -> i32 { - a + a - } - - #[rewrite(main)] - #[test] - fn test() { - let x: function!((i32) -> i32) = function!(f); - let y: function!((i32,) -> i32) = function!(f); - let y: i32 = call_indirect!(x(1)); - let y: i32 = call_indirect!(x(1,)); - let z: i32 = call!(f(1)); - let z: i32 = call!(f(1,)); - } -} diff --git a/arc-runtime/tests/context.rs b/arc-runtime/tests/context.rs deleted file mode 100644 index d871c47f5..000000000 --- a/arc-runtime/tests/context.rs +++ /dev/null @@ -1,76 +0,0 @@ -#![allow(unused_mut)] -#![allow(unreachable_code)] -#![allow(unused_variables)] -#![feature(arbitrary_self_types)] -use arc_runtime::data::channels::local::multicast::*; -use arc_runtime::prelude::*; - -#[derive(ComponentDefinition)] -struct DoThing { - ctx: ComponentContext, - a: Pullable, - b: Pullable, - c: Pushable, -} - -impl Actor for DoThing { - type Message = TaskMessage; - - fn receive_local(&mut self, msg: Self::Message) -> Handled { - Handled::Ok - } - - fn receive_network(&mut self, msg: kompact::prelude::NetMessage) -> Handled { - Handled::Ok - } -} - -impl DoThing { - fn new(a: Pullable, b: Pullable, c: Pushable) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - a, - b, - c, - } - } - - async fn run(mut self: ComponentDefinitionAccess, ctx: Context) -> Control<()> { - loop { - let x = self.a.pull(ctx).await?; - let y = self.b.pull(ctx).await?; - self.c.push(x + y, ctx).await?; - } - Control::Finished - } -} - -fn do_thing(a: Pullable, b: Pullable, ctx: Context) -> Pullable { - let (c0, c1): (Pushable, Pullable) = channel(ctx); - let task = ctx.component().system().create(move || DoThing::new(a, b, c0)); - ctx.component().system().start(&task); - c1 -} - -impl ComponentLifecycle for DoThing { - fn on_start(&mut self) -> Handled { - self.spawn_local(move |mut async_self| async move { - let ctx = todo!(); - async_self.run(ctx).await; - Handled::DieNow - }); - futures::task::waker_ref(&self.ctx.typed_component()); - Handled::Ok - } -} - -fn read_stream() -> Pullable { - todo!() -} - -fn main() { - let ctx = todo!(); - let a: Pullable = read_stream(); - let b: Pullable = read_stream(); - let c = do_thing(a, b, ctx); -} diff --git a/arc-runtime/tests/externs.rs b/arc-runtime/tests/externs.rs deleted file mode 100644 index b70ffc9ac..000000000 --- a/arc-runtime/tests/externs.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![allow(unused)] - -use arc_runtime::prelude::*; - -#[rewrite(unmangled = "identity")] -fn identity_i32(x: i32) -> i32 {} - -#[rewrite(unmangled = "identity")] -fn identity_i64(x: i64) -> i64 {} - -#[rewrite(unmangled = "identity")] -fn identity_i128(x: i128) -> i128 {} - -#[rewrite] -fn identity(x: T) -> T { - x -} diff --git a/arc-runtime/tests/functions.rs b/arc-runtime/tests/functions.rs deleted file mode 100644 index 13558cf2e..000000000 --- a/arc-runtime/tests/functions.rs +++ /dev/null @@ -1,57 +0,0 @@ -#![allow(dead_code)] - -use arc_runtime::prelude::*; - -#[rewrite] -fn foo(x: i32) { - let a: i32 = x - 1; - if x == 0 { - println!("Hello, world!"); - } else { - foo((a,)) - } -} - -// Expands into: - -// fn _foo(x: i32, ctx: Context) { -// let a: i32 = x - 1; -// if x == 0 { -// println!("Hello, world!"); -// } else { -// _foo(a, ctx) -// } -// } - -#[rewrite(main)] -fn main() { - let x: String = String::from_str("Hello, world!"); - let y: &str = "Hello, world!"; - let _z: unit = String::push_str(x, y); -} - -// Expands into: - -// fn _bar() { -// let system = &KompactConfig::default().build().unwrap(); -// let mutator = &mut instantiate_immix(ImmixOptions::default()); -// let ctx = Context::new(system, mutator); -// -// let stack: &ShadowStack = &ctx.mutator.shadow_stack(); -// let value = String::from_str("Hello, world!", ctx); -// #[allow(unused_unsafe)] -// let mut x = unsafe { -// ShadowStackInternal::::construct( -// stack, -// stack.head.get(), -// core::mem::transmute::<_, TraitObject>(&value as &dyn Rootable).vtable as usize, -// value, -// ) -// }; -// #[allow(unused_unsafe)] -// stack.head.set(unsafe { core::mem::transmute(&mut x) }); -// #[allow(unused_mut)] -// let mut x = unsafe { Rooted::construct(&mut x.value) }; -// let y: &str = "Hello, world!"; -// let _z: unit = String::push_str(x.clone(), y, ctx); -// } diff --git a/arc-runtime/tests/future.rs b/arc-runtime/tests/future.rs deleted file mode 100644 index c744f83cb..000000000 --- a/arc-runtime/tests/future.rs +++ /dev/null @@ -1,130 +0,0 @@ -// #![allow(unused)] -#![feature(never_type)] -#![allow(unused)] - -use arc_runtime::prelude::*; -use std::future::Future; -use std::pin::Pin; -use std::rc::Rc; -use std::task::Context as PollContext; -use std::task::Poll; - -use futures::future::BoxFuture; -use futures::FutureExt; - -use arc_runtime::data::channels::local::multicast::channel; -use arc_runtime::data::channels::local::multicast::Pullable; -use arc_runtime::data::channels::local::multicast::Pushable; - -enum State { - State0 { - a: Pullable, - b: Pushable, - }, - State1 { - a: Pullable, - b: Pushable, - pull: BoxFuture<'static, Control>, - }, - State3 { - a: Pullable, - b: Pushable, - push: BoxFuture<'static, Control<()>>, - }, -} - -impl Future for State { - type Output = (); - - fn poll(self: Pin<&mut Self>, cx: &mut PollContext<'_>) -> Poll { - let ctx = todo!(); - replace_with::replace_with_or_abort_and_return(self.get_mut(), |state| state.transition(cx, ctx)) - } -} - -impl State { - fn transition(self, cx: &mut PollContext<'_>, ctx: Context) -> (Poll<()>, Self) { - match self { - State::State0 { mut a, b } => { - let pull = a.pull(ctx).boxed(); - let pull = unsafe { std::mem::transmute(pull) }; - (Poll::Pending, State::State1 { a, b, pull }) - } - State::State1 { a, b, mut pull } => { - if let Poll::Ready(Control::Continue(x)) = pull.as_mut().poll(cx) { - let push = b.push(x, ctx).boxed(); - let push = unsafe { std::mem::transmute(push) }; - (Poll::Pending, State::State3 { a, b, push }) - } else { - (Poll::Pending, State::State1 { a, b, pull }) - } - } - State::State3 { a, b, mut push } => { - if let Poll::Ready(Control::Continue(())) = push.as_mut().poll(cx) { - (Poll::Pending, State::State0 { a, b }) - } else { - (Poll::Pending, State::State3 { a, b, push }) - } - } - } - } -} - -#[derive(ComponentDefinition)] -struct DoThing { - ctx: ComponentContext, - a: Pullable, - b: Pushable, -} - -impl Actor for DoThing { - type Message = TaskMessage; - - fn receive_local(&mut self, msg: Self::Message) -> Handled { - Handled::Ok - } - - fn receive_network(&mut self, msg: kompact::prelude::NetMessage) -> Handled { - Handled::Ok - } -} - -impl ComponentLifecycle for DoThing { - fn on_start(&mut self) -> Handled { - self.spawn_local(move |async_self| async move { - State::State0 { - a: async_self.a.clone(), - b: async_self.b.clone(), - } - .await; - Handled::DieNow - }); - Handled::Ok - } -} - -impl DoThing { - fn new(a: Pullable, b: Pushable) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - a, - b, - } - } -} - -fn do_thing(a: Pullable, ctx: Context) -> Pullable { - let (b0, b1): (Pushable, Pullable) = channel(ctx); - ctx.launch(move || DoThing::new(a, b0)); - b1 -} - -fn read_stream() -> Pullable { - todo!() -} - -fn main() { - let ctx = todo!(); - let a: Pullable = read_stream(); - let b: Pullable = do_thing(a, ctx); -} diff --git a/arc-runtime/tests/generic_struct_rewrite.rs b/arc-runtime/tests/generic_struct_rewrite.rs deleted file mode 100644 index ce331a168..000000000 --- a/arc-runtime/tests/generic_struct_rewrite.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![allow(unused)] - -use arc_runtime::prelude::*; - -#[rewrite] -pub struct Foo { - pub a: A, -} - -#[rewrite] -pub struct Bar { - pub a: A, - pub b: B, -} - -type Baz = Bar, Bar>; diff --git a/arc-runtime/tests/nonpersistent_task.rs b/arc-runtime/tests/nonpersistent_task.rs deleted file mode 100644 index d3ff1de10..000000000 --- a/arc-runtime/tests/nonpersistent_task.rs +++ /dev/null @@ -1,43 +0,0 @@ -use arc_runtime::prelude::*; - -declare_functions!(f); - -#[rewrite] -fn f(x: i32) -> i32 { - x + 1 -} - -#[rewrite(nonpersistent)] -async fn source(mut i: Vec, #[output] mut o: Pushable) { - for x in i.into_iter().cloned() { - push!(o, x); - } -} - -#[rewrite(nonpersistent)] -async fn map(mut i: Pullable, mut f: function!((i32) -> i32), #[output] mut o: Pushable) { - loop { - let x = pull!(i); - let y = call_indirect!(f(x)); - push!(o, y); - } -} - -#[rewrite(nonpersistent)] -async fn log(mut i: Pullable) { - loop { - println!("Logging {}", pull!(i)); - } -} - -use arc_runtime::data::channels::local::multicast::Pullable; - -#[rewrite(main)] -#[test] -fn rewrite_impersistent_task() { - let v: Vec = vector![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; - let s: Pullable = call!(source(v)); - let f: function!((i32) -> i32) = function!(f); - let s: Pullable = call!(map(s, f)); - call!(log(s)); -} diff --git a/arc-runtime/tests/persistent_task.rs b/arc-runtime/tests/persistent_task.rs deleted file mode 100644 index c3125de44..000000000 --- a/arc-runtime/tests/persistent_task.rs +++ /dev/null @@ -1,114 +0,0 @@ -use arc_runtime::prelude::*; - -declare_functions!(x); - -// #[rewrite(nonpersistent)] -// mod source { -// fn task(i: Vec, #[output] o: Pushable) { -// for x in i.into_iter().cloned() { -// push!(o, x); -// } -// } -// } - -#[rewrite(persistent)] -mod map { - fn task(a: Pullable, f: function!((i32) -> i32), #[output] b: Pushable) {} - - struct State0 { - a: Pullable, - f: function!((i32) -> i32), - b: Pushable, - } - - struct State1 { - a: Pullable, - f: function!((i32) -> i32), - b: Pushable, - pull: BoxFuture<'static, Control>, - } - - struct State2 { - a: Pullable, - f: function!((i32) -> i32), - b: Pushable, - push: BoxFuture<'static, Control<()>>, - } - - struct State3 {} - - enum State { - State0(State0), - State1(State1), - State2(State2), - State3(State3), - } - - fn transition0( - State0 { - mut a, - mut b, - mut f, - }: State0, - _cx: &mut PollContext, - ctx: Context, - ) -> (Poll<()>, State) { - pull_transition!(pull, a, State1 { a, b, f, pull }); - } - - fn transition1( - State1 { - mut a, - mut b, - mut f, - mut pull, - }: State1, - cx: &mut PollContext, - ctx: Context, - ) -> (Poll<()>, State) { - let x = wait!(pull, cx, State1 { a, b, f, pull }, State3 {}); - let y = call_indirect!(f(x)); - push_transition!(push, b, y, State2 { a, b, f, push }); - } - - fn transition2( - State2 { - mut a, - mut b, - mut f, - mut push, - }: State2, - cx: &mut PollContext, - ctx: Context, - ) -> (Poll<()>, State) { - wait!(push, cx, State2 { a, b, f, push }, State0 { a, b, f }); - transition!(State0 { a, b, f }); - } - - fn transition3(State3 {}: State3, _cx: &mut PollContext, ctx: Context) -> (Poll<()>, State) { - unreachable!() - } -} - -// #[rewrite(nonpersistent)] -// mod log { -// fn task(i: Pullable) { -// loop { -// println!("Logging {}", pull!(i)); -// } -// } -// } - -#[rewrite] -fn x(x: i32) -> i32 { - x + 1 -} - -// #[rewrite(main)] -// #[test] -// fn rewrite_impersistent_task() { -// let v = vector!(1i32, 2, 3); -// let s = direct_call!(source(*v)); -// let s = direct_call!(map(*s, function!(x))); -// let s = direct_call!(log(*s)); -// } diff --git a/arc-runtime/tests/source_map_log.rs b/arc-runtime/tests/source_map_log.rs deleted file mode 100644 index 873d63676..000000000 --- a/arc-runtime/tests/source_map_log.rs +++ /dev/null @@ -1,235 +0,0 @@ -#![allow(unused)] -#![feature(arbitrary_self_types)] -#![allow(unused_mut)] - -macro_rules! compile_test { - {$($mod:tt)::+} => { - use arc_runtime::prelude::*; - - // NOTE: The `where` clause is not necessary when we have monomorphised the code. - #[derive(ComponentDefinition)] - struct Source where T::T: Sendable { - ctx: ComponentContext, - vec: Vec, - pushable: $($mod)::+::Pushable, - } - - #[derive(ComponentDefinition)] - struct Map where A::T: Sendable, B::T: Sendable { - ctx: ComponentContext, - pullable: $($mod)::+::Pullable, - fun: fn(A) -> B, - pushable: $($mod)::+::Pushable, - } - - #[derive(ComponentDefinition)] - struct Log where T::T: Sendable { - ctx: ComponentContext, - pullable: $($mod)::+::Pullable, - } - - impl Source where T::T: Sendable { - fn new(vec: Vec, pushable: $($mod)::+::Pushable) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - vec, - pushable, - } - } - - async fn run(mut self: ComponentDefinitionAccess, ctx: Context) -> Control<()> { - let i = self.vec.clone(); - for x in 0..i.clone().len(ctx) { - let j = i.clone(); - let v = j.get(x, ctx); - self.pushable.push(v.clone(), ctx).await?; - } - Control::Finished - } - } - - impl Map where A::T: Sendable, B::T: Sendable { - fn new(pullable: $($mod)::+::Pullable, f: fn(A) -> B, pushable: $($mod)::+::Pushable) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - pullable, - fun: f, - pushable, - } - } - - async fn run(mut self: ComponentDefinitionAccess, ctx: Context) -> Control<()> { - let f = self.fun; - loop { - let data = self.pullable.pull(ctx).await?; - self.pushable.push(f(data), ctx).await?; - } - } - } - - impl Log where T::T: Sendable { - fn new(pullable: $($mod)::+::Pullable) -> Self { - Self { - ctx: ComponentContext::uninitialised(), - pullable, - } - } - - async fn run(mut self: ComponentDefinitionAccess, ctx: Context) -> Control<()> { - loop { - let data = self.pullable.pull(ctx).await?; - info!(self.log(), "Logging {:?}", data); - } - } - } - - impl ComponentLifecycle for Source where T::T: Sendable { - fn on_start(&mut self) -> Handled { - self.spawn_local(move |async_self| async move { - let component = async_self.ctx().component(); - let mutator = instantiate_immix(ImmixOptions::default()); - let ctx = Context::new(component, mutator); - async_self.run(ctx).await; - Handled::DieNow - }); - Handled::Ok - } - } - - impl ComponentLifecycle for Map where A::T: Sendable, B::T: Sendable { - fn on_start(&mut self) -> Handled { - self.spawn_local(move |async_self| async move { - let component = async_self.ctx().component(); - let mutator = instantiate_immix(ImmixOptions::default()); - let ctx = Context::new(component, mutator); - async_self.run(ctx).await; - Handled::DieNow - }); - Handled::Ok - } - } - - impl ComponentLifecycle for Log where T::T: Sendable { - fn on_start(&mut self) -> Handled { - self.spawn_local(move |async_self| async move { - let component = async_self.ctx().component(); - let mutator = instantiate_immix(ImmixOptions::default()); - let ctx = Context::new(component, mutator); - async_self.run(ctx).await; - Handled::DieNow - }); - Handled::Ok - } - } - - impl Actor for Source where T::T: Sendable { - type Message = TaskMessage; - - fn receive_local(&mut self, _msg: Self::Message) -> Handled { - Handled::Ok - } - - fn receive_network(&mut self, _msg: NetMessage) -> Handled { - unreachable!() - } - } - - impl Actor for Map where A::T: Sendable, B::T: Sendable { - type Message = TaskMessage; - - fn receive_local(&mut self, _msg: Self::Message) -> Handled { - Handled::Ok - } - - fn receive_network(&mut self, _msg: NetMessage) -> Handled { - unreachable!() - } - } - - impl Actor for Log where T::T: Sendable { - type Message = TaskMessage; - - fn receive_local(&mut self, _msg: Self::Message) -> Handled { - Handled::Ok - } - - fn receive_network(&mut self, _msg: NetMessage) -> Handled { - unreachable!() - } - } - - fn source(vec: Vec, ctx: Context) -> $($mod)::+::Pullable where T::T: Sendable { - let (o0, o1) = $($mod)::+::channel(ctx); - ctx.launch(move || Source::new(vec, o0)); - o1 - } - - fn map(a: $($mod)::+::Pullable, f: fn(A) -> B, ctx: Context) -> $($mod)::+::Pullable where A::T: Sendable, B::T: Sendable { - let (b0, b1) = $($mod)::+::channel(ctx); - ctx.launch(move || Map::new(a, f, b0)); - b1 - } - - fn log(a: $($mod)::+::Pullable, ctx: Context) where T::T: Sendable { - ctx.launch(move || Log::new(a)); - } - - fn plus_one(x: i32) -> i32 { - x + 1 - } - - #[derive(ComponentDefinition, Actor)] - struct Main { - ctx: ComponentContext, - } - - impl Main { - fn new() -> Self { - Self { - ctx: ComponentContext::uninitialised() - } - } - } - - fn run_main(ctx: Context) { - let v = vector![1i32, 2, 3]; - let v = source(v, ctx); - let v = map(v, plus_one, ctx); - let _ = log(v, ctx); - } - - impl ComponentLifecycle for Main { - fn on_start(&mut self) -> Handled { - let component = self.ctx().component(); - let mutator = instantiate_immix(ImmixOptions::default()); - let ctx = Context::new(component, mutator); - run_main(ctx); - self.ctx().system().shutdown_async(); - Handled::DieNow - } - } - - fn main() { - let system = KompactConfig::default().build().unwrap(); - let main = system.create(move || Main::new()); - system.start(&main); - system.await_termination(); - } - } -} - -// mod source_map_log_remote_concurrent { -// compile_test!(arc_runtime::data::channels::remote::concurrent); -// } - -// mod source_map_log_remote_broadcast { -// compile_test!(arc_runtime::data::channels::remote::broadcast); -// } - -// mod source_map_log_local_concurrent { -// compile_test!(arc_runtime::data::channels::local::task_parallel); -// } - -mod source_map_log_local_broadcast { - compile_test!(arc_runtime::data::channels::local::multicast); -} diff --git a/arc-runtime/tests/types.rs b/arc-runtime/tests/types.rs deleted file mode 100644 index 83299fa3b..000000000 --- a/arc-runtime/tests/types.rs +++ /dev/null @@ -1,106 +0,0 @@ -mod basic1 { - use arc_runtime::prelude::*; - #[rewrite] - pub struct Point { - pub x: i32, - pub y: i32, - } - - #[rewrite] - pub enum Foo { - FooBar(i32), - FooBaz(f32), - } -} - -mod basic2 { - use arc_runtime::prelude::*; - #[rewrite] - pub struct A { - pub b: B, - } - - #[rewrite] - pub struct B { - pub c: i32, - } -} - -mod basic3 { - use arc_runtime::prelude::*; - #[rewrite] - pub enum A { - AB(B), - AC(C), - } - - #[rewrite] - pub struct B { - pub v: i32, - } - - #[rewrite] - pub struct C {} -} - -mod list { - use arc_runtime::prelude::*; - - #[rewrite] - pub enum List { - ListCons(Cons), - ListNil(unit), - } - - #[rewrite] - pub struct Cons { - pub v: i32, - pub t: List, - } - - #[rewrite(main)] - #[test] - fn test() { - let l: List = enwrap!(ListNil, unit); - let _x: bool = is!(ListCons, l); - let h: Cons = new!(Cons { v: 5, t: l }); - let l: List = enwrap!(ListCons, h); - let h: Cons = unwrap!(ListCons, l); - assert_eq!(h.v, 5); - } -} - -mod structs { - use arc_runtime::prelude::*; - - #[rewrite] - pub struct Foo { - pub a: i32, - pub b: Bar, - } - - #[rewrite] - pub struct Bar {} - - #[rewrite(main)] - #[test] - fn test() { - let x0: Bar = new!(Bar {}); - let _f: Foo = new!(Foo { a: 0, b: x0 }); - } -} - -mod unit { - use arc_runtime::prelude::*; - - #[rewrite] - pub enum Foo { - FooBar(unit), - } - - #[rewrite(main)] - #[test] - fn test() { - let _x: Foo = enwrap!(FooBar, unit); - } -} diff --git a/arc-sys/.cargo/config.toml b/arc-sys/.cargo/config.toml new file mode 100644 index 000000000..bff29e6e1 --- /dev/null +++ b/arc-sys/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +rustflags = ["--cfg", "tokio_unstable"] diff --git a/arc-sys/Cargo.lock b/arc-sys/Cargo.lock new file mode 100644 index 000000000..d07692c13 --- /dev/null +++ b/arc-sys/Cargo.lock @@ -0,0 +1,3843 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", + "opaque-debug", +] + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.8", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + +[[package]] +name = "anyhow" +version = "1.0.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" + +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + +[[package]] +name = "async-stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-trait" +version = "0.1.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6e93155431f3931513b243d371981bb2770112b370c82745a1d19d2f99364" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "axum" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678c5130a507ae3a7c797f9a17393c14849300b8440eac47cdb90a5bdcb3a543" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa 1.0.4", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-http", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cae3e661676ffbacb30f1a824089a8c9150e71017f7e1e38f2aa32009188d34" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" + +[[package]] +name = "base64ct" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" + +[[package]] +name = "bindgen" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd4865004a46a0aafb2a0a5eb19d3c9fc46ee5f063a6cfc605c69ac9ecf5263d" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", +] + +[[package]] +name = "bit_field" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb6dd1c2376d2e096796e234a70e17e94cc2d5d54ff8ce42b28cef1d0d359a4" + +[[package]] +name = "bitflags" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "block-buffer" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +dependencies = [ + "generic-array", +] + +[[package]] +name = "boringssl-src" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0511b9f0b739706e05b7279ece5dfc1932a42839cf005cb0f00420a3fea27c96" +dependencies = [ + "cmake", +] + +[[package]] +name = "bstr" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +dependencies = [ + "lazy_static", + "memchr", + "regex-automata", + "serde", +] + +[[package]] +name = "bumpalo" +version = "3.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" + +[[package]] +name = "bytemuck" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" + +[[package]] +name = "bzip2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "cc" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cexpr" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +dependencies = [ + "nom 5.1.2", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "clang-sys" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8d93d855ce6a0aa87b8473ef9169482f40abaa2e9e0993024c35c902cbd5920" +dependencies = [ + "bitflags 1.3.2", + "clap_derive", + "clap_lex", + "is-terminal", + "once_cell", + "strsim", + "termcolor", +] + +[[package]] +name = "clap_derive" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" +dependencies = [ + "heck 0.4.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "client" +version = "0.1.0" +dependencies = [ + "axum", + "clap", + "futures 0.3.25", + "reqwest", + "serde", + "serde_json", + "shared", + "tokio", + "tokio-futures", + "tokio-serde", + "tokio-stream", + "tokio-util", + "tracing", + "tracing-subscriber", + "which", +] + +[[package]] +name = "cmake" +version = "0.1.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" +dependencies = [ + "cc", +] + +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "console-api" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57ff02e8ad8e06ab9731d5dc72dc23bef9200778eae1a89d555d8c42e5d4a86" +dependencies = [ + "prost 0.11.5", + "prost-types 0.11.5", + "tonic", + "tracing-core", +] + +[[package]] +name = "console-subscriber" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22a3a81dfaf6b66bce5d159eddae701e3a002f194d378cbf7be5f053c281d9be" +dependencies = [ + "console-api", + "crossbeam-channel", + "crossbeam-utils", + "futures 0.3.25", + "hdrhistogram", + "humantime", + "prost-types 0.11.5", + "serde", + "serde_json", + "thread_local", + "tokio", + "tokio-stream", + "tonic", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "const_format" +version = "0.2.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7309d9b4d3d2c0641e018d449232f2e28f1b22933c137f157d3dbc14228b8c0e" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f47bf7270cf70d370f8f98c1abb6d2d4cf60a6845d30e05bfb90c6568650" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "coordinator" +version = "0.1.0" +dependencies = [ + "axum", + "clap", + "crepe", + "futures 0.3.25", + "halfbrown", + "indoc", + "itertools 0.10.5", + "proc-macro2", + "quote", + "raw-cpuid", + "regex", + "rust-format", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "shared", + "tokio", + "tokio-futures", + "tokio-rustls", + "tokio-serde", + "tokio-stream", + "tokio-util", + "tracing", + "which", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + +[[package]] +name = "cpufeatures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crepe" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "493fa2eaae544a976a9e60394d012254515885d19015e75f5d7cfb28a5db1069" +dependencies = [ + "petgraph 0.6.2", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "csv" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +dependencies = [ + "bstr", + "csv-core", + "itoa 0.4.8", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +dependencies = [ + "memchr", +] + +[[package]] +name = "curl" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" +dependencies = [ + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2", + "winapi 0.3.9", +] + +[[package]] +name = "curl-sys" +version = "0.4.59+curl-7.86.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cfce34829f448b08f55b7db6d0009e23e2e86a34e8c2b366269bf5799b4a407" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "winapi 0.3.9", +] + +[[package]] +name = "dataflow" +version = "0.1.0" +dependencies = [ + "arrayvec", + "cfg-if", + "csv", + "derive_more", + "futures 0.3.25", + "hexf", + "hwloc", + "image", + "libc", + "macros", + "num 0.4.0", + "num-traits", + "num_cpus", + "rdkafka", + "serde", + "serde_derive", + "serde_json", + "sled", + "tensorflow", + "tikv-client", + "time", + "tokio", + "tokio-rustls", + "tokio-serde", + "tokio-stream", + "tokio-util", +] + +[[package]] +name = "derive-new" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "digest" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "educe" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0188e3c3ba8df5753894d54461f0e39bc91741dc5b22e1c46999ec2c71f4e4" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "either" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" + +[[package]] +name = "encoding_rs" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-ordinalize" +version = "3.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bb1df8b45ecb7ffa78dca1c17a438fb193eb083db0b1b494d2a61bcb5096a" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "rustc_version", + "syn", +] + +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "exr" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb5f255b5980bb0c8cf676b675d1a99be40f316881444f44e0462eaf5df5ded" +dependencies = [ + "bit_field", + "flume", + "half 2.1.0", + "lebe", + "miniz_oxide", + "smallvec", + "threadpool", +] + +[[package]] +name = "fail" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be3c61c59fdc91f5dbc3ea31ee8623122ce80057058be560654c5d410d181a6" +dependencies = [ + "lazy_static", + "log", + "rand 0.7.3", +] + +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + +[[package]] +name = "filetime" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "windows-sys 0.42.0", +] + +[[package]] +name = "fixedbitset" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "flume" +version = "0.10.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "pin-project", + "spin 0.9.4", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "futures" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" + +[[package]] +name = "futures" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" + +[[package]] +name = "futures-executor" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" + +[[package]] +name = "futures-macro" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" + +[[package]] +name = "futures-task" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-timer" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" + +[[package]] +name = "futures-util" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +dependencies = [ + "futures 0.1.31", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "gif" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "grpcio" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99cf790272c5fb75a2fd7f2e8282e910d0fe0ed1d954cb29b07b74228694302a" +dependencies = [ + "bytes", + "futures 0.3.25", + "grpcio-sys", + "libc", + "log", + "parking_lot 0.11.2", + "prost 0.7.0", +] + +[[package]] +name = "grpcio-compiler" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad402dbef95d726c4170fc69209c4d669a199c6462c63c69d67fa1d8f44511f4" +dependencies = [ + "derive-new", + "prost 0.11.5", + "prost-build 0.11.5", + "prost-types 0.11.5", + "tempfile", +] + +[[package]] +name = "grpcio-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f89a56d830be4dddc939c377c95e3b77e30c86a8df99c20095c34cf9038447b" +dependencies = [ + "bindgen", + "boringssl-src", + "cc", + "cmake", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "walkdir", +] + +[[package]] +name = "h2" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "half" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554" +dependencies = [ + "crunchy", +] + +[[package]] +name = "halfbrown" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e2a3c70a9c00cc1ee87b54e89f9505f73bb17d63f1b25c9a462ba8ef885444f" +dependencies = [ + "hashbrown 0.13.1", + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.6", +] + +[[package]] +name = "hashbrown" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038" +dependencies = [ + "ahash 0.8.2", +] + +[[package]] +name = "hdrhistogram" +version = "7.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f19b9f54f7c7f55e31401bb647626ce0cf0f67b0004982ce815b3ee72a02aa8" +dependencies = [ + "base64 0.13.1", + "byteorder", + "flate2", + "nom 7.1.2", + "num-traits", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hexf" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6618f4550dcd7d9ddb5126ab18d48dfa31aa952159cb832390bda464d3bc827e" +dependencies = [ + "hexf-parse", + "syn", +] + +[[package]] +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +dependencies = [ + "bytes", + "fnv", + "itoa 1.0.4", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hwloc" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2934f84993b8b4bcae9b6a4e5f0aca638462dda9c7b4f26a570241494f21e0f4" +dependencies = [ + "bitflags 0.7.0", + "errno", + "kernel32-sys", + "libc", + "num 0.1.42", + "pkg-config", + "winapi 0.2.8", +] + +[[package]] +name = "hyper" +version = "0.14.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa 1.0.4", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "image" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "exr", + "gif", + "jpeg-decoder", + "num-rational", + "num-traits", + "png", + "scoped_threadpool", + "tiff", +] + +[[package]] +name = "indexmap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indoc" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da2d6f23ffea9d7e76c53eee25dfb67bcd8fde7f1198b0855350698c9f07c780" + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" +dependencies = [ + "libc", + "windows-sys 0.42.0", +] + +[[package]] +name = "ipnet" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" + +[[package]] +name = "is-terminal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927609f78c2913a6f6ac3c27a4fe87f43e2a35367c0c4b0f8265e8f49a104330" +dependencies = [ + "hermit-abi", + "io-lifetimes", + "rustix", + "windows-sys 0.42.0", +] + +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + +[[package]] +name = "itoa" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" + +[[package]] +name = "jobserver" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +dependencies = [ + "libc", +] + +[[package]] +name = "jpeg-decoder" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" +dependencies = [ + "rayon", +] + +[[package]] +name = "js-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "lebe" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + +[[package]] +name = "libc" +version = "0.2.139" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi 0.3.9", +] + +[[package]] +name = "libz-sys" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + +[[package]] +name = "lock_api" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "macros" +version = "0.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matchit" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.42.0", +] + +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom 0.2.8", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nom" +version = "5.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +dependencies = [ + "memchr", + "version_check", +] + +[[package]] +name = "nom" +version = "7.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5507769c4919c998e69e49c839d9dc6e693ede4cc4290d6ad8b41d4f09c548c" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi 0.3.9", +] + +[[package]] +name = "num" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" +dependencies = [ + "num-integer", + "num-iter", + "num-traits", +] + +[[package]] +name = "num" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "once_cell" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl" +version = "0.10.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29d971fd5722fec23977260f6e81aa67d2f22cadbdc2aa049f1022d9a3be1566" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-src" +version = "111.24.0+1.1.1s" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3498f259dab01178c6228c6b00dcef0ed2a2d5e20d648c017861227773ea4abd" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5454462c0eced1e97f2ec09036abc8da362e66802f66fd20f86854d9d8cbcbc4" +dependencies = [ + "autocfg", + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "os_str_bytes" +version = "6.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.5", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi 0.3.9", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys 0.42.0", +] + +[[package]] +name = "password-hash" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "pbkdf2" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271779f35b581956db91a3e55737327a03aa051e90b1c47aeb189508533adfd7" +dependencies = [ + "digest", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "petgraph" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +dependencies = [ + "fixedbitset 0.2.0", + "indexmap", +] + +[[package]] +name = "petgraph" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" +dependencies = [ + "fixedbitset 0.4.2", + "indexmap", +] + +[[package]] +name = "pin-project" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + +[[package]] +name = "png" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "prettyplease" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c8992a85d8e93a28bdf76137db888d3874e3b230dee5ed8bebac4c9f7617773" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro-crate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +dependencies = [ + "once_cell", + "thiserror", + "toml", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "procfs" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8809e0c18450a2db0f236d2a44ec0b4c1412d0eb936233579f0990faa5d5cd" +dependencies = [ + "bitflags 1.3.2", + "byteorder", + "flate2", + "hex", + "lazy_static", + "libc", +] + +[[package]] +name = "prometheus" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5986aa8d62380092d2f50f8b1cdba9cb9b6731ffd4b25b51fd126b6c3e05b99c" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "libc", + "memchr", + "parking_lot 0.11.2", + "procfs", + "protobuf", + "reqwest", + "thiserror", +] + +[[package]] +name = "prost" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e6984d2f1a23009bd270b8bb56d0926810a3d483f59c987d77969e9d8e840b2" +dependencies = [ + "bytes", + "prost-derive 0.7.0", +] + +[[package]] +name = "prost" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c01db6702aa05baa3f57dec92b8eeeeb4cb19e894e73996b32a4093289e54592" +dependencies = [ + "bytes", + "prost-derive 0.11.5", +] + +[[package]] +name = "prost-build" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32d3ebd75ac2679c2af3a92246639f9fcc8a442ee420719cc4fe195b98dd5fa3" +dependencies = [ + "bytes", + "heck 0.3.3", + "itertools 0.9.0", + "log", + "multimap", + "petgraph 0.5.1", + "prost 0.7.0", + "prost-types 0.7.0", + "tempfile", + "which", +] + +[[package]] +name = "prost-build" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5320c680de74ba083512704acb90fe00f28f79207286a848e730c45dd73ed6" +dependencies = [ + "bytes", + "heck 0.4.0", + "itertools 0.10.5", + "lazy_static", + "log", + "multimap", + "petgraph 0.6.2", + "prettyplease", + "prost 0.11.5", + "prost-types 0.11.5", + "regex", + "syn", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "169a15f3008ecb5160cba7d37bcd690a7601b6d30cfb87a117d45e59d52af5d4" +dependencies = [ + "anyhow", + "itertools 0.9.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-derive" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8842bad1a5419bca14eac663ba798f6bc19c413c2fdceb5f3ba3b0932d96720" +dependencies = [ + "anyhow", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b518d7cdd93dab1d1122cf07fa9a60771836c668dde9d9e2a139f957f0d9f1bb" +dependencies = [ + "bytes", + "prost 0.7.0", +] + +[[package]] +name = "prost-types" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "017f79637768cde62820bc2d4fe0e45daaa027755c323ad077767c6c5f173091" +dependencies = [ + "bytes", + "prost 0.11.5", +] + +[[package]] +name = "protobuf" +version = "2.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf7e6d18738ecd0902d30d1ad232c9125985a3422929b16c65517b38adc14f96" + +[[package]] +name = "protobuf-build" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a7266835d38c38c73b091a24412de1f4b4382a5195fab1ec038161582b03b78" +dependencies = [ + "bitflags 1.3.2", + "grpcio-compiler", + "proc-macro2", + "prost-build 0.7.0", + "quote", + "syn", +] + +[[package]] +name = "quote" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.8", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "raw-cpuid" +version = "10.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6823ea29436221176fe662da99998ad3b4db2c7f31e7b6f5fe43adccd6320bb" +dependencies = [ + "bitflags 1.3.2", + "serde", +] + +[[package]] +name = "rayon" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "rdkafka" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd7c5d6d17442bcb9f943aae96d67d98c6d36af60442dd5da62aaa7fcbb25c48" +dependencies = [ + "futures-channel", + "futures-util", + "libc", + "log", + "rdkafka-sys", + "serde", + "serde_derive", + "serde_json", + "slab", + "tokio", +] + +[[package]] +name = "rdkafka-sys" +version = "4.3.0+1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d222a401698c7f2010e3967353eae566d9934dcda49c29910da922414ab4e3f4" +dependencies = [ + "libc", + "libz-sys", + "num_enum", + "pkg-config", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "reqwest" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" +dependencies = [ + "base64 0.21.0", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted", + "web-sys", + "winapi 0.3.9", +] + +[[package]] +name = "rust-format" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60e7c00b6c3bf5e38a880eec01d7e829d12ca682079f8238a464def3c4b31627" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.36.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.42.0", +] + +[[package]] +name = "rustls" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +dependencies = [ + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +dependencies = [ + "base64 0.21.0", +] + +[[package]] +name = "rustversion" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" + +[[package]] +name = "ryu" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +dependencies = [ + "lazy_static", + "windows-sys 0.36.1", +] + +[[package]] +name = "scoped_threadpool" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "security-framework" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" + +[[package]] +name = "serde" +version = "1.0.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +dependencies = [ + "indexmap", + "itoa 1.0.4", + "ryu", + "serde", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "184c643044780f7ceb59104cef98a5a6f12cb2288a7bc701ab93a362b49fd47d" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa 1.0.4", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shared" +version = "0.1.0" +dependencies = [ + "console-subscriber", + "const_format", + "halfbrown", + "indexmap", + "raw-cpuid", + "serde", + "serde_json", + "tokio", + "tokio-serde", + "tokio-util", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "shlex" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" + +[[package]] +name = "signal-hook-registry" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] +name = "sled" +version = "0.34.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" +dependencies = [ + "crc32fast", + "crossbeam-epoch", + "crossbeam-utils", + "fs2", + "fxhash", + "libc", + "log", + "parking_lot 0.11.2", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" +dependencies = [ + "lock_api", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" + +[[package]] +name = "tar" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "tempfile" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +dependencies = [ + "cfg-if", + "fastrand", + "libc", + "redox_syscall", + "remove_dir_all", + "winapi 0.3.9", +] + +[[package]] +name = "tensorflow" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "813259d8b797c862effd4fb000d9ce9bdcbaa02c2d8cfcd94ec7dc742842daa7" +dependencies = [ + "byteorder", + "crc", + "half 1.8.2", + "libc", + "num-complex", + "protobuf", + "rustversion", + "tensorflow-internal-macros", + "tensorflow-sys", +] + +[[package]] +name = "tensorflow-internal-macros" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4975c975b6d9c05a7cbf007ebc8e01e92e7e0907be9efcc74074857fc92ceb54" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tensorflow-sys" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba8ac1e8d3e408e14b49e7164cda710c6c992eaa76750b126ad3c5225eb18cfd" +dependencies = [ + "curl", + "flate2", + "libc", + "pkg-config", + "semver", + "tar", + "zip", +] + +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +dependencies = [ + "once_cell", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "tiff" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + +[[package]] +name = "tikv-client" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26904b386ca52ce25b3a620b397e6e4e93c4fd06d13c2c5936d9ac597f897263" +dependencies = [ + "async-trait", + "derive-new", + "fail", + "futures 0.3.25", + "futures-timer", + "grpcio", + "lazy_static", + "log", + "prometheus", + "rand 0.8.5", + "regex", + "serde", + "serde_derive", + "thiserror", + "tikv-client-common", + "tikv-client-pd", + "tikv-client-proto", + "tikv-client-store", + "tokio", +] + +[[package]] +name = "tikv-client-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72fc3bb3fbec1f2a3354d4bbe48501b23ea47b79da2ffaedeadcc8a6183188e4" +dependencies = [ + "futures 0.3.25", + "grpcio", + "lazy_static", + "log", + "regex", + "thiserror", + "tikv-client-proto", +] + +[[package]] +name = "tikv-client-pd" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cadef1633d4e7952d9a3a88211f03f71e9f90769a5b50c40b5eccc06408977" +dependencies = [ + "async-trait", + "futures 0.3.25", + "grpcio", + "log", + "tikv-client-common", + "tikv-client-proto", +] + +[[package]] +name = "tikv-client-proto" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9707c63c11c19b87b6eb3df40c6103d0f1e2f06b53445bad91a8c9e06407d9b" +dependencies = [ + "futures 0.3.25", + "grpcio", + "lazy_static", + "prost 0.7.0", + "prost-derive 0.7.0", + "protobuf", + "protobuf-build", +] + +[[package]] +name = "tikv-client-store" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ab348b60ef0a384985c488e25bf35721956b3b45332945f0841f9ac8a693586" +dependencies = [ + "async-trait", + "derive-new", + "futures 0.3.25", + "grpcio", + "log", + "tikv-client-common", + "tikv-client-proto", +] + +[[package]] +name = "time" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +dependencies = [ + "itoa 1.0.4", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" + +[[package]] +name = "time-macros" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +dependencies = [ + "time-core", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "tokio" +version = "1.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "parking_lot 0.12.1", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "tracing", + "windows-sys 0.42.0", +] + +[[package]] +name = "tokio-futures" +version = "0.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5c8ea7f4c1ea9cdb9fb03cba1522c23e9fb97eb1518c92b952093f93f86cd" + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-macros" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +dependencies = [ + "rustls", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" +dependencies = [ + "bytes", + "educe", + "futures-core", + "futures-sink", + "pin-project", + "serde", + "serde_json", +] + +[[package]] +name = "tokio-stream" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "futures-util", + "hashbrown 0.12.3", + "pin-project-lite", + "slab", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +dependencies = [ + "serde", +] + +[[package]] +name = "tonic" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64 0.13.1", + "bytes", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost 0.11.5", + "prost-derive 0.11.5", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tower-layer", + "tower-service", + "tracing", + "tracing-futures", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap", + "pin-project", + "pin-project-lite", + "rand 0.8.5", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +dependencies = [ + "bitflags 1.3.2", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-log" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +dependencies = [ + "lazy_static", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unicode-bidi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + +[[package]] +name = "unicode-ident" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi 0.3.9", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "web-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "weezl" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" + +[[package]] +name = "which" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +dependencies = [ + "either", + "libc", + "once_cell", +] + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "worker" +version = "0.1.0" +dependencies = [ + "axum", + "clap", + "futures 0.3.25", + "num_cpus", + "raw-cpuid", + "serde", + "shared", + "tokio", + "tokio-futures", + "tokio-serde", + "tokio-stream", + "tokio-util", + "tracing", +] + +[[package]] +name = "xattr" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +dependencies = [ + "libc", +] + +[[package]] +name = "zip" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf225bcf73bb52cbb496e70475c7bd7a3f769df699c0020f6c7bd9a96dcf0b8d" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.10.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4a6bd64f22b5e3e94b4e238669ff9f10815c27a5180108b849d24174a83847" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "4.1.6+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b61c51bb270702d6167b8ce67340d2754b088d0c091b06e593aa772c3ee9bb" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "1.6.3+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc49afa5c8d634e75761feda8c592051e7eeb4683ba827211eb0d731d3402ea8" +dependencies = [ + "cc", + "libc", +] diff --git a/arc-sys/Cargo.toml b/arc-sys/Cargo.toml new file mode 100644 index 000000000..090e77a23 --- /dev/null +++ b/arc-sys/Cargo.toml @@ -0,0 +1,10 @@ +[workspace] + +members = [ + "coordinator", + "worker", + "client", + "shared", + "dataflow", + "dataflow/macros", +] diff --git a/arc-sys/README.md b/arc-sys/README.md new file mode 100644 index 000000000..1da6d3203 --- /dev/null +++ b/arc-sys/README.md @@ -0,0 +1,15 @@ +# Runtime System + +This workspace defines Arc-Lang's runtime system. + +# Startup: + +```sh +docker-compose up -d +``` + +# Shutdown: + +```sh +docker-compose down +``` diff --git a/arc-sys/client/Cargo.toml b/arc-sys/client/Cargo.toml new file mode 100644 index 000000000..d5bf28237 --- /dev/null +++ b/arc-sys/client/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "client" +version = "0.1.0" +edition = "2021" + +[features] +build-arc-lang = [] +default = ["build-arc-lang"] + +[dependencies] +shared = { path = "../shared" } +axum = { version = "0.6.3" } +clap = { version = "4.1.3", features = ["derive"] } +futures = { version = "0.3.25" } +serde = { version = "1.0.152", features = ["derive"] } +tokio = { version = "1.24.2", features = ["full"] } +tokio-futures = { version = "0.0.0" } +tokio-serde = { version = "0.8.0", features = ["json"] } +tokio-stream = { version = "0.1.11" } +tokio-util = { version = "0.7.4", features = ["full"] } +tracing = { version = "0.1.37" } +tracing-subscriber = { version = "0.3.16" } +reqwest = { version = "0.11.14", features = ["json"] } +serde_json = { version = "1.0.91" } +which = { version = "4.4.0" } + +[build-dependencies] +which = "4.4.0" diff --git a/arc-sys/client/build.rs b/arc-sys/client/build.rs new file mode 100644 index 000000000..96369827f --- /dev/null +++ b/arc-sys/client/build.rs @@ -0,0 +1,39 @@ +use std::io::BufRead; +use std::path::Path; +use std::process::exit; +use std::process::Command; +use std::process::Stdio; + +fn main() { + if std::env::var("ARC_LANG_CMD").is_ok() { + return; + } else if let Ok(path) = which::which("arc-mlir") { + println!("cargo:rustc-env=ARC_LANG_CMD={}", path.display()); + } else { + let out_dir = std::env::var("OUT_DIR").unwrap(); + let arc_lang_cmd = Path::new(&out_dir).join("arc-lang/install/default/bin/main"); + if !arc_lang_cmd.exists() { + which::which("dune").expect("dune not found in PATH"); + let mut child = Command::new("dune") + .arg("build") + .arg("--root") + .arg(Path::new(env!("CARGO_MANIFEST_DIR")).join("../../arc-lang")) + .stderr(Stdio::piped()) + .arg("--build-dir") + .arg(Path::new(&out_dir).join("arc-lang")) + .spawn() + .expect("dune failed"); + if std::env::var("ARC_CLIENT_DEBUG").is_ok() { + println!("cargo:warning=Building Arc-Lang ..."); + for line in std::io::BufReader::new(child.stderr.as_mut().unwrap()).lines() { + println!("cargo:warning={}", line.unwrap()); + } + } + let status = child.wait().expect("CMake failed"); + if !status.success() { + exit(status.code().expect("CMake was terminated")); + } + } + println!("cargo:rustc-env=ARC_LANG_CMD={}", arc_lang_cmd.display()); + } +} diff --git a/arc-sys/client/src/coordinator_connector.rs b/arc-sys/client/src/coordinator_connector.rs new file mode 100644 index 000000000..93631e406 --- /dev/null +++ b/arc-sys/client/src/coordinator_connector.rs @@ -0,0 +1,66 @@ +use std::net::SocketAddr; + +use futures::SinkExt; +use shared::api::CoordinatorAPI; +use tokio::net::TcpStream; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_util::codec::FramedRead; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +use crate::coordinator_receiver::CoordinatorReceiver; +use crate::coordinator_sender::CoordinatorSender; + +use super::server::Server; + +struct Actor { + addr: SocketAddr, + server: Server, +} + +impl Actor { + fn new(addr: SocketAddr, server: Server) -> Self { + Self { addr, server } + } + + async fn run(mut self) { + tracing::info!("Connecting to {}", self.addr); + loop { + match TcpStream::connect(self.addr).await { + Ok(msg) => { + self.handle(msg).await; + break; + } + Err(err) => { + tracing::error!("Connection failed: {}", err); + tokio::time::sleep(tokio::time::Duration::from_secs(1)).await; + } + } + } + } + + async fn handle(&mut self, stream: TcpStream) { + let (rx, tx) = stream.into_split(); + let rx = FramedRead::new(rx, LengthDelimitedCodec::new()); + let rx = Framed::new(rx, Json::default()); + let tx = FramedWrite::new(tx, LengthDelimitedCodec::new()); + let mut tx = Framed::new(tx, Json::default()); + tx.send(CoordinatorAPI::RegisterClient) + .await + .expect("Failed to send register message"); + tracing::info!("Handshake successful"); + + self.server.connect(CoordinatorSender::start(tx)).await; + CoordinatorReceiver::start(rx, self.server.clone()); + } +} + +pub struct CoordinatorConnector; + +impl CoordinatorConnector { + pub fn start(addr: SocketAddr, server: Server) -> Self { + tokio::spawn(Actor::new(addr, server).run()); + Self + } +} diff --git a/arc-sys/client/src/coordinator_receiver.rs b/arc-sys/client/src/coordinator_receiver.rs new file mode 100644 index 000000000..44e37bafa --- /dev/null +++ b/arc-sys/client/src/coordinator_receiver.rs @@ -0,0 +1,41 @@ +use shared::api::ClientAPI; +use shared::tcp; +use tokio_stream::StreamExt; + +use crate::server::Server; + +struct Actor { + mailbox: tcp::Receiver, + server: Server, +} + +impl Actor { + fn new(mailbox: tcp::Receiver, server: Server) -> Self { + Self { mailbox, server } + } + + async fn run(mut self) { + while let Some(msg) = self.mailbox.next().await { + match msg { + Ok(msg) => self.handle(msg).await, + Err(err) => println!("Error: {}", err), + } + } + } + + async fn handle(&mut self, msg: ClientAPI) { + match msg { + ClientAPI::Query { source: _ } => unreachable!(), + ClientAPI::QueryResponse { data } => self.server.query_response(data).await, + } + } +} + +pub struct CoordinatorReceiver; + +impl CoordinatorReceiver { + pub fn start(rx: tcp::Receiver, server: Server) -> Self { + tokio::spawn(Actor::new(rx, server).run()); + Self + } +} diff --git a/arc-sys/client/src/coordinator_sender.rs b/arc-sys/client/src/coordinator_sender.rs new file mode 100644 index 000000000..11f52d004 --- /dev/null +++ b/arc-sys/client/src/coordinator_sender.rs @@ -0,0 +1,45 @@ +use futures::SinkExt; +use shared::api::CoordinatorAPI; +use shared::tcp; +use tokio::sync::mpsc; + +struct Actor { + mailbox: mpsc::Receiver, + tx: tcp::Sender, +} + +#[allow(unused)] +enum Message { + Cast(CoordinatorAPI), +} + +impl Actor { + fn new(mailbox: mpsc::Receiver, tx: tcp::Sender) -> Self { + Self { mailbox, tx } + } + + async fn run(mut self) { + while let Some(msg) = self.mailbox.recv().await { + self.handle(msg).await; + } + } + + async fn handle(&mut self, msg: Message) { + match msg { + Message::Cast(msg) => { + self.tx.send(msg).await.expect("failed sending message"); + } + } + } +} + +#[derive(Clone, Debug)] +pub struct CoordinatorSender(mpsc::Sender); + +impl CoordinatorSender { + pub fn start(tx_tcp: tcp::Sender) -> Self { + let (tx, rx) = mpsc::channel(10); + tokio::spawn(Actor::new(rx, tx_tcp).run()); + Self(tx) + } +} diff --git a/arc-sys/client/src/interpreter_receiver.rs b/arc-sys/client/src/interpreter_receiver.rs new file mode 100644 index 000000000..13626002d --- /dev/null +++ b/arc-sys/client/src/interpreter_receiver.rs @@ -0,0 +1,41 @@ +use futures::StreamExt; +use shared::api::ClientAPI; +use shared::io; + +use crate::server::Server; + +struct Actor { + mailbox: io::Receiver, + server: Server, +} + +impl Actor { + fn new(mailbox: io::Receiver, server: Server) -> Self { + Self { mailbox, server } + } + + async fn run(mut self) { + while let Some(msg) = self.mailbox.next().await { + match msg { + Ok(msg) => self.handle(msg).await, + Err(_) => todo!(), + } + } + } + + async fn handle(&mut self, msg: ClientAPI) { + match msg { + ClientAPI::Query { source } => self.server.query(source).await, + ClientAPI::QueryResponse { .. } => unreachable!(), + } + } +} + +pub struct InterpreterReceiver; + +impl InterpreterReceiver { + pub fn start(rx: io::Receiver, server: Server) -> Self { + tokio::spawn(Actor::new(rx, server).run()); + Self + } +} diff --git a/arc-sys/client/src/interpreter_sender.rs b/arc-sys/client/src/interpreter_sender.rs new file mode 100644 index 000000000..a6efe8f06 --- /dev/null +++ b/arc-sys/client/src/interpreter_sender.rs @@ -0,0 +1,53 @@ +use futures::SinkExt; +use shared::api::InterpreterAPI; +use shared::io; +use tokio::sync::mpsc; + +struct Actor { + mailbox: mpsc::Receiver, + tx: io::Sender, +} + +#[allow(unused)] +#[derive(Debug)] +enum Message { + Cast(InterpreterAPI), +} + +impl Actor { + fn new(mailbox: mpsc::Receiver, tx: io::Sender) -> Self { + Self { mailbox, tx } + } + + async fn run(mut self) { + while let Some(msg) = self.mailbox.recv().await { + self.handle(msg).await; + } + } + + async fn handle(&mut self, msg: Message) { + match msg { + Message::Cast(msg) => { + self.tx.send(msg).await.expect("Failed to send message"); + } + } + } +} + +#[derive(Clone, Debug)] +pub struct InterpreterSender(mpsc::Sender); + +impl InterpreterSender { + pub fn start(tx_tcp: io::Sender) -> Self { + let (tx, rx) = mpsc::channel(8); + tokio::spawn(Actor::new(rx, tx_tcp).run()); + Self(tx) + } + + pub async fn query_response(&self, data: String) { + self.0 + .send(Message::Cast(InterpreterAPI::QueryResponse { data })) + .await + .expect("Failed to send message"); + } +} diff --git a/arc-sys/client/src/main.rs b/arc-sys/client/src/main.rs new file mode 100644 index 000000000..b93e959f0 --- /dev/null +++ b/arc-sys/client/src/main.rs @@ -0,0 +1,31 @@ +use std::net::SocketAddr; +use std::path::PathBuf; + +use clap::Parser; +use server::Server; +use shared::config::DEFAULT_COORDINATOR_TCP_ADDR; +use shared::socket::parse_addr; + +mod coordinator_connector; +pub mod coordinator_receiver; +pub mod coordinator_sender; +// mod rest; +mod server; +pub mod interpreter_receiver; +pub mod interpreter_sender; + +#[derive(Parser)] +pub struct Args { + #[clap(short, long, value_parser = parse_addr, default_value = DEFAULT_COORDINATOR_TCP_ADDR)] + coordinator: SocketAddr, + + #[clap(short, long)] + file: PathBuf, +} + +#[tokio::main] +async fn main() { + shared::tracing::init(); + which::which("arc-lang").expect("arc-lang not found in PATH"); + Server::new(Args::parse()).await; +} diff --git a/arc-sys/client/src/rest.rs b/arc-sys/client/src/rest.rs new file mode 100644 index 000000000..8522ee5c2 --- /dev/null +++ b/arc-sys/client/src/rest.rs @@ -0,0 +1,34 @@ +#![allow(unused)] + +use shared::api::CoordinatorAPI; +use shared::api::QueryConfig; +use shared::api::RestAPI; +use shared::api::StateBackend; + +async fn rest_call(parallelism: usize, source: String) { + let client = reqwest::Client::new(); + let res = client + .post(format!( + "https://{}/api", + shared::config::DEFAULT_COORDINATOR_REST_ADDR + )) + .json(&CoordinatorAPI::Query { + source, + config: QueryConfig { + parallelism, + state_backend: StateBackend::Sled, + }, + }) + .send() + .await + .expect("Failed to send request"); + match res.status() { + reqwest::StatusCode::OK => match res.json::().await { + Ok(ClientAPI::QueryResponse { data }) => println!("{}", data), + Err(e) => eprintln!("Failed to parse response: {}", e), + }, + _ => { + println!("Error: {}", res.status()); + } + } +} diff --git a/arc-sys/client/src/server.rs b/arc-sys/client/src/server.rs new file mode 100644 index 000000000..a3f66b6ae --- /dev/null +++ b/arc-sys/client/src/server.rs @@ -0,0 +1,111 @@ +#![allow(unused)] + +use crate::coordinator_connector::CoordinatorConnector; +use crate::coordinator_sender::CoordinatorSender; +use crate::Args; +use crate::interpreter_receiver::InterpreterReceiver; +use crate::interpreter_sender::InterpreterSender; +use tokio::process::Command; +use tokio::sync::mpsc::Receiver; +use tokio::sync::mpsc::Sender; +use tokio_serde::Framed; +use tokio_serde::formats::Json; +use tokio_util::codec::FramedRead; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +struct Actor { + mailbox: Receiver, + tx: Option, + server: Server, + args: Args, +} + +#[derive(Debug)] +enum Message { + Query { source: String }, + QueryResponse { data: String }, + Connect { tx: CoordinatorSender }, + Execute { source: String }, + Shutdown, +} + +#[derive(Clone)] +pub struct Server(Sender); + +impl Actor { + fn new(mailbox: Receiver, server: Server, args: Args) -> Self { + Self { + mailbox, + tx: None, + server, + args, + } + } + + async fn run(mut self) { + CoordinatorConnector::start(self.args.coordinator, self.server.clone()); + + let mut child = Command::new(env!("ARC_LANG_CMD")) + .spawn() + .expect("Spawning failed"); + + let rx = child.stdout.take().expect("Failed to get stdin"); + let tx = child.stdin.take().expect("Failed to get stdin"); + + let rx = FramedRead::new(rx, LengthDelimitedCodec::new()); + let rx = Framed::new(rx, Json::default()); + let tx = FramedWrite::new(tx, LengthDelimitedCodec::new()); + let tx = Framed::new(tx, Json::default()); + + let tx = InterpreterSender::start(tx); + InterpreterReceiver::start(rx, self.server.clone()); + + while let Some(msg) = self.mailbox.recv().await { + self.handle(msg); + } + } + + fn handle(&mut self, msg: Message) { + match msg { + Message::Query { source } => { + println!("Query: {}", source); + } + Message::Shutdown => { + println!("Shutdown"); + } + Message::Connect { tx } => todo!(), + Message::Execute { source } => todo!(), + Message::QueryResponse { data } => todo!(), + } + } +} + +impl Server { + pub async fn new(args: Args) { + let (tx, rx) = tokio::sync::mpsc::channel(100); + let server = Self(tx); + tokio::spawn(Actor::new(rx, server, args).run()) + .await + .expect("Failed to spawn"); + } + + pub async fn connect(&self, tx: CoordinatorSender) { + self.0.send(Message::Connect { tx }).await.unwrap(); + } + + pub async fn query(&self, source: String) { + self.0 + .send(Message::Execute { source }) + .await + .expect("failed to forward"); + } + + pub async fn shutdown(&self) { + self.0.send(Message::Shutdown).await.unwrap(); + } + + pub(crate) async fn query_response(&self, data: String) { + self.0.send(Message::QueryResponse { data }).await.unwrap(); + } +} diff --git a/arc-sys/coordinator/Cargo.lock b/arc-sys/coordinator/Cargo.lock new file mode 100644 index 000000000..27bbf162f --- /dev/null +++ b/arc-sys/coordinator/Cargo.lock @@ -0,0 +1,1190 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "async-trait" +version = "0.1.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6e93155431f3931513b243d371981bb2770112b370c82745a1d19d2f99364" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "axum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08b108ad2665fa3f6e6a517c3d80ec3e77d224c47d605167aefaa5d7ef97fa48" +dependencies = [ + "async-trait", + "axum-core", + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-http", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79b8558f5a0581152dc94dcd289132a1d377494bdeafcd41869b3258e3e2ad92" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bytes" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" + +[[package]] +name = "cc" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "4.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d63b9e9c07271b9957ad22c173bae2a4d9a81127680962039296abcd2f8251d" +dependencies = [ + "bitflags", + "clap_derive", + "clap_lex", + "is-terminal", + "once_cell", + "strsim", + "termcolor", +] + +[[package]] +name = "clap_derive" +version = "4.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "coordinator" +version = "0.1.0" +dependencies = [ + "axum", + "clap", + "futures", + "serde", + "tokio", + "tokio-futures", + "tokio-serde", + "tokio-stream", + "tokio-util", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "educe" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0188e3c3ba8df5753894d54461f0e39bc91741dc5b22e1c46999ec2c71f4e4" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "enum-ordinalize" +version = "3.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bb1df8b45ecb7ffa78dca1c17a438fb193eb083db0b1b494d2a61bcb5096a" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "rustc_version", + "syn", +] + +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" + +[[package]] +name = "futures-executor" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" + +[[package]] +name = "futures-macro" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" + +[[package]] +name = "futures-task" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-util" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + +[[package]] +name = "http" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "is-terminal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927609f78c2913a6f6ac3c27a4fe87f43e2a35367c0c4b0f8265e8f49a104330" +dependencies = [ + "hermit-abi 0.2.6", + "io-lifetimes", + "rustix", + "windows-sys", +] + +[[package]] +name = "itoa" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.138" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" + +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + +[[package]] +name = "lock_api" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "matchit" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "mio" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +dependencies = [ + "hermit-abi 0.1.19", + "libc", +] + +[[package]] +name = "once_cell" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" + +[[package]] +name = "os_str_bytes" +version = "6.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys", +] + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "pin-project" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.36.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" + +[[package]] +name = "ryu" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "semver" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" + +[[package]] +name = "serde" +version = "1.0.150" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.150" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "184c643044780f7ceb59104cef98a5a6f12cb2288a7bc701ab93a362b49fd47d" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "syn" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" + +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thread_local" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tokio" +version = "1.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-futures" +version = "0.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5c8ea7f4c1ea9cdb9fb03cba1522c23e9fb97eb1518c92b952093f93f86cd" + +[[package]] +name = "tokio-macros" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" +dependencies = [ + "bytes", + "educe", + "futures-core", + "futures-sink", + "pin-project", + "serde", + "serde_json", +] + +[[package]] +name = "tokio-stream" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "futures-util", + "hashbrown", + "pin-project-lite", + "slab", + "tokio", + "tracing", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +dependencies = [ + "lazy_static", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +dependencies = [ + "nu-ansi-term", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + +[[package]] +name = "unicode-ident" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" diff --git a/arc-sys/coordinator/Cargo.toml b/arc-sys/coordinator/Cargo.toml new file mode 100644 index 000000000..85dfc521b --- /dev/null +++ b/arc-sys/coordinator/Cargo.toml @@ -0,0 +1,34 @@ +[package] +name = "coordinator" +version = "0.1.0" +edition = "2021" + +[dependencies] +shared = { path = "../shared" } +axum = { version = "0.6.3" } +clap = { version = "4.1.3", features = ["derive"] } +futures = { version = "0.3.25" } +serde = { version = "1.0.152", features = ["derive"] } +tokio = { version = "1.24.2", features = ["full"] } +tokio-futures = { version = "0.0.0" } +tokio-serde = { version = "0.8.0", features = ["json"] } +tokio-stream = { version = "0.1.11" } +tokio-util = { version = "0.7.4", features = ["full"] } +raw-cpuid = { version = "10.6.0", features = ["serde"] } +crepe = { version = "0.1.7" } +itertools = { version = "0.10.5" } +quote = { version = "1.0.23" } +proc-macro2 = { version = "1.0.50" } +halfbrown = { version = "0.1.18", features = ["serde"] } +rust-format = { version = "0.3.4", features = ["token_stream"] } +indoc = { version = "1.0.8" } +which = { version = "4.4.0" } +serde_json = { version = "1.0.91", features = ["preserve_order"] } +regex = { version = "1.7.1" } +rustls = { version = "0.20.8" } +tokio-rustls = { version = "0.23.4" } +rustls-pemfile = { version = "1.0.2" } +tracing = { version = "0.1.37" } + +[build-dependencies] +which = "4.4.0" diff --git a/arc-sys/coordinator/build.rs b/arc-sys/coordinator/build.rs new file mode 100644 index 000000000..e517b6df6 --- /dev/null +++ b/arc-sys/coordinator/build.rs @@ -0,0 +1,35 @@ +use std::io::BufRead; +use std::path::Path; +use std::process::exit; +use std::process::Command; +use std::process::Stdio; + +fn main() { + if std::env::var("ARC_MLIR_CMD").is_ok() { + return; + } else if let Ok(path) = which::which("arc-mlir") { + println!("cargo:rustc-env=ARC_MLIR_CMD={}", path.display()); + } else { + let out_dir = std::env::var("OUT_DIR").unwrap(); + let arc_mlir_cmd = Path::new(&out_dir).join("arc-mlir/llvm-build/bin/arc-mlir"); + if !arc_mlir_cmd.exists() { + which::which("cmake").expect("dune not found in PATH"); + let mut child = Command::new("../../build") + .env("ARC_MLIR_BUILD", Path::new(&out_dir).join("arc-mlir")) + .stderr(Stdio::piped()) + .spawn() + .expect("CMake failed"); + if std::env::var("ARC_COORDINATOR_DEBUG").is_ok() { + println!("cargo:warning=Building Arc-MLIR ..."); + for line in std::io::BufReader::new(child.stderr.as_mut().unwrap()).lines() { + println!("cargo:warning={}", line.unwrap()); + } + } + let status = child.wait().expect("CMake failed"); + if !status.success() { + exit(status.code().expect("CMake was terminated")); + } + } + println!("cargo:rustc-env=ARC_MLIR_CMD={}", arc_mlir_cmd.display()); + } +} diff --git a/arc-sys/coordinator/src/client_listener.rs b/arc-sys/coordinator/src/client_listener.rs new file mode 100644 index 000000000..6af0d41bb --- /dev/null +++ b/arc-sys/coordinator/src/client_listener.rs @@ -0,0 +1,68 @@ +use shared::api::CoordinatorAPI; +use std::net::SocketAddr; +use tokio::net::TcpListener; +use tokio::net::TcpStream; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_stream::StreamExt; +use tokio_util::codec::FramedRead; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +use crate::client_sender::ClientSender; +use crate::server::ClientId; + +use super::server::Server; +use super::worker_receiver::WorkerReceiver; + +struct Actor { + port: u16, + server: Server, + id: ClientId, +} + +impl Actor { + fn new(port: u16, server: Server) -> Self { + Self { + port, + server, + id: ClientId(0), + } + } + + async fn run(mut self) { + let addr = SocketAddr::from(([0, 0, 0, 0], self.port)); + // let acceptor = tls_acceptor().expect("Failed to create TLS acceptor"); + let rx = TcpListener::bind(&addr).await.expect("Failed to bind"); + tracing::info!("Listening for clients on {}", addr); + loop { + match rx.accept().await { + Ok((stream, addr)) => self.handle(stream, addr).await, + Err(err) => println!("Error: {}", err), + } + } + } + + async fn handle(&mut self, stream: TcpStream, addr: SocketAddr) { + let id = self.id; + self.id.0 += 1; + let server = self.server.clone(); + tokio::spawn(async move { + let (rx, tx) = stream.into_split(); + let rx = FramedRead::new(rx, LengthDelimitedCodec::new()); + let mut rx = Framed::new(rx, Json::default()); + let tx = FramedWrite::new(tx, LengthDelimitedCodec::new()); + let tx = Framed::new(tx, Json::default()); + server.register_client(id, addr.ip(), ClientSender::start(tx)); + ClientReceiver::start(rx, id, server); + }); + } +} + +pub struct ClientListener; + +impl ClientListener { + pub fn start(port: u16, server: Server) { + tokio::spawn(Actor::new(port, server).run()); + } +} diff --git a/arc-sys/coordinator/src/client_receiver.rs b/arc-sys/coordinator/src/client_receiver.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/arc-sys/coordinator/src/client_receiver.rs @@ -0,0 +1 @@ + diff --git a/arc-sys/coordinator/src/client_sender.rs b/arc-sys/coordinator/src/client_sender.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/arc-sys/coordinator/src/client_sender.rs @@ -0,0 +1 @@ + diff --git a/arc-sys/coordinator/src/compiler/lowering1.rs b/arc-sys/coordinator/src/compiler/lowering1.rs new file mode 100644 index 000000000..8d612149e --- /dev/null +++ b/arc-sys/coordinator/src/compiler/lowering1.rs @@ -0,0 +1,132 @@ +use std::io::Write; +use std::process::Command; +use std::process::Stdio; + +use halfbrown::HashMap; +use regex::Regex; +use shared::api::Graph; +use shared::api::Node; + +pub struct Graph1 { + pub code: String, + pub nodes: HashMap, +} + +/// Compile MLIR source code into Rust and extract the dataflow graph. +pub fn lower(source: &str) -> Graph1 { + let mut cmd = Command::new(env!("ARC_MLIR_CMD")) + .arg("-arc-to-rust") + .arg("-inline-rust") + .stdin(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn() + .expect("Failed to execute process"); + + let stdin = cmd.stdin.as_mut().unwrap(); + stdin.write_all(source.as_bytes()).unwrap(); + drop(stdin); + + let output = cmd + .wait_with_output() + .expect("Failed to read stdout") + .stdout; + + let code = std::str::from_utf8(&output).unwrap().to_owned(); + let json = extract_json(&code); + let graph = serde_json::from_str::(json).unwrap(); + Graph1 { + code, + nodes: graph.nodes.into_iter().collect(), + } +} + +fn extract_json(rust: &str) -> &str { + let regex = Regex::new( + r"(?xms) # x: Enable insignificant whitespace + # m: Enable multi-line mode + # s: Enable matching \n with . + + ^JSON_START_MARKER$ + + (?P.*) # JSON code + + ^JSON_END_MARKER$ + ", + ) + .unwrap(); + let captures = regex.captures(rust).unwrap(); + captures.name("json").unwrap().as_str() +} + +#[test] +fn test_regex() { + let source = indoc::indoc! { + r#" + fn map(x: i32) -> i32 { + x + 1 + } + /* + JSON_START_MARKER + { "hello": "world" } + JSON_END_MARKER + */ + "#}; + + let json = extract_json(source); + + assert_eq!( + json.split_whitespace().collect::(), + r#"{ "hello": "world" }"#.split_whitespace().collect::() + ); +} + +#[test] +fn test_serde() { + let graph = Graph { + nodes: vec![ + ( + "x0".to_string(), + Node::Source { + key_type: "i32".to_string(), + data_type: "i32".to_string(), + topic: "topic".to_string(), + num_partitions: 1, + }, + ), + ( + "x1".to_string(), + Node::Map { + input: "x0".to_string(), + fun: "map".to_string(), + }, + ), + ( + "x2".to_string(), + Node::Sink { + input: "map".to_string(), + topic: "topic".to_string(), + fun: "x1".to_string(), + }, + ), + ] + .into_iter() + .collect(), + }; + + let json = serde_json::to_string(&graph).unwrap(); + + assert_eq!( + json.split_whitespace().collect::(), + r#" + { + "nodes": { + "x0": { "Source": { "key_type": "i32", "data_type": "i32", "topic": "topic", "num_partitions": 1 } }, + "x1": { "Map": { "input": "x0", "fun": "map" } }, + "x2": { "Sink": { "input": "map", "topic": "topic", "fun": "x1" } } + } + } + "# + .split_whitespace() + .collect::() + ) +} diff --git a/arc-sys/coordinator/src/compiler/lowering2.rs b/arc-sys/coordinator/src/compiler/lowering2.rs new file mode 100644 index 000000000..abb780448 --- /dev/null +++ b/arc-sys/coordinator/src/compiler/lowering2.rs @@ -0,0 +1,160 @@ +use std::collections::hash_map::Entry; +use std::collections::HashMap; +use shared::api::Node; + +use super::lowering1::Graph1; + +#[derive(Clone, Debug)] +pub struct Graph2 { + pub code: String, + pub nodes: HashMap, +} + +#[derive(Clone, Copy, Debug, Ord, PartialOrd, Eq, Hash, PartialEq)] +pub struct NodeId(pub u32); + +#[derive(Clone, Debug)] +pub enum Node2 { + Filter { + input: NodeId, + fun: String, + }, + Map { + input: NodeId, + fun: String, + }, + KafkaSource { + key_type: String, + data_type: String, + topic: String, + num_partitions: u32, + }, + KafkaSink { + input: NodeId, + topic: String, + fun: String, + }, + ShuffleSink { + input: NodeId, + fun: String, + }, + ShuffleSource { + input: NodeId, + fun: String, + }, + Union { + input0: NodeId, + input1: NodeId, + }, + Window { + input: NodeId, + }, +} + +struct IdIntern { + map: HashMap, + counter: NodeId, +} + +impl IdIntern { + fn new() -> Self { + Self { + map: HashMap::new(), + counter: NodeId(0), + } + } + fn intern(&mut self, name: String) -> NodeId { + match self.map.entry(name) { + Entry::Occupied(v) => *v.get(), + Entry::Vacant(v) => { + let id = self.counter; + v.insert(id); + self.counter.0 += 1; + id + } + } + } + fn create(&mut self) -> NodeId { + let id = self.counter; + self.counter.0 += 1; + id + } +} + +// 1. Split Group into ShuffleSink and ShuffleSource +// 2. Replace symbolic identifiers (String) with numerical ones (NodeId) +// NOTE: We currently assume that the graph is already topologically sorted +pub fn lower(graph: Graph1) -> Graph2 { + let mut nodes = HashMap::new(); + let mut ids = IdIntern::new(); + for (name, node) in graph.nodes.into_iter() { + match node { + Node::Map { input, fun } => { + let id = ids.intern(name); + let input = ids.intern(input); + nodes.insert(id, Node2::Map { input, fun }); + } + Node::Sink { input, topic, fun } => { + let id = ids.intern(name); + let input = ids.intern(input); + nodes.insert(id, Node2::KafkaSink { input, topic, fun }); + } + Node::Union { input0, input1 } => { + let id = ids.intern(name); + let input0 = ids.intern(input0); + let input1 = ids.intern(input1); + nodes.insert(id, Node2::Union { input0, input1 }); + } + Node::Group { input, fun } => { + let source_id = ids.create(); + let sink_id = ids.intern(name); + let input = ids.intern(input); + nodes.insert( + source_id, + Node2::ShuffleSink { + input, + fun: fun.clone(), + }, + ); + nodes.insert( + sink_id, + Node2::ShuffleSource { + input: source_id, + fun, + }, + ); + } + Node::Filter { input, fun } => { + let id = ids.intern(name); + let input = ids.intern(input); + nodes.insert(id, Node2::Filter { input, fun }); + } + Node::Source { + key_type, + data_type, + topic, + num_partitions, + } => { + let id = ids.intern(name); + nodes.insert( + id, + Node2::KafkaSource { + key_type, + data_type, + topic, + num_partitions, + }, + ); + } + Node::Window { input } => { + let id = ids.intern(name); + let input = ids.intern(input); + nodes.insert(id, Node2::Window { input }); + } + } + } + Graph2 { + code: graph.code, + nodes, + } +} diff --git a/arc-sys/coordinator/src/compiler/lowering3.rs b/arc-sys/coordinator/src/compiler/lowering3.rs new file mode 100644 index 000000000..7cd7546dc --- /dev/null +++ b/arc-sys/coordinator/src/compiler/lowering3.rs @@ -0,0 +1,114 @@ +use super::lowering2::Graph2; +use super::lowering2::Node2; +use super::lowering2::NodeId; + +use halfbrown::HashMap; + +#[derive(Clone, Debug)] +pub struct Graph3 { + pub code: String, + pub pipelines: HashMap, +} + +#[derive(Clone, Copy, Debug, Ord, PartialOrd, Eq, Hash, PartialEq)] +pub struct PipelineId(pub u32); + +#[derive(Clone, Debug, Default)] +pub struct Pipeline2 { + pub nodes: HashMap, +} + +mod datalog { + + use crate::compiler::lowering2::Graph2; + use crate::compiler::lowering2::NodeId; + + crepe::crepe! { + @input + struct Edge(NodeId, NodeId); + + @input + struct Node(NodeId, bool); + + struct Reachable(NodeId, NodeId); + + Reachable(x, y) <- Edge(x, y); + Reachable(x, z) <- Reachable(x, y), Edge(y, z); + + struct PipelineBreaker(NodeId); + + PipelineBreaker(x) <- Node(x, true); + + @output + #[derive(Debug, Ord, PartialOrd)] + struct Pipeline(NodeId, NodeId); + + Pipeline(x, x) <- PipelineBreaker(x); + Pipeline(x, y) <- Reachable(x, y), PipelineBreaker(y); + } + + pub fn run(graph1: &Graph2) -> impl Iterator { + let nodes = graph1 + .nodes + .iter() + .map(|(id, node)| Node(*id, node.is_sink())); + + let edges = graph1 + .nodes + .iter() + .flat_map(|(id, node)| node.data_inputs().map(|input| Edge(*input, *id))); + + let mut runtime = Crepe::new(); + runtime.extend(edges); + runtime.extend(nodes); + let (pairs,) = runtime.run(); + pairs.into_iter().map(|Pipeline(x, y)| (x, y)) + } +} + +// 1. Break graph into pipelines +// e.g., source -> filter -> shuffle-sink -> shuffle-source -> map -> sink +// becomes (source -> filter -> shuffle-sink) -> (shuffle-source -> map -> sink) +// NOTE: Currently we assume the graph is linear, +pub(crate) fn lower(mut graph: Graph2) -> Graph3 { + let mut pipelines = HashMap::new(); + for (node_id, NodeId(pipeline_id)) in datalog::run(&graph) { + pipelines + .entry(PipelineId(pipeline_id)) + .or_insert_with(Pipeline2::default) + .nodes + .insert(node_id, graph.nodes.remove(&node_id).unwrap()); + } + Graph3 { + code: graph.code, + pipelines, + } +} + +impl Node2 { + pub fn data_inputs(&self) -> impl Iterator + '_ { + match self { + Node2::Filter { input, .. } => [Some(input), None], + Node2::Map { input, .. } => [Some(input), None], + Node2::KafkaSource { .. } => [None, None], + Node2::KafkaSink { input, .. } => [Some(input), None], + Node2::ShuffleSink { input, .. } => [Some(input), None], + Node2::ShuffleSource { .. } => [None, None], + Node2::Union { input0, input1, .. } => [Some(input0), Some(input1)], + Node2::Window { input } => [Some(input), None], + } + .into_iter() + .flatten() + } + + pub fn is_sink(&self) -> bool { + matches!(self, Node2::KafkaSink { .. } | Node2::ShuffleSink { .. }) + } + + pub fn is_source(&self) -> bool { + matches!( + self, + Node2::KafkaSource { .. } | Node2::ShuffleSource { .. } + ) + } +} diff --git a/arc-sys/coordinator/src/compiler/lowering4.rs b/arc-sys/coordinator/src/compiler/lowering4.rs new file mode 100644 index 000000000..75ecc3e5d --- /dev/null +++ b/arc-sys/coordinator/src/compiler/lowering4.rs @@ -0,0 +1,95 @@ +use std::collections::HashSet; + +use halfbrown::HashMap; + +use super::lowering2::Node2; +use super::lowering2::NodeId; +use super::lowering3::Graph3; +use super::lowering3::Pipeline2; +use super::lowering3::PipelineId; + +#[derive(Clone, Debug)] +pub struct Graph4 { + pub code: String, + pub pipelines: HashMap, +} + +#[derive(Clone, Debug)] +pub struct Pipeline3 { + pub nodes: Vec<(NodeId, Node2)>, +} + +pub fn lower(graph: Graph3) -> Graph4 { + let pipelines = graph + .pipelines + .into_iter() + .map(|(id, pipeline)| (id, topological_sort(pipeline))) + .collect(); + Graph4 { + code: graph.code, + pipelines, + } +} + +// Topologically sort the nodes in the pipeline +pub fn topological_sort(mut pipeline: Pipeline2) -> Pipeline3 { + let mut nodes = Vec::new(); + let mut visited = HashSet::new(); + + let mut stack = pipeline + .nodes + .iter() + .filter(|(_, node)| node.is_sink()) + .map(|(id, _)| id) + .copied() + .collect::>(); + + while let Some(id) = stack.pop() { + visited.insert(id); + nodes.push(id); + match pipeline.nodes.get(&id).unwrap() { + Node2::Filter { input, .. } => { + if !visited.contains(input) { + stack.push(*input); + } + } + Node2::Map { input, .. } => { + if !visited.contains(input) { + stack.push(*input); + } + } + Node2::KafkaSource { .. } => {} + Node2::KafkaSink { input, .. } => { + if !visited.contains(input) { + stack.push(*input); + } + } + Node2::ShuffleSink { input, .. } => { + if !visited.contains(input) { + stack.push(*input); + } + } + Node2::ShuffleSource { .. } => {} + Node2::Union { input0, input1 } => { + if !visited.contains(input0) { + stack.push(*input0); + } + if !visited.contains(input0) { + stack.push(*input1); + } + } + Node2::Window { input } => { + if !visited.contains(input) { + stack.push(*input); + } + } + } + } + nodes.reverse(); + Pipeline3 { + nodes: nodes + .into_iter() + .map(|id| (id, pipeline.nodes.remove(&id).unwrap())) + .collect(), + } +} diff --git a/arc-sys/coordinator/src/compiler/lowering5.rs b/arc-sys/coordinator/src/compiler/lowering5.rs new file mode 100644 index 000000000..221981067 --- /dev/null +++ b/arc-sys/coordinator/src/compiler/lowering5.rs @@ -0,0 +1,102 @@ +use halfbrown::HashMap; +use std::net::IpAddr; +use std::net::SocketAddr; + + +use shared::api::QueryConfig; + +use crate::server::ServerConfig; +use crate::server::WorkerId; + +use super::lowering2::Node2; +use super::lowering2::NodeId; +use super::lowering3::PipelineId; +use super::lowering4::Graph4; +use super::lowering4::Pipeline3; + +#[derive(Debug)] +pub struct Graph5 { + pub code: String, + pub pipelines: HashMap, + pub shards: Vec, + // All sinks need to connect to the same sources. + pub sink_ports: HashMap>, + pub parallelism: usize, +} + +#[derive(Debug)] +pub struct Shard4 { + pub worker_id: WorkerId, + pub pipeline_id: PipelineId, + pub cpu: usize, + pub source_ip: IpAddr, + pub source_ports: HashMap, +} + +/// * Each pipeline is sharded by a parallelism factor, currently specified by the query. +/// * Each shard is mapped to one thread which executes on one CPU. +/// * Multiple threads can be collocated in the same OS-process. +/// * Multiple OS-processes could be collocated on the same worker. +/// * Each machine has one worker and potentially multiple cores. +/// * Each Source and Sink operation needs to be connected to its system (e.g., Kafka). +/// * Each ShuffleSink must open a connection to its respective ShuffleSource operator in the next shard. +pub fn lower( + graph: Graph4, + server_config: &mut ServerConfig, + query_config: &QueryConfig, +) -> Graph5 { + let mut instances = Vec::new(); + let mut sinks = HashMap::new(); + let mut workers = server_config.workers.iter_mut(); + let (mut worker_id, mut worker) = workers.next().unwrap(); + for (pipeline_id, pipeline) in &graph.pipelines { + // For each physical ShuffleSource we need to allocate one port. + let sources: Vec<_> = pipeline + .nodes + .iter() + .filter_map(|(id, node)| { + if let Node2::ShuffleSource { input, .. } = node { + sinks.insert(*input, Vec::new()); + Some((*id, input)) + } else { + None + } + }) + .collect(); + for _ in 0..query_config.parallelism { + // Collocate the same pipeline on the same worker if possible. + while worker.available_cpus.is_empty() { + (worker_id, worker) = workers.next().expect("Insufficient cores available"); + } + let cpu = worker.available_cpus.pop_first().unwrap(); + let ports = sources + .iter() + .map(|(id, input)| { + if let Some(port) = worker.available_ports.pop_first() { + sinks + .get_mut(*input) + .unwrap() + .push(SocketAddr::new(worker.ip, port)); + (*id, port) + } else { + panic!("Insufficient ports available"); + } + }) + .collect(); + instances.push(Shard4 { + worker_id: *worker_id, + pipeline_id: *pipeline_id, + source_ip: worker.ip, + cpu, + source_ports: ports, + }); + } + } + Graph5 { + code: graph.code, + sink_ports: sinks, + pipelines: graph.pipelines, + shards: instances, + parallelism: query_config.parallelism, + } +} diff --git a/arc-sys/coordinator/src/compiler/lowering6.rs b/arc-sys/coordinator/src/compiler/lowering6.rs new file mode 100644 index 000000000..2397db402 --- /dev/null +++ b/arc-sys/coordinator/src/compiler/lowering6.rs @@ -0,0 +1,268 @@ +use itertools::multiunzip; +use itertools::Itertools; +use proc_macro2::Ident; +use proc_macro2::Literal; +use proc_macro2::Span; +use proc_macro2::TokenStream; +use quote::quote; +use rust_format::Formatter; + +use crate::server::ServerConfig; +use crate::server::WorkerId; + +use super::lowering2::Node2; +use super::lowering2::NodeId; +use super::lowering5::Graph5; +use super::lowering5::Shard4; + +#[derive(Debug)] +pub struct Graph6 { + pub code: String, + pub shards: Vec, +} + +pub(crate) fn lower(graph: Graph5, config: &ServerConfig) -> Graph6 { + let (worker_defs, worker_ids): (Vec<_>, Vec<_>) = graph + .shards + .iter() + .group_by(|shard| shard.worker_id) + .into_iter() + .map(|(worker_id, shards)| compile_worker(worker_id, shards, &graph, config)) + .unzip(); + let worker_id_strings = worker_ids.iter().map(|i| i.to_string()).collect::>(); + let code: TokenStream = graph.code.parse().unwrap(); + let main = quote! { + use dataflow::prelude::*; + + fn main() { + let mut args = std::env::args(); + let _ = args.next(); + let kind = args.next(); + let db = Database::remote("127.0.0.1:2379"); + match kind.unwrap().as_str() { + #( + #worker_id_strings => #worker_ids(db) + ,)* + _ => panic!("Unknown arg, expected instance[N]"), + } + } + + #(#worker_defs)* + + #code + }; + Graph6 { + code: rust_format::RustFmt::default().format_tokens(main).unwrap(), + shards: graph.shards, + } +} + +pub fn compile_worker<'a>( + worker_id: WorkerId, + shards: impl Iterator, + graph: &Graph5, + config: &ServerConfig, +) -> (TokenStream, Ident) { + let worker_id = new_worker_id(worker_id); + let (shard_defs, shard_ids, shard_cpus): (Vec<_>, Vec<_>, Vec<_>) = + multiunzip(shards.map(|s| compile_shard(s, graph, config))); + let instance_def = quote! { + fn #worker_id(db: Database) { + Runtime::new()#(.spawn(#shard_ids(db.clone()), #shard_cpus))*; + } + #(#shard_defs)* + }; + (instance_def, worker_id) +} + +pub fn compile_shard( + shard: &Shard4, + graph: &Graph5, + config: &ServerConfig, +) -> (TokenStream, Ident, usize) { + let pipeline = graph.pipelines.get(&shard.pipeline_id).unwrap(); + let mut pre_loop_stmts = Vec::new(); + let mut loop_head_stmts = Vec::new(); + let mut loop_tail_stmts = Vec::new(); + let mut param_ids = Vec::new(); + let mut state_ids = Vec::new(); + let mut source_id = None; + let mut operator_index = 0; + let shard_id = new_shard_id(shard); + let shard_id_string = shard_id.to_string(); + for (id, node) in &pipeline.nodes { + let node_id = new_node_id(id); + match node { + _ if node.is_source() => { + source_id = Some(node_id.clone()); + let init_expr = new(id, node, shard, graph, config); + pre_loop_stmts.push(quote!(let mut #node_id = #init_expr;)); + } + _ if node.is_sink() => { + let init_expr = new(id, node, shard, graph, config); + let send_expr = send(node, node_id.clone()); + loop_head_stmts.push(quote!(#send_expr;)); + pre_loop_stmts.push(quote!(let mut #node_id = #init_expr;)); + } + _ => { + let node_index = new_index(operator_index); + let param_id = new_param_id(operator_index); + let state_id = new_state_id(operator_index); + let init_expr = new(id, node, shard, graph, config); + let process_expr = process(node, node_index.clone()); + param_ids.push(param_id.clone()); + state_ids.push(state_id.clone()); + pre_loop_stmts.push(quote!(let (#param_id, #state_id) = #init_expr;)); + loop_head_stmts.push(quote!(let mut #node_id = #process_expr;)); + loop_tail_stmts.push(quote!(state.#node_index = #node_id.state();)); + operator_index += 1; + } + } + } + loop_tail_stmts.reverse(); + let source_id = source_id.expect("no source node"); + let shard_def = quote! { + async fn #shard_id(db: Database) { + #(#pre_loop_stmts)* + let param = (#(#param_ids,)*); + let mut state = State::new(#shard_id_string, db, (#(#state_ids,)*)); + while let Some((key, mut #source_id)) = #source_id.recv().await { + let mut state = state.get(key); + #(#loop_head_stmts)* + #(#loop_tail_stmts)* + } + } + }; + (shard_def, shard_id, shard.cpu) +} + +fn new( + id: &NodeId, + node: &Node2, + shard: &Shard4, + graph: &Graph5, + config: &ServerConfig, +) -> TokenStream { + match node { + Node2::KafkaSource { + key_type, + data_type, + topic, + num_partitions, + } => { + let broker = config.broker.to_string(); + let key_type = parse_code(key_type); + let data_type = parse_code(data_type); + let num_partitions = *num_partitions as i32; + quote!(KafkaSource::<#key_type, #data_type>::new(#broker, #topic, 0..#num_partitions)) + } + Node2::KafkaSink { topic, fun, .. } => { + let broker = config.broker.to_string(); + let fun = parse_code(fun); + quote!(KafkaSink::new(#broker, #topic, #fun)) + } + Node2::ShuffleSource { fun, .. } => { + let parallellism = graph.parallelism; + let fun = parse_code(fun); + let port = shard.source_ports.get(&id); + quote!(ShuffleSource::new(#port, #parallellism, #fun).await) + } + Node2::ShuffleSink { fun, .. } => { + let fun = parse_code(fun); + let addrs = graph + .sink_ports + .get(id) + .unwrap() + .iter() + .map(|addr| addr.to_string()); + quote!(ShuffleSink::new([#(#addrs),*], #fun).await) + } + Node2::Filter { fun, .. } => { + let fun = parse_code(fun); + quote!(Filter::new(#fun)) + } + Node2::Map { fun, .. } => { + let fun = parse_code(fun); + quote!(Map::new(#fun)) + } + Node2::Union { .. } => { + quote!(Union::new()) + } + Node2::Window { .. } => { + quote!(Window::new()) + } + } +} + +fn process(node: &Node2, node_index: Literal) -> TokenStream { + match node { + Node2::Filter { input, .. } => { + let input = new_node_id(input); + quote!(Filter::process(&mut #input, param.#node_index, state.#node_index)) + } + Node2::Map { input, .. } => { + let input = new_node_id(input); + quote!(Map::process(&mut #input, param.#node_index, state.#node_index)) + } + Node2::Union { input0, input1, .. } => { + let input0 = new_node_id(input0); + let input1 = new_node_id(input1); + quote!(Union::process(&mut #input0, &mut #input1, param.#node_index, state.#node_index)) + } + Node2::Window { input } => { + let input = new_node_id(input); + quote!(Window::process(&mut #input)) + } + Node2::KafkaSource { .. } + | Node2::KafkaSink { .. } + | Node2::ShuffleSource { .. } + | Node2::ShuffleSink { .. } => unreachable!(), + } +} + +fn send(node: &Node2, node_id: Ident) -> TokenStream { + match node { + Node2::KafkaSink { input, .. } | Node2::ShuffleSink { input, .. } => { + let input = new_node_id(input); + quote!(#node_id.send(&mut #input).await) + } + Node2::ShuffleSource { .. } + | Node2::Filter { .. } + | Node2::Map { .. } + | Node2::KafkaSource { .. } + | Node2::Union { .. } + | Node2::Window { .. } => unreachable!(), + } +} + +fn new_id(s: &str) -> Ident { + Ident::new(s, Span::call_site()) +} + +fn new_node_id(id: &NodeId) -> Ident { + new_id(&format!("node{}", id.0)) +} + +fn new_param_id(id: usize) -> Ident { + new_id(&format!("param{}", id)) +} + +fn new_state_id(id: usize) -> Ident { + new_id(&format!("state{}", id)) +} + +fn new_index(i: usize) -> Literal { + Literal::usize_unsuffixed(i) +} + +fn parse_code(c: &String) -> TokenStream { + c.parse().unwrap() +} + +fn new_worker_id(id: WorkerId) -> Ident { + new_id(&format!("worker{}", id.0)) +} + +fn new_shard_id(shard: &Shard4) -> Ident { + new_id(&format!("worker{}_shard{}", shard.worker_id.0, shard.cpu)) +} diff --git a/arc-sys/coordinator/src/compiler/lowering7.rs b/arc-sys/coordinator/src/compiler/lowering7.rs new file mode 100644 index 000000000..40c417c8c --- /dev/null +++ b/arc-sys/coordinator/src/compiler/lowering7.rs @@ -0,0 +1,104 @@ +use std::fs::create_dir_all; +use std::path::Path; +use std::path::PathBuf; +use std::process::Stdio; + +use itertools::Itertools; +use tokio::io::AsyncBufReadExt; +use tokio::io::BufReader; +use tokio::process::Command; + +use crate::compiler::lowering6::Graph6; +use crate::server::ServerConfig; +use crate::server::WorkerId; + +pub struct Graph7 { + pub deployment: Vec<(Vec, PathBuf)>, +} + +const WORKSPACE: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../workspace"); +const DATAFLOW: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../dataflow"); + +pub async fn lower(package_name: &str, graph: Graph6, server_config: &mut ServerConfig) -> Graph7 { + let workspace = Path::new(WORKSPACE); + create_crate(package_name, workspace, &graph).await; + let target_triples = graph.shards.iter().group_by(|shard| { + &server_config + .workers + .get(&shard.worker_id) + .unwrap() + .arch + .target_triple + }); + let mut deployment = Vec::new(); + for (target_triple, shards) in target_triples.into_iter() { + let path = build_crate(target_triple, package_name, workspace).await; + let worker_ids = shards.map(|shard| shard.worker_id).collect::>(); + deployment.push((worker_ids, path)); + } + Graph7 { deployment } +} + +async fn create_crate(package_name: &str, workspace: &Path, graph: &Graph6) { + let workspace_toml = workspace.join("Cargo.toml"); + let crates = workspace.join("crates"); + let package = crates.join(package_name); + let package_toml = package.join("Cargo.toml"); + let src = package.join("src"); + let main = src.join("main.rs"); + create_dir_all(src).expect("Failed to create src directory"); + std::fs::write( + &workspace_toml, + indoc::indoc!( + r#" + [workspace] + members = [ "crates/*" ] + "# + ), + ) + .expect("Unable to write file"); + std::fs::write(&main, &graph.code).expect("Unable to write file"); + std::fs::write( + &package_toml, + indoc::formatdoc!( + r#" + [package] + name = "{package_name}" + version = "0.0.0" + edition = "2021" + + [dependencies] + dataflow = {{ path = "{DATAFLOW}" }} + "#, + ), + ) + .expect("Unable to write file"); +} + +async fn build_crate( + target_triple: &str, + package_name: &str, + workspace: &Path, +) -> PathBuf { + let mut cmd = Command::new("cargo") + .arg("build") + .arg("--package") + .arg(package_name) + .arg("--target") + .arg(target_triple) + .arg("--release") + .current_dir(workspace) + .stderr(Stdio::piped()) + .spawn() + .expect("Failed to execute process"); + let mut stderr = BufReader::new(cmd.stderr.as_mut().unwrap()).lines(); + while let Ok(Some(line)) = stderr.next_line().await { + tracing::info!("{}", line); + } + cmd.wait().await.expect("Failed to wait on `cross build`"); + workspace + .join("target") + .join(target_triple) + .join("release") + .join(package_name) +} diff --git a/arc-sys/coordinator/src/compiler/mod.rs b/arc-sys/coordinator/src/compiler/mod.rs new file mode 100644 index 000000000..db00228e8 --- /dev/null +++ b/arc-sys/coordinator/src/compiler/mod.rs @@ -0,0 +1,137 @@ +pub mod lowering1; +pub mod lowering2; +pub mod lowering3; +pub mod lowering4; +pub mod lowering5; +pub mod lowering6; +pub mod lowering7; + +use shared::api::QueryConfig; + +use crate::server::ServerConfig; + +use self::lowering7::Graph7; + +pub async fn compile( + name: &str, + source: &str, + query_config: &QueryConfig, + server_config: &mut ServerConfig, +) -> Graph7 { + // Compile MLIR source code to Rust and a dataflow graph. + let graph1 = lowering1::lower(source); + // Compile logical operators into physical operators. + let graph2 = lowering2::lower(graph1); + // Topologically sort nodes. + let graph3 = lowering3::lower(graph2); + // Extract pipelines. + let graph4 = lowering4::lower(graph3); + // Allocate cpus and sockets to pipelines. + let graph5 = lowering5::lower(graph4, server_config, query_config); + // Compile pipelines to source code. + let graph6 = lowering6::lower(graph5, server_config); + // Compile source code to binaries. + let graph7 = lowering7::lower(&name, graph6, server_config).await; + graph7 +} + +#[test] +fn test_compile() { + use crate::compiler::lowering1::Graph1; + use crate::compiler::lowering6::Graph6; + use crate::server::Worker; + use crate::server::WorkerId; + use shared::api::Node; + use shared::api::StateBackend; + use std::net::ToSocketAddrs; + fn lower( + graph1: Graph1, + query_config: &QueryConfig, + server_config: &mut ServerConfig, + ) -> Graph6 { + // Compile logical operators into physical operators. + let graph2 = lowering2::lower(graph1); + // Topologically sort nodes. + let graph3 = lowering3::lower(graph2); + // Extract pipelines. + let graph4 = lowering4::lower(graph3); + // Allocate cpus and sockets to pipelines. + let graph5 = lowering5::lower(graph4, server_config, query_config); + // Compile pipelines to source code. + let graph6 = lowering6::lower(graph5, server_config); + graph6 + } + lower( + Graph1 { + code: quote::quote!( + fn filter_udf(x: i32) -> bool { + x > 0 + } + fn map_udf(x: i32) -> i32 { + x + 1 + } + fn key_udf(x: i32) -> i32 { + x % 2 + } + ) + .to_string(), + nodes: vec![ + ( + "x0".to_string(), + Node::Source { + key_type: "i32".to_string(), + data_type: "i32".to_string(), + topic: "my-topic-1".to_string(), + num_partitions: 10, + }, + ), + ( + "x1".to_string(), + Node::Filter { + input: "x0".to_string(), + fun: "filter_udf".to_string(), + }, + ), + ( + "x2".to_string(), + Node::Group { + input: "x1".to_string(), + fun: "key_udf".to_string(), + }, + ), + ( + "x3".to_string(), + Node::Map { + input: "x2".to_string(), + fun: "map_udf".to_string(), + }, + ), + ( + "x4".to_string(), + Node::Sink { + input: "x3".to_string(), + topic: "my-topic-2".to_string(), + fun: "key_udf".to_string(), + }, + ), + ] + .into_iter() + .collect(), + }, + &QueryConfig { + parallelism: 2, + state_backend: StateBackend::Sled, + }, + &mut ServerConfig { + broker: "localhost:9092".to_socket_addrs().unwrap().next().unwrap(), + workers: vec![ + (WorkerId(0), Worker::dummy("aarch64-unknown-linux-gnu", 2)), + (WorkerId(1), Worker::dummy("aarch64-unknown-linux-gnu", 2)), + (WorkerId(2), Worker::dummy("aarch64-unknown-linux-gnu", 2)), + (WorkerId(3), Worker::dummy("aarch64-unknown-linux-gnu", 2)), + ] + .into_iter() + .collect(), + }, + ); +} diff --git a/arc-sys/coordinator/src/main.rs b/arc-sys/coordinator/src/main.rs new file mode 100644 index 000000000..cd5e7d88a --- /dev/null +++ b/arc-sys/coordinator/src/main.rs @@ -0,0 +1,47 @@ +#![feature(arbitrary_self_types)] +#![feature(hash_drain_filter)] +// #![allow(unused)] + +pub mod client_receiver; +pub mod client_sender; +pub mod compiler; +pub mod rest_listener; +pub mod server; +pub mod tls; +pub mod worker_listener; +pub mod worker_receiver; +pub mod worker_sender; + +use clap::Parser; +use server::Server; +use shared::config::DEFAULT_COORDAINTOR_REST_PORT; +use shared::config::DEFAULT_COORDINATOR_BROKER_ADDR; +use shared::config::DEFAULT_COORDINATOR_TCP_PORT; +use shared::socket::parse_addr; +use std::net::SocketAddr; +use std::path::PathBuf; + +#[derive(Parser, Debug)] +pub struct Args { + #[clap(short, long, default_value_t = DEFAULT_COORDINATOR_TCP_PORT)] + tcp_listener_port: u16, + + #[clap(short, long, default_value_t = DEFAULT_COORDAINTOR_REST_PORT)] + rest_listener_port: u16, + + #[clap(short, long, value_parser = parse_addr, default_value = DEFAULT_COORDINATOR_BROKER_ADDR)] + broker: SocketAddr, + + #[clap(long)] + certificate: Option, + + #[clap(long)] + key: Option, +} + +#[tokio::main(flavor = "current_thread")] +async fn main() { + which::which("arc-mlir").expect("arc-mlir not found in PATH"); + shared::tracing::init(); + Server::start(Args::parse()).await; +} diff --git a/arc-sys/coordinator/src/rest_listener.rs b/arc-sys/coordinator/src/rest_listener.rs new file mode 100644 index 000000000..ed72d0bac --- /dev/null +++ b/arc-sys/coordinator/src/rest_listener.rs @@ -0,0 +1,49 @@ +use super::server::Server; +use axum::extract::State; +use axum::http::StatusCode; +use axum::response::IntoResponse; +use axum::routing::post; +use axum::Json; +use axum::Router; +use shared::api::CoordinatorAPI; +use std::net::SocketAddr; + +#[derive(Clone)] +struct Actor { + server: Server, +} + +impl Actor { + pub fn new(server: Server) -> Self { + Self { server } + } + + async fn handle(self: State, Json(msg): Json) -> impl IntoResponse { + match msg { + CoordinatorAPI::Shutdown => { + self.server.shutdown().await; + StatusCode::OK.into_response() + } + _ => StatusCode::BAD_REQUEST.into_response(), + } + } +} + +pub struct RestListener; + +impl RestListener { + pub fn start(port: u16, server: Server) { + tokio::spawn(async move { + let router = Router::new() + .route("/", post(Actor::handle)) + .with_state(Actor::new(server)); + + tracing::info!("Listening for clients on {}", port); + + axum::Server::bind(&SocketAddr::from(([127, 0, 0, 1], port))) + .serve(router.into_make_service()) + .await + .unwrap(); + }); + } +} diff --git a/arc-sys/coordinator/src/server.rs b/arc-sys/coordinator/src/server.rs new file mode 100644 index 000000000..1ae5b60c5 --- /dev/null +++ b/arc-sys/coordinator/src/server.rs @@ -0,0 +1,201 @@ +use shared::api::Architecture; +use shared::api::QueryConfig; +use std::collections::BTreeSet; +use std::collections::HashMap; +use std::fmt::Debug; +use std::net::IpAddr; +use std::net::Ipv4Addr; +use std::net::SocketAddr; +use std::sync::Arc; +use tokio::sync::mpsc; +use tokio::sync::mpsc::Receiver; +use tokio::sync::mpsc::Sender; +use tokio::sync::oneshot; + +use crate::rest_listener::RestListener; +use crate::worker_listener::TcpListener; +use crate::worker_sender::WorkerSender; +use crate::Args; + +struct Actor { + mailbox: Receiver, + config: ServerConfig, + args: Args, + server: Server, + query_counter: usize, +} + +pub struct Worker { + pub tx: WorkerSender, + pub arch: Architecture, + pub available_cpus: BTreeSet, + pub available_ports: BTreeSet, + pub ip: IpAddr, +} + +impl Worker { + pub fn dummy(target_triple: &str, num_cores: usize) -> Self { + Self { + tx: WorkerSender::dummy(), + arch: Architecture { + target_triple: target_triple.to_owned(), + num_cpus: num_cores, + }, + available_cpus: (0..num_cores).into_iter().collect(), + available_ports: (8000..9000).into_iter().collect(), + ip: IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), + } + } +} + +pub struct ServerConfig { + pub broker: SocketAddr, + pub workers: HashMap, +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] +pub struct WorkerId(pub u32); + +#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] +pub struct ClientId(pub u32); + +#[derive(Clone)] +pub struct Server(Sender); + +#[derive(Debug)] +enum Message { + RegisterWorker { + id: WorkerId, + ip: IpAddr, + arch: Architecture, + tx: WorkerSender, + }, + UnregisterWorker { + id: WorkerId, + }, + #[allow(unused)] + BatchQuery { + source: String, + config: QueryConfig, + tx: oneshot::Sender, + }, + StreamQuery { + source: String, + config: QueryConfig, + }, + Shutdown, +} + +impl Actor { + fn new(mailbox: Receiver, server: Server, args: Args) -> Self { + Self { + mailbox, + config: ServerConfig { + broker: args.broker, + workers: HashMap::new(), + }, + args, + server, + query_counter: 0, + } + } + + async fn run(mut self) { + TcpListener::start(self.args.tcp_listener_port, self.server.clone()); + RestListener::start(self.args.tcp_listener_port, self.server.clone()); + while let Some(msg) = self.mailbox.recv().await { + self.handle(msg); + } + } + + fn handle(&mut self, msg: Message) { + match msg { + Message::RegisterWorker { id, ip, arch, tx } => { + let worker = Worker { + tx, + ip, + available_cpus: (0..arch.num_cpus).into_iter().collect(), + available_ports: (8000..9000).into_iter().collect(), + arch, + }; + self.config.workers.insert(id, worker); + } + Message::UnregisterWorker { id } => { + self.config.workers.remove(&id); + } + Message::BatchQuery { .. } => todo!(), + Message::StreamQuery { source, config } => { + let id = self.query_counter; + self.query_counter += 1; + tokio::runtime::Runtime::new() + .expect("Failed to create tokio runtime") + .block_on(self.stream_query(id, &source, &config)) + } + Message::Shutdown => todo!(), + } + } + + pub async fn stream_query(&mut self, id: usize, source: &str, config: &QueryConfig) { + let name = Arc::new(format!("package{id}")); + let graph = crate::compiler::compile(&name, source, config, &mut self.config).await; + for (worker_ids, binary_path) in graph.deployment { + let binary = Arc::new(std::fs::read(binary_path).expect("Failed to read binary")); + for worker_id in worker_ids { + let worker = self.config.workers.get(&worker_id).unwrap(); + worker.tx.execute(name.clone(), binary.clone()).await; + } + } + } +} + +impl Server { + pub async fn start(args: Args) { + let (tx, rx) = mpsc::channel(100); + tokio::spawn(Actor::new(rx, Self(tx), args).run()) + .await + .expect("Failed to spawn actor"); + } + + pub async fn unregister_worker(&self, id: WorkerId) { + self.0 + .send(Message::UnregisterWorker { id }) + .await + .expect("Failed to send"); + } + + pub async fn register_worker( + &self, + id: WorkerId, + ip: IpAddr, + arch: Architecture, + tx: WorkerSender, + ) { + self.0 + .send(Message::RegisterWorker { id, ip, arch, tx }) + .await + .expect("Failed to send"); + } + + pub async fn batch_query(&self, source: String, config: QueryConfig) -> String { + let (tx, rx) = oneshot::channel(); + self.0 + .send(Message::BatchQuery { source, config, tx }) + .await + .expect("Failed to send"); + rx.await.expect("Server is dead") + } + + pub async fn stream_query(&self, source: String, config: QueryConfig) { + self.0 + .send(Message::StreamQuery { source, config }) + .await + .expect("Failed to send"); + } + + pub async fn shutdown(&self) { + self.0 + .send(Message::Shutdown) + .await + .expect("Failed to forward"); + } +} diff --git a/arc-sys/coordinator/src/tls.rs b/arc-sys/coordinator/src/tls.rs new file mode 100644 index 000000000..eed665d31 --- /dev/null +++ b/arc-sys/coordinator/src/tls.rs @@ -0,0 +1,69 @@ +#![allow(unused)] + +use rustls::Certificate; +use rustls::PrivateKey; +use shared::api::CoordinatorAPI; +use std::fs::File; +use std::io::BufReader; +use std::path::Path; +use std::sync::Arc; +use tokio::io; +use tokio::io::split; +use tokio::io::ReadHalf; +use tokio::io::WriteHalf; +use tokio::net::TcpStream; +use tokio_rustls::server::TlsStream; +use tokio_rustls::TlsAcceptor; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_util::codec::FramedRead; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +use shared::api::WorkerAPI; + +pub type TlsReceiver = + Framed>, LengthDelimitedCodec>, T, T, Json>; + +pub type TlsSender = + Framed>, LengthDelimitedCodec>, T, T, Json>; + +pub async fn tls_stream( + acceptor: TlsAcceptor, + stream: TcpStream, +) -> (TlsReceiver, TlsSender) { + let mut stream = acceptor + .accept(stream) + .await + .expect("Failed to accept TLS stream"); + let (rx, tx) = split(stream); + let rx = FramedRead::new(rx, LengthDelimitedCodec::new()); + let rx = Framed::new(rx, Json::default()); + let tx = FramedWrite::new(tx, LengthDelimitedCodec::new()); + let tx = Framed::new(tx, Json::default()); + (rx, tx) +} + +fn tls_acceptor() -> Result { + let certs = load_certs(Path::new("todo"))?; + let mut keys = load_keys(Path::new("todo"))?; + + rustls::ServerConfig::builder() + .with_safe_defaults() + .with_no_client_auth() + .with_single_cert(certs, keys.remove(0)) + .map(|config| TlsAcceptor::from(Arc::new(config))) + .map_err(|err| io::Error::new(io::ErrorKind::InvalidInput, err)) +} + +fn load_certs(path: &Path) -> io::Result> { + rustls_pemfile::certs(&mut BufReader::new(File::open(path)?)) + .map_err(|_| io::Error::new(io::ErrorKind::InvalidInput, "invalid cert")) + .map(|mut certs| certs.drain(..).map(Certificate).collect()) +} + +fn load_keys(path: &Path) -> io::Result> { + rustls_pemfile::rsa_private_keys(&mut BufReader::new(File::open(path)?)) + .map_err(|_| io::Error::new(io::ErrorKind::InvalidInput, "invalid key")) + .map(|mut keys| keys.drain(..).map(PrivateKey).collect()) +} diff --git a/arc-sys/coordinator/src/worker_listener.rs b/arc-sys/coordinator/src/worker_listener.rs new file mode 100644 index 000000000..a0fa3f4d4 --- /dev/null +++ b/arc-sys/coordinator/src/worker_listener.rs @@ -0,0 +1,72 @@ +use super::server::Server; +use super::worker_receiver::WorkerReceiver; +use crate::server::WorkerId; +use crate::worker_sender::WorkerSender; +use shared::api::CoordinatorAPI; +use std::net::SocketAddr; +use tokio::net::TcpStream; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_stream::StreamExt; +use tokio_util::codec::FramedRead; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +struct Actor { + port: u16, + server: Server, + id: WorkerId, +} + +impl Actor { + fn new(port: u16, server: Server) -> Self { + Self { + port, + server, + id: WorkerId(0), + } + } + + async fn run(mut self) { + let addr = SocketAddr::from(([0, 0, 0, 0], self.port)); + // let acceptor = tls_acceptor().expect("Failed to create TLS acceptor"); + let rx = tokio::net::TcpListener::bind(&addr) + .await + .expect("Failed to bind"); + tracing::info!("Listening for workers on {}", addr); + loop { + match rx.accept().await { + Ok((stream, addr)) => self.handle(stream, addr).await, + Err(err) => println!("Error: {}", err), + } + } + } + + async fn handle(&mut self, stream: TcpStream, addr: SocketAddr) { + let id = self.id; + self.id.0 += 1; + let server = self.server.clone(); + tokio::spawn(async move { + let (rx, tx) = stream.into_split(); + let rx = FramedRead::new(rx, LengthDelimitedCodec::new()); + let mut rx = Framed::new(rx, Json::default()); + let tx = FramedWrite::new(tx, LengthDelimitedCodec::new()); + let tx = Framed::new(tx, Json::default()); + if let Some(Ok(CoordinatorAPI::RegisterWorker { arch })) = rx.next().await { + tracing::info!("Handshake successful"); + server + .register_worker(id, addr.ip(), arch, WorkerSender::start(tx)) + .await; + WorkerReceiver::start(rx, id, server); + } + }); + } +} + +pub struct TcpListener; + +impl TcpListener { + pub fn start(port: u16, server: Server) { + tokio::spawn(Actor::new(port, server).run()); + } +} diff --git a/arc-sys/coordinator/src/worker_receiver.rs b/arc-sys/coordinator/src/worker_receiver.rs new file mode 100644 index 000000000..81a6b1850 --- /dev/null +++ b/arc-sys/coordinator/src/worker_receiver.rs @@ -0,0 +1,53 @@ +use shared::api::CoordinatorAPI; +use shared::tcp; +use tokio_stream::StreamExt; + +use crate::server::WorkerId; + +use super::server::Server; + +#[allow(unused)] +struct Actor { + mailbox: tcp::Receiver, + id: WorkerId, + server: Server, +} + +pub struct WorkerReceiver; + +impl Actor { + fn new(mailbox: tcp::Receiver, id: WorkerId, server: Server) -> Self { + Self { + mailbox, + id, + server, + } + } + + async fn run(mut self) { + while let Some(msg) = self.mailbox.next().await { + match msg { + Ok(msg) => self.handle(msg).await, + Err(err) => { + println!("Error: {}", err); + } + } + } + } + + async fn handle(&mut self, msg: CoordinatorAPI) { + match msg { + CoordinatorAPI::RegisterWorker { .. } => unreachable!(), + CoordinatorAPI::RegisterClient => todo!(), + CoordinatorAPI::Query { .. } => unreachable!(), + CoordinatorAPI::Shutdown => todo!(), + } + } +} + +impl WorkerReceiver { + pub fn start(rx: tcp::Receiver, id: WorkerId, server: Server) -> Self { + tokio::spawn(Actor::new(rx, id, server).run()); + Self + } +} diff --git a/arc-sys/coordinator/src/worker_sender.rs b/arc-sys/coordinator/src/worker_sender.rs new file mode 100644 index 000000000..99be4c858 --- /dev/null +++ b/arc-sys/coordinator/src/worker_sender.rs @@ -0,0 +1,58 @@ +use futures::SinkExt; +use shared::api::WorkerAPI; +use shared::tcp; +use std::sync::Arc; +use tokio::sync::mpsc; + +struct Actor { + mailbox: mpsc::Receiver, + tx: tcp::Sender, +} + +#[derive(Debug)] +enum Message { + Cast(WorkerAPI), +} + +#[derive(Debug, Clone)] +pub struct WorkerSender(mpsc::Sender); + +impl Actor { + fn new(mailbox: mpsc::Receiver, tx: tcp::Sender) -> Self { + Self { mailbox, tx } + } + + async fn run(mut self) { + while let Some(msg) = self.mailbox.recv().await { + self.handle(msg).await; + } + } + + async fn handle(&mut self, msg: Message) { + match msg { + Message::Cast(msg) => { + self.tx.send(msg).await.unwrap(); + } + } + } +} + +impl WorkerSender { + pub fn start(tx_tcp: tcp::Sender) -> Self { + let (tx, rx) = mpsc::channel(100); + tokio::spawn(Actor::new(rx, tx_tcp).run()); + Self(tx) + } + + pub fn dummy() -> Self { + let (tx, _) = mpsc::channel(100); + Self(tx) + } + + pub async fn execute(&self, name: Arc, binary: Arc>) { + self.0 + .send(Message::Cast(WorkerAPI::Execute { name, binary })) + .await + .expect("Failed to send"); + } +} diff --git a/arc-runtime/Cargo.lock b/arc-sys/dataflow/Cargo.lock similarity index 53% rename from arc-runtime/Cargo.lock rename to arc-sys/dataflow/Cargo.lock index 5b2d59b7f..0503998b5 100644 --- a/arc-runtime/Cargo.lock +++ b/arc-sys/dataflow/Cargo.lock @@ -2,323 +2,135 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addr2line" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" -dependencies = [ - "gimli", -] - [[package]] name = "adler" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", + "opaque-debug", +] + [[package]] name = "ahash" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.8", "once_cell", - "version_check 0.9.4", + "version_check", ] [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] [[package]] -name = "anyhow" -version = "1.0.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0" - -[[package]] -name = "arc-runtime" -version = "0.0.0" -dependencies = [ - "arrow2 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "comet-extra", - "derive_more", - "dyn-clone", - "futures", - "hexf", - "hierarchical_hash_wheel_timer", - "kompact", - "macros", - "omnipaxos", - "polars", - "rand 0.8.4", - "replace_with", - "serde", - "serde_derive", - "slog", - "time 0.3.7", - "tokio", - "uuid", -] - -[[package]] -name = "arc-swap" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabe5a181f83789739c194cbe5a897dde195078fac08568d09221fd6137a7ba8" - -[[package]] -name = "arr_macro" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a105bfda48707cf19220129e78fca01e9639433ffaef4163546ed8fb04120a5" -dependencies = [ - "arr_macro_impl", - "proc-macro-hack", -] - -[[package]] -name = "arr_macro_impl" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609c78bd572f4edc74310dfb63a01f5609d53fa8b4dd7c4d98aef3b3e8d72d1" -dependencies = [ - "proc-macro-hack", - "quote", - "syn", -] - -[[package]] -name = "arrayref" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "arrow2" -version = "0.9.1" +name = "alga" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aea88c49c98db9de8c72ccaa0470182857e70faa635f32fc4aa3c9e1a1dfefea" +checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2" dependencies = [ - "bytemuck", - "chrono", - "hash_hasher", + "approx", + "num-complex 0.2.4", "num-traits", - "simdutf8", ] [[package]] -name = "arrow2" -version = "0.9.1" -source = "git+https://github.com/jorgecarleitao/arrow2?rev=2c4dbb21daa4f258fd707a3f3c2cbe5abb374f6b#2c4dbb21daa4f258fd707a3f3c2cbe5abb374f6b" -dependencies = [ - "bytemuck", - "chrono", - "csv", - "either", - "hash_hasher", - "lexical-core", - "multiversion", - "num-traits", - "simdutf8", - "streaming-iterator", - "strength_reduce", -] - -[[package]] -name = "as_num" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62eaa19b325e1b3dc2f7b9b6de544dd536619e3dcf986fc391b2c643f10d68c0" - -[[package]] -name = "async-channel" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-executor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "once_cell", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" -dependencies = [ - "async-channel", - "async-executor", - "async-io", - "async-mutex", - "blocking", - "futures-lite", - "num_cpus", - "once_cell", -] - -[[package]] -name = "async-io" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" -dependencies = [ - "concurrent-queue", - "futures-lite", - "libc", - "log", - "once_cell", - "parking", - "polling", - "slab", - "socket2", - "waker-fn", - "winapi", -] - -[[package]] -name = "async-lock" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-mutex" -version = "1.4.0" +name = "anyhow" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" -dependencies = [ - "event-listener", -] +checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" [[package]] -name = "async-std" -version = "1.10.0" +name = "approx" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" +checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" dependencies = [ - "async-channel", - "async-global-executor", - "async-io", - "async-lock", - "crossbeam-utils 0.8.6", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "num_cpus", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", + "num-traits", ] [[package]] -name = "async-task" -version = "4.0.3" +name = "arrayvec" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] -name = "atomic" -version = "0.5.1" +name = "async-trait" +version = "0.1.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c" +checksum = "31e6e93155431f3931513b243d371981bb2770112b370c82745a1d19d2f99364" dependencies = [ - "autocfg", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "atomic-waker" -version = "1.0.0" +name = "autocfg" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "atty" -version = "0.2.14" +name = "base64" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] -name = "autocfg" +name = "base64ct" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" [[package]] -name = "backtrace" -version = "0.3.63" +name = "bindgen" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" +checksum = "fd4865004a46a0aafb2a0a5eb19d3c9fc46ee5f063a6cfc605c69ac9ecf5263d" dependencies = [ - "addr2line", - "cc", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", ] [[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "bit-vec" -version = "0.6.3" +name = "bit_field" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "dcb6dd1c2376d2e096796e234a70e17e94cc2d5d54ff8ce42b28cef1d0d359a4" [[package]] -name = "bitfields" -version = "0.2.0" +name = "bitflags" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a0dd3fdef66457be053e25548d0f9b75f389547c897739daa13d39db01bf0a" +checksum = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" [[package]] name = "bitflags" @@ -327,76 +139,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "bitmaps" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" -dependencies = [ - "typenum", -] - -[[package]] -name = "blake2b_simd" -version = "0.5.11" +name = "block-buffer" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", + "generic-array", ] [[package]] -name = "blocking" -version = "1.1.0" +name = "boringssl-src" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427" +checksum = "0511b9f0b739706e05b7279ece5dfc1932a42839cf005cb0f00420a3fea27c96" dependencies = [ - "async-channel", - "async-task", - "atomic-waker", - "fastrand", - "futures-lite", - "once_cell", -] - -[[package]] -name = "bstr" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" -dependencies = [ - "lazy_static", - "memchr", - "regex-automata", - "serde", + "cmake", ] [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytemuck" -version = "1.7.3" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439989e6b8c38d1b6570a384ef1e49c8848128f5a97f3914baef02920842712f" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e215f8c2f9f79cb53c8335e687ffd07d5bfcb6fe5fc80723762d0be46e7cc54" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" [[package]] name = "byteorder" @@ -406,30 +176,48 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" + +[[package]] +name = "bzip2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0" dependencies = [ - "serde", + "bzip2-sys", + "libc", ] [[package]] -name = "cache-padded" -version = "1.2.0" +name = "bzip2-sys" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] [[package]] name = "cc" -version = "1.0.72" +version = "1.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" +dependencies = [ + "jobserver", +] [[package]] -name = "cfg-if" -version = "0.1.10" +name = "cexpr" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +dependencies = [ + "nom", +] [[package]] name = "cfg-if" @@ -438,59 +226,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "chrono" -version = "0.4.19" +name = "cipher" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "libc", - "num-integer", - "num-traits", - "time 0.1.43", - "winapi", + "generic-array", ] [[package]] -name = "comet" -version = "0.1.0" -source = "git+https://github.com/Starlight-JS/comet?rev=c2f96f8#c2f96f899cd43a2507b8298f2408a5039b65559f" +name = "clang-sys" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" dependencies = [ - "ahash", - "atomic", - "bit-vec", - "crossbeam", - "flume", - "hashbrown 0.11.2", - "im", + "glob", "libc", - "memx", - "mopa", - "parking_lot", - "rand 0.8.4", - "rosalloc", - "scoped_threadpool", - "threadfin", - "winapi", + "libloading", ] [[package]] -name = "comet-extra" -version = "0.1.0" -source = "git+https://github.com/Starlight-JS/comet?rev=c2f96f8#c2f96f899cd43a2507b8298f2408a5039b65559f" +name = "cmake" +version = "0.1.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" dependencies = [ - "ahash", - "cfg-if 1.0.0", - "comet", + "cc", ] [[package]] -name = "concurrent-queue" -version = "1.2.2" +name = "color_quant" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" -dependencies = [ - "cache-padded", -] +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "constant_time_eq" @@ -500,9 +268,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "core-foundation" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -515,396 +283,333 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] -name = "crossbeam" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-channel 0.5.2", - "crossbeam-deque 0.8.1", - "crossbeam-epoch 0.9.6", - "crossbeam-queue 0.3.3", - "crossbeam-utils 0.8.6", -] - -[[package]] -name = "crossbeam-channel" -version = "0.4.4" +name = "cpufeatures" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", + "libc", ] [[package]] -name = "crossbeam-channel" -version = "0.5.2" +name = "crc" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" +checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", + "crc-catalog 1.1.1", ] [[package]] -name = "crossbeam-deque" -version = "0.7.4" +name = "crc" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" +checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" dependencies = [ - "crossbeam-epoch 0.8.2", - "crossbeam-utils 0.7.2", - "maybe-uninit", + "crc-catalog 2.1.0", ] [[package]] -name = "crossbeam-deque" -version = "0.8.1" +name = "crc-catalog" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch 0.9.6", - "crossbeam-utils 0.8.6", -] +checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" [[package]] -name = "crossbeam-epoch" -version = "0.8.2" +name = "crc-catalog" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "lazy_static", - "maybe-uninit", - "memoffset 0.5.6", - "scopeguard", -] +checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" [[package]] -name = "crossbeam-epoch" -version = "0.9.6" +name = "crc32c" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762" +checksum = "3dfea2db42e9927a3845fb268a10a72faed6d416065f77873f05e411457c363e" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", - "lazy_static", - "memoffset 0.6.5", - "scopeguard", + "rustc_version", ] [[package]] -name = "crossbeam-queue" -version = "0.1.2" +name = "crc32fast" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "crossbeam-utils 0.6.6", + "cfg-if", ] [[package]] -name = "crossbeam-queue" -version = "0.2.3" +name = "crossbeam" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" +checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", + "cfg-if", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", ] [[package]] -name = "crossbeam-queue" -version = "0.3.3" +name = "crossbeam-channel" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b979d76c9fcb84dffc80a73f7290da0f83e4c95773494674cb44b76d13a7a110" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", + "cfg-if", + "crossbeam-utils", ] [[package]] -name = "crossbeam-utils" -version = "0.6.6" +name = "crossbeam-deque" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if 0.1.10", - "lazy_static", + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] -name = "crossbeam-utils" -version = "0.7.2" +name = "crossbeam-epoch" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ "autocfg", - "cfg-if 0.1.10", - "lazy_static", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120" -dependencies = [ - "cfg-if 1.0.0", - "lazy_static", -] - -[[package]] -name = "csv" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" -dependencies = [ - "bstr", - "csv-core", - "itoa 0.4.8", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" -dependencies = [ - "memchr", -] - -[[package]] -name = "ctor" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" -dependencies = [ - "quote", - "syn", + "cfg-if", + "crossbeam-utils", + "memoffset 0.7.1", + "scopeguard", ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "crossbeam-queue" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" dependencies = [ - "proc-macro2", - "quote", - "syn", + "cfg-if", + "crossbeam-utils", ] [[package]] -name = "dirs" -version = "1.0.5" +name = "crossbeam-utils" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "libc", - "redox_users 0.3.5", - "winapi", + "cfg-if", ] [[package]] -name = "dirs" -version = "4.0.0" +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "dirs-next" -version = "2.0.0" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "cfg-if 1.0.0", - "dirs-sys-next", + "generic-array", + "typenum", ] [[package]] -name = "dirs-sys" -version = "0.3.6" +name = "curl" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" +checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" dependencies = [ + "curl-sys", "libc", - "redox_users 0.4.0", - "winapi", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2", + "winapi 0.3.9", ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "curl-sys" +version = "0.4.59+curl-7.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "6cfce34829f448b08f55b7db6d0009e23e2e86a34e8c2b366269bf5799b4a407" dependencies = [ + "cc", "libc", - "redox_users 0.4.0", - "winapi", -] - -[[package]] -name = "dyn-clone" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "winapi 0.3.9", +] [[package]] -name = "encoding" -version = "0.2.33" +name = "derive-new" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" +checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" dependencies = [ - "encoding-index-japanese", - "encoding-index-korean", - "encoding-index-simpchinese", - "encoding-index-singlebyte", - "encoding-index-tradchinese", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "encoding-index-japanese" -version = "1.20141219.5" +name = "digest" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "encoding_index_tests", + "block-buffer", + "crypto-common", + "subtle", ] [[package]] -name = "encoding-index-korean" -version = "1.20141219.5" +name = "educe" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" +checksum = "cb0188e3c3ba8df5753894d54461f0e39bc91741dc5b22e1c46999ec2c71f4e4" dependencies = [ - "encoding_index_tests", + "enum-ordinalize", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "encoding-index-simpchinese" -version = "1.20141219.5" +name = "either" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" -dependencies = [ - "encoding_index_tests", -] +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] -name = "encoding-index-singlebyte" -version = "1.20141219.5" +name = "encoding_rs" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ - "encoding_index_tests", + "cfg-if", ] [[package]] -name = "encoding-index-tradchinese" -version = "1.20141219.5" +name = "enum-ordinalize" +version = "3.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" +checksum = "a62bb1df8b45ecb7ffa78dca1c17a438fb193eb083db0b1b494d2a61bcb5096a" dependencies = [ - "encoding_index_tests", + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "rustc_version", + "syn", ] [[package]] -name = "encoding_index_tests" -version = "0.1.4" +name = "errno" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi 0.3.9", +] [[package]] -name = "encoding_rs" -version = "0.8.30" +name = "errno-dragonfly" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" dependencies = [ - "cfg-if 1.0.0", + "cc", + "libc", ] [[package]] -name = "event-listener" -version = "2.5.2" +name = "exr" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" +checksum = "8eb5f255b5980bb0c8cf676b675d1a99be40f316881444f44e0462eaf5df5ded" +dependencies = [ + "bit_field", + "flume", + "half 2.1.0", + "lebe", + "miniz_oxide", + "smallvec", + "threadpool", +] [[package]] -name = "executors" -version = "0.8.0" +name = "fail" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99e7b1533b6caa2e16120bfc652aeb087c9197b1bf419edfc8587e6022f2fc9" +checksum = "3be3c61c59fdc91f5dbc3ea31ee8623122ce80057058be560654c5d410d181a6" dependencies = [ - "arr_macro", - "async-task", - "crossbeam-channel 0.4.4", - "crossbeam-deque 0.7.4", - "crossbeam-utils 0.7.2", + "lazy_static", "log", - "num_cpus", "rand 0.7.3", - "synchronoise", - "threadpool", ] [[package]] -name = "failure" -version = "0.1.8" +name = "fastrand" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ - "backtrace", - "failure_derive", + "instant", ] [[package]] -name = "failure_derive" -version = "0.1.8" +name = "filetime" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", + "cfg-if", + "libc", + "redox_syscall", + "windows-sys 0.42.0", ] [[package]] -name = "fastrand" -version = "1.7.0" +name = "fixedbitset" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ - "instant", + "crc32fast", + "miniz_oxide", ] [[package]] name = "flume" -version = "0.10.10" +version = "0.10.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d04dafd11240188e146b6f6476a898004cace3be31d4ec5e08e216bf4947ac0" +checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" dependencies = [ "futures-core", "futures-sink", @@ -936,19 +641,34 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "futures" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" + [[package]] name = "futures" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28560757fe2bb34e79f907794bb6b22ae8b0e5c669b638a1132f2592b19035b4" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" dependencies = [ "futures-channel", "futures-core", @@ -961,9 +681,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3dda0b6588335f360afc675d0564c17a77a2bda81ca178a4b6081bd86c7f0b" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" dependencies = [ "futures-core", "futures-sink", @@ -971,47 +691,33 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" [[package]] name = "futures-executor" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d6d2ff5bb10fb95c85b8ce46538a2e5f5e7fdc755623a7d4529ab8a4ed9d2a" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" dependencies = [ "futures-core", "futures-task", "futures-util", + "num_cpus", ] [[package]] name = "futures-io" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2" - -[[package]] -name = "futures-lite" -version = "1.12.0" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" [[package]] name = "futures-macro" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ "proc-macro2", "quote", @@ -1020,22 +726,29 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3055baccb68d74ff6480350f8d6eb8fcfa3aa11bdc1a1ae3afdd0514617d508" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] name = "futures-task" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-timer" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" dependencies = [ + "futures 0.1.31", "futures-channel", "futures-core", "futures-io", @@ -1048,35 +761,58 @@ dependencies = [ "slab", ] +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "getrandom" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.2.4" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] [[package]] -name = "gimli" -version = "0.26.1" +name = "gif" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" +checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06" +dependencies = [ + "color_quant", + "weezl", +] [[package]] name = "glob" @@ -1085,23 +821,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] -name = "gloo-timers" -version = "0.2.2" +name = "grpcio" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f16c88aa13d2656ef20d1c042086b8767bbe2bdb62526894275a1b062161b2e" +checksum = "99cf790272c5fb75a2fd7f2e8282e910d0fe0ed1d954cb29b07b74228694302a" dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", - "web-sys", + "bytes", + "futures 0.3.25", + "grpcio-sys", + "libc", + "log", + "parking_lot 0.11.2", + "prost 0.7.0", +] + +[[package]] +name = "grpcio-compiler" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad402dbef95d726c4170fc69209c4d669a199c6462c63c69d67fa1d8f44511f4" +dependencies = [ + "derive-new", + "prost 0.11.5", + "prost-build 0.11.5", + "prost-types 0.11.5", + "tempfile", +] + +[[package]] +name = "grpcio-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f89a56d830be4dddc939c377c95e3b77e30c86a8df99c20095c34cf9038447b" +dependencies = [ + "bindgen", + "boringssl-src", + "cc", + "cmake", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "walkdir", ] [[package]] name = "h2" -version = "0.3.11" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ "bytes", "fnv", @@ -1117,112 +885,84 @@ dependencies = [ ] [[package]] -name = "hash_hasher" -version = "2.0.3" +name = "half" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74721d007512d0cb3338cd20f0654ac913920061a4c4d0d8708edb3f2a698c0c" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] -name = "hashbrown" -version = "0.11.2" +name = "half" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554" dependencies = [ - "ahash", + "crunchy", ] [[package]] name = "hashbrown" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", - "rayon", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", ] [[package]] -name = "hexf" -version = "0.2.1" +name = "heck" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6618f4550dcd7d9ddb5126ab18d48dfa31aa952159cb832390bda464d3bc827e" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" dependencies = [ - "hexf-parse", - "syn", + "unicode-segmentation", ] [[package]] -name = "hexf-parse" -version = "0.2.1" +name = "heck" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] -name = "hierarchical_hash_wheel_timer" -version = "1.1.0" +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58ffa8e952c33857fbaad0fab19d41ecd3a7a68c15c4e7b79c698e6379ded79" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ - "crossbeam-channel 0.5.2", - "rustc-hash", - "uuid", + "libc", ] [[package]] -name = "hocon" -version = "0.3.7" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8249bcd360b81ac97a9c42fe46e08c520f0c9942a16cae6670979e6ea1759b4" -dependencies = [ - "failure", - "java-properties", - "memchr", - "nom", - "serde_path_to_error", - "uuid", -] +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "hocon" -version = "0.5.2" +name = "hmac" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b343112b7ebf5f59651daf37533fc623b88b4363111a883ed9448fdc38e0b73" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "java-properties", - "memchr", - "nom", - "reqwest", - "serde", - "serde_path_to_error", - "thiserror", - "uuid", + "digest", ] [[package]] name = "http" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 1.0.1", + "itoa", ] [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -1231,9 +971,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.5.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -1241,11 +981,26 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +[[package]] +name = "hwloc" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2934f84993b8b4bcae9b6a4e5f0aca638462dda9c7b4f26a570241494f21e0f4" +dependencies = [ + "bitflags 0.7.0", + "errno", + "kernel32-sys", + "libc", + "num 0.1.42", + "pkg-config", + "winapi 0.2.8", +] + [[package]] name = "hyper" -version = "0.14.16" +version = "0.14.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" dependencies = [ "bytes", "futures-channel", @@ -1256,7 +1011,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 0.4.8", + "itoa", "pin-project-lite", "socket2", "tokio", @@ -1280,37 +1035,41 @@ dependencies = [ [[package]] name = "idna" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] -name = "im" -version = "15.0.0" +name = "image" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111c1983f3c5bb72732df25cddacee9b546d08325fb584b5ebd38148be7b0246" +checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" dependencies = [ - "bitmaps", - "rand_core 0.5.1", - "rand_xoshiro", - "sized-chunks", - "typenum", - "version_check 0.9.4", + "bytemuck", + "byteorder", + "color_quant", + "exr", + "gif", + "jpeg-decoder", + "num-rational", + "num-traits", + "png", + "scoped_threadpool", + "tiff", ] [[package]] name = "indexmap" -version = "1.8.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", - "hashbrown 0.11.2", + "hashbrown", ] [[package]] @@ -1319,289 +1078,178 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] -name = "iovec" -version = "0.1.4" +name = "integer-encoding" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] +checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" [[package]] name = "ipnet" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" - -[[package]] -name = "iprange" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37209be0ad225457e63814401415e748e2453a5297f9b637338f5fb8afa4ec00" -dependencies = [ - "ipnet", -] - -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "itoa" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" - -[[package]] -name = "java-properties" -version = "1.4.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20e9b11dedd144ceb96484add3f9088c131795e4295ce51448ef755e0ec19c07" -dependencies = [ - "encoding", - "lazy_static", - "regex", -] +checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745" [[package]] -name = "js-sys" -version = "0.3.56" +name = "itertools" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "kompact" -version = "0.11.0" -source = "git+https://github.com/kompics/kompact?rev=e9deae8#e9deae85085a26e3c647dd8eaa21c47594bc7c0d" -dependencies = [ - "arc-swap", - "as_num", - "async-std", - "bitfields", - "bytes", - "crossbeam-channel 0.4.4", - "crossbeam-queue 0.2.3", - "crossbeam-utils 0.7.2", - "executors", - "futures", - "hierarchical_hash_wheel_timer", - "hocon 0.3.7", - "iovec", - "ipnet", - "iprange", - "kompact-actor-derive", - "kompact-component-derive", - "log", - "lru", - "mio", - "num_cpus", - "oncemutex", - "owning_ref", - "rustc-hash", - "rustc_version 0.2.3", - "serde", - "slog", - "slog-async", - "slog-term", - "synchronoise", - "uuid", -] - -[[package]] -name = "kompact-actor-derive" -version = "0.11.0" -source = "git+https://github.com/kompics/kompact?rev=e9deae8#e9deae85085a26e3c647dd8eaa21c47594bc7c0d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "kompact-component-derive" -version = "0.11.0" -source = "git+https://github.com/kompics/kompact?rev=e9deae8#e9deae85085a26e3c647dd8eaa21c47594bc7c0d" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" dependencies = [ - "proc-macro2", - "quote", - "syn", + "either", ] [[package]] -name = "kv-log-macro" -version = "1.0.7" +name = "itertools" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ - "log", + "either", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "itoa" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] -name = "lexical" -version = "6.0.1" +name = "jobserver" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34e981f88d060a67815388470172638f1af16b3a12e581cb75142f190161bf9" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" dependencies = [ - "lexical-core", + "libc", ] [[package]] -name = "lexical-core" -version = "0.8.2" +name = "jpeg-decoder" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3926d8f156019890be4abe5fd3785e0cff1001e06f59c597641fd513a5a284" +checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" dependencies = [ - "lexical-parse-float", - "lexical-parse-integer", - "lexical-util", - "lexical-write-float", - "lexical-write-integer", + "rayon", ] [[package]] -name = "lexical-parse-float" -version = "0.8.2" +name = "js-sys" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d066d004fa762d9da995ed21aa8845bb9f6e4265f540d716fb4b315197bf0e" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ - "lexical-parse-integer", - "lexical-util", - "static_assertions", + "wasm-bindgen", ] [[package]] -name = "lexical-parse-integer" -version = "0.8.0" +name = "kernel32-sys" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c92badda8cc0fc4f3d3cc1c30aaefafb830510c8781ce4e8669881f3ed53ac" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" dependencies = [ - "lexical-util", - "static_assertions", + "winapi 0.2.8", + "winapi-build", ] [[package]] -name = "lexical-util" -version = "0.8.1" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff669ccaae16ee33af90dc51125755efed17f1309626ba5c12052512b11e291" -dependencies = [ - "static_assertions", -] +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "lexical-write-float" -version = "0.8.2" +name = "lazycell" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5186948c7b297abaaa51560f2581dae625e5ce7dfc2d8fdc56345adb6dc576" -dependencies = [ - "lexical-util", - "lexical-write-integer", - "static_assertions", -] +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] -name = "lexical-write-integer" -version = "0.8.0" +name = "lebe" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece956492e0e40fd95ef8658a34d53a3b8c2015762fdcaaff2167b28de1f56ef" -dependencies = [ - "lexical-util", - "static_assertions", -] +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.113" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eef78b64d87775463c549fbd80e19249ef436ea3bf1de2a1eb7e717ec7fab1e9" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] -name = "lock_api" -version = "0.4.5" +name = "libloading" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "scopeguard", + "cfg-if", + "winapi 0.3.9", ] [[package]] -name = "log" -version = "0.4.14" +name = "libm" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", - "value-bag", -] +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] -name = "lru" -version = "0.6.6" +name = "libz-sys" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ea2d928b485416e8908cff2d97d621db22b27f7b3b6729e438bcf42c671ba91" +checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" dependencies = [ - "hashbrown 0.11.2", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] -name = "macros" -version = "0.0.0" +name = "lock_api" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ - "proc-macro2", - "quote", - "syn", + "autocfg", + "scopeguard", ] [[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" +name = "log" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] [[package]] -name = "memchr" -version = "2.4.1" +name = "lz4" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +dependencies = [ + "libc", + "lz4-sys", +] [[package]] -name = "memmap2" -version = "0.5.3" +name = "lz4-sys" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057a3db23999c867821a7a59feb06a578fcb03685e983dff90daf9e7d24ac08f" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" dependencies = [ + "cc", "libc", ] [[package]] -name = "memoffset" -version = "0.5.6" +name = "memchr" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg", -] +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" @@ -1613,12 +1261,12 @@ dependencies = [ ] [[package]] -name = "memx" -version = "0.1.18" +name = "memoffset" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902bfec851b10e18f2d749bb2a6ea639fa725383575a2737ffd2a8ac4f2ae01a" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ - "rustc_version 0.4.0", + "autocfg", ] [[package]] @@ -1629,76 +1277,45 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "miniz_oxide" -version = "0.4.4" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ "adler", - "autocfg", ] [[package]] name = "mio" -version = "0.7.14" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", -] - -[[package]] -name = "mopa" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a785740271256c230f57462d3b83e52f998433a7062fc18f96d5999474a9f915" - -[[package]] -name = "multiversion" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "025c962a3dd3cc5e0e520aa9c612201d127dcdf28616974961a649dca64f5373" -dependencies = [ - "multiversion-macros", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.42.0", ] [[package]] -name = "multiversion-macros" -version = "0.6.1" +name = "multimap" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a3e2bde382ebf960c1f3e79689fa5941625fe9bf694a1cb64af3e85faff3af" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "nanorand" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729eb334247daa1803e0a094d0a5c55711b85571179f5ec6e53eccfdf7008958" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.8", ] [[package]] name = "native-tls" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -1712,23 +1329,43 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + [[package]] name = "nom" -version = "4.2.3" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" dependencies = [ "memchr", - "version_check 0.1.5", + "version_check", ] [[package]] -name = "ntapi" -version = "0.3.6" +name = "noop-waker" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56902c3f29ce7afbecc1d088dfd2e3108033f3c02041c70788ed94280a3d5261" + +[[package]] +name = "num" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" dependencies = [ - "winapi", + "num-integer", + "num-iter", + "num-traits", ] [[package]] @@ -1738,7 +1375,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" dependencies = [ "num-bigint", - "num-complex", + "num-complex 0.4.2", "num-integer", "num-iter", "num-rational", @@ -1758,18 +1395,28 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.0" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" +checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" dependencies = [ "num-traits", ] [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -1777,9 +1424,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.42" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ "autocfg", "num-integer", @@ -1788,9 +1435,9 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", "num-bigint", @@ -1800,157 +1447,229 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", + "libm", ] [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ "hermit-abi", "libc", ] [[package]] -name = "num_threads" -version = "0.1.3" +name = "num_enum" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ba99ba6393e2c3734791401b66902d981cb03bf190af674ca69949b6d5fb15" +checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" dependencies = [ - "libc", + "num_enum_derive", ] [[package]] -name = "object" -version = "0.27.1" +name = "num_enum_derive" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" -dependencies = [ - "memchr", -] - -[[package]] -name = "omnipaxos" -version = "0.1.0" -source = "git+https://github.com/haraldng/omnipaxos?rev=36dd86d#36dd86dfadaf91f442a3ad35c6cc01fd129d0f4a" +checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" dependencies = [ - "hocon 0.5.2", - "slog", - "slog-async", - "slog-term", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "once_cell" -version = "1.9.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] -name = "oncemutex" -version = "0.1.1" +name = "opaque-debug" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d11de466f4a3006fe8a5e7ec84e93b79c70cb992ae0aa0eb631ad2df8abfe2" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.38" +version = "0.10.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" +checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" dependencies = [ - "bitflags", - "cfg-if 1.0.0", + "bitflags 1.3.2", + "cfg-if", "foreign-types", "libc", "once_cell", + "openssl-macros", "openssl-sys", ] +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "111.24.0+1.1.1s" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3498f259dab01178c6228c6b00dcef0ed2a2d5e20d648c017861227773ea4abd" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" -version = "0.9.72" +version = "0.9.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" +checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" dependencies = [ "autocfg", "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] [[package]] -name = "owning_ref" -version = "0.4.1" +name = "parking_lot" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ - "stable_deref_trait", + "instant", + "lock_api", + "parking_lot_core 0.8.6", ] [[package]] -name = "parking" -version = "2.0.0" +name = "parking_lot" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.5", +] [[package]] -name = "parking_lot" -version = "0.11.2" +name = "parking_lot_core" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ + "cfg-if", "instant", - "lock_api", - "parking_lot_core", + "libc", + "redox_syscall", + "smallvec", + "winapi 0.3.9", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" dependencies = [ - "cfg-if 1.0.0", - "instant", + "cfg-if", "libc", - "redox_syscall 0.2.10", + "redox_syscall", "smallvec", - "winapi", + "windows-sys 0.42.0", ] +[[package]] +name = "password-hash" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "pbkdf2" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271779f35b581956db91a3e55737327a03aa051e90b1c47aeb189508533adfd7" +dependencies = [ + "digest", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "petgraph" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +dependencies = [ + "fixedbitset 0.2.0", + "indexmap", +] + +[[package]] +name = "petgraph" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" +dependencies = [ + "fixedbitset 0.4.2", + "indexmap", +] [[package]] name = "pin-project" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", @@ -1959,9 +1678,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -1969,164 +1688,255 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pipeline" +version = "0.1.0" +dependencies = [ + "alga", + "arrayvec", + "crossbeam", + "futures 0.3.25", + "hwloc", + "image", + "libc", + "noop-waker", + "num 0.4.0", + "num-traits", + "num_cpus", + "rdkafka", + "rskafka", + "serde", + "serde_derive", + "serde_json", + "sled", + "tensorflow", + "tikv-client", + "time", + "tokio", + "tokio-serde", + "tokio-stream", + "tokio-util", + "webrtc-sctp", + "webrtc-util", +] + [[package]] name = "pkg-config" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] -name = "polars" -version = "0.19.1" -source = "git+https://github.com/pola-rs/polars?rev=a04786c#a04786c9d626e2f4fc5362213a660e8897559b38" +name = "png" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" dependencies = [ - "polars-core", - "polars-io", - "polars-lazy", - "polars-time", + "bitflags 1.3.2", + "crc32fast", + "flate2", + "miniz_oxide", ] [[package]] -name = "polars-arrow" -version = "0.19.1" -source = "git+https://github.com/pola-rs/polars?rev=a04786c#a04786c9d626e2f4fc5362213a660e8897559b38" +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "prettyplease" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c8992a85d8e93a28bdf76137db888d3874e3b230dee5ed8bebac4c9f7617773" dependencies = [ - "arrow2 0.9.1 (git+https://github.com/jorgecarleitao/arrow2?rev=2c4dbb21daa4f258fd707a3f3c2cbe5abb374f6b)", - "hashbrown 0.12.0", - "num", + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro-crate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +dependencies = [ + "once_cell", "thiserror", + "toml", ] [[package]] -name = "polars-core" -version = "0.19.1" -source = "git+https://github.com/pola-rs/polars?rev=a04786c#a04786c9d626e2f4fc5362213a660e8897559b38" +name = "proc-macro2" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "ahash", - "anyhow", - "arrow2 0.9.1 (git+https://github.com/jorgecarleitao/arrow2?rev=2c4dbb21daa4f258fd707a3f3c2cbe5abb374f6b)", - "chrono", - "hashbrown 0.12.0", + "unicode-ident", +] + +[[package]] +name = "procfs" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8809e0c18450a2db0f236d2a44ec0b4c1412d0eb936233579f0990faa5d5cd" +dependencies = [ + "bitflags 1.3.2", + "byteorder", + "flate2", + "hex", "lazy_static", - "num", - "num_cpus", - "polars-arrow", - "prettytable-rs", - "rayon", - "regex", + "libc", +] + +[[package]] +name = "prometheus" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5986aa8d62380092d2f50f8b1cdba9cb9b6731ffd4b25b51fd126b6c3e05b99c" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "libc", + "memchr", + "parking_lot 0.11.2", + "procfs", + "protobuf", + "reqwest", "thiserror", - "unsafe_unwrap", ] [[package]] -name = "polars-io" -version = "0.19.1" -source = "git+https://github.com/pola-rs/polars?rev=a04786c#a04786c9d626e2f4fc5362213a660e8897559b38" +name = "prost" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e6984d2f1a23009bd270b8bb56d0926810a3d483f59c987d77969e9d8e840b2" +dependencies = [ + "bytes", + "prost-derive 0.7.0", +] + +[[package]] +name = "prost" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c01db6702aa05baa3f57dec92b8eeeeb4cb19e894e73996b32a4093289e54592" dependencies = [ - "ahash", - "anyhow", - "arrow2 0.9.1 (git+https://github.com/jorgecarleitao/arrow2?rev=2c4dbb21daa4f258fd707a3f3c2cbe5abb374f6b)", - "csv-core", - "dirs 4.0.0", - "lazy_static", - "lexical", - "memchr", - "memmap2", - "num", - "num_cpus", - "polars-arrow", - "polars-core", - "rayon", - "regex", - "simdutf8", + "bytes", + "prost-derive 0.11.5", ] [[package]] -name = "polars-lazy" -version = "0.19.1" -source = "git+https://github.com/pola-rs/polars?rev=a04786c#a04786c9d626e2f4fc5362213a660e8897559b38" +name = "prost-build" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32d3ebd75ac2679c2af3a92246639f9fcc8a442ee420719cc4fe195b98dd5fa3" dependencies = [ - "ahash", - "glob", - "polars-arrow", - "polars-core", - "polars-io", - "polars-time", - "polars-utils", - "rayon", + "bytes", + "heck 0.3.3", + "itertools 0.9.0", + "log", + "multimap", + "petgraph 0.5.1", + "prost 0.7.0", + "prost-types 0.7.0", + "tempfile", + "which", ] [[package]] -name = "polars-time" -version = "0.1.1" -source = "git+https://github.com/pola-rs/polars?rev=a04786c#a04786c9d626e2f4fc5362213a660e8897559b38" +name = "prost-build" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5320c680de74ba083512704acb90fe00f28f79207286a848e730c45dd73ed6" dependencies = [ - "chrono", - "polars-arrow", - "polars-core", + "bytes", + "heck 0.4.0", + "itertools 0.10.5", + "lazy_static", + "log", + "multimap", + "petgraph 0.6.2", + "prettyplease", + "prost 0.11.5", + "prost-types 0.11.5", + "regex", + "syn", + "tempfile", + "which", ] [[package]] -name = "polars-utils" -version = "0.1.0" -source = "git+https://github.com/pola-rs/polars?rev=a04786c#a04786c9d626e2f4fc5362213a660e8897559b38" +name = "prost-derive" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "169a15f3008ecb5160cba7d37bcd690a7601b6d30cfb87a117d45e59d52af5d4" dependencies = [ - "parking_lot", + "anyhow", + "itertools 0.9.0", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "polling" -version = "2.2.0" +name = "prost-derive" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" +checksum = "c8842bad1a5419bca14eac663ba798f6bc19c413c2fdceb5f3ba3b0932d96720" dependencies = [ - "cfg-if 1.0.0", - "libc", - "log", - "wepoll-ffi", - "winapi", + "anyhow", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "ppv-lite86" -version = "0.2.16" +name = "prost-types" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "b518d7cdd93dab1d1122cf07fa9a60771836c668dde9d9e2a139f957f0d9f1bb" +dependencies = [ + "bytes", + "prost 0.7.0", +] [[package]] -name = "prettytable-rs" -version = "0.8.0" +name = "prost-types" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fd04b170004fa2daccf418a7f8253aaf033c27760b5f225889024cf66d7ac2e" +checksum = "017f79637768cde62820bc2d4fe0e45daaa027755c323ad077767c6c5f173091" dependencies = [ - "atty", - "csv", - "encode_unicode", - "lazy_static", - "term 0.5.2", - "unicode-width", + "bytes", + "prost 0.11.5", ] [[package]] -name = "proc-macro-hack" -version = "0.5.19" +name = "protobuf" +version = "2.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" +checksum = "cf7e6d18738ecd0902d30d1ad232c9125985a3422929b16c65517b38adc14f96" [[package]] -name = "proc-macro2" -version = "1.0.36" +name = "protobuf-build" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" +checksum = "6a7266835d38c38c73b091a24412de1f4b4382a5195fab1ec038161582b03b78" dependencies = [ - "unicode-xid", + "bitflags 1.3.2", + "grpcio-compiler", + "proc-macro2", + "prost-build 0.7.0", + "quote", + "syn", ] [[package]] name = "quote" -version = "1.0.15" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] @@ -2141,19 +1951,18 @@ dependencies = [ "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", - "rand_hc 0.2.0", + "rand_hc", ] [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", - "rand_core 0.6.3", - "rand_hc 0.3.1", + "rand_core 0.6.4", ] [[package]] @@ -2173,7 +1982,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -2187,11 +1996,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.8", ] [[package]] @@ -2203,107 +2012,83 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core 0.6.3", -] - -[[package]] -name = "rand_xoshiro" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9fcdd2e881d02f1d9390ae47ad8e5696a9e4be7b547a1da2afbc61973217004" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rayon" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg", - "crossbeam-deque 0.8.1", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.1" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ - "crossbeam-channel 0.5.2", - "crossbeam-deque 0.8.1", - "crossbeam-utils 0.8.6", - "lazy_static", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", "num_cpus", ] [[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "redox_syscall" -version = "0.2.10" +name = "rdkafka" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "bd7c5d6d17442bcb9f943aae96d67d98c6d36af60442dd5da62aaa7fcbb25c48" dependencies = [ - "bitflags", + "futures-channel", + "futures-util", + "libc", + "log", + "rdkafka-sys", + "serde", + "serde_derive", + "serde_json", + "slab", + "tokio", ] [[package]] -name = "redox_users" -version = "0.3.5" +name = "rdkafka-sys" +version = "4.3.0+1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" +checksum = "d222a401698c7f2010e3967353eae566d9934dcda49c29910da922414ab4e3f4" dependencies = [ - "getrandom 0.1.16", - "redox_syscall 0.1.57", - "rust-argon2", + "libc", + "libz-sys", + "num_enum", + "pkg-config", ] [[package]] -name = "redox_users" -version = "0.4.0" +name = "redox_syscall" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "getrandom 0.2.4", - "redox_syscall 0.2.10", + "bitflags 1.3.2", ] [[package]] name = "regex" -version = "1.5.4" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" - [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "remove_dir_all" @@ -2311,20 +2096,14 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi", + "winapi 0.3.9", ] -[[package]] -name = "replace_with" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a8614ee435691de62bcffcf4a66d91b3594bf1428a5722e79103249a095690" - [[package]] name = "reqwest" -version = "0.11.9" +version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f242f1488a539a79bac6dbe7c8609ae43b7914b7736210f239a37cccb32525" +checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" dependencies = [ "base64", "bytes", @@ -2338,10 +2117,10 @@ dependencies = [ "hyper-tls", "ipnet", "js-sys", - "lazy_static", "log", "mime", "native-tls", + "once_cell", "percent-encoding", "pin-project-lite", "serde", @@ -2349,6 +2128,7 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-native-tls", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -2357,79 +2137,73 @@ dependencies = [ ] [[package]] -name = "rosalloc" -version = "0.1.0" -source = "git+https://github.com/playxe/rosalloc#ac11a8684b5c1d8e043cf33a153de0fa9e9564e4" -dependencies = [ - "indexmap", - "libc", - "memx", - "parking_lot", - "thread_local", -] - -[[package]] -name = "rust-argon2" -version = "0.8.3" +name = "rskafka" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" +checksum = "47f86cd4975252119d94a5c202548a0ef037f7263b44be3130577bc4e4e9288a" dependencies = [ - "base64", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils 0.8.6", + "async-trait", + "bytes", + "crc32c", + "flate2", + "futures 0.3.25", + "integer-encoding", + "lz4", + "parking_lot 0.12.1", + "pin-project-lite", + "rand 0.8.5", + "snap", + "thiserror", + "time", + "tokio", + "tracing", + "zstd", ] -[[package]] -name = "rustc-demangle" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" - [[package]] name = "rustc-hash" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.4", + "semver", ] [[package]] name = "rustversion" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" + +[[package]] +name = "same-file" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "winapi", + "windows-sys 0.36.1", ] [[package]] @@ -2446,11 +2220,11 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "security-framework" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fed7948b6c68acbb6e20c334f55ad635dc0f75506963de4464289fbd3b051ac" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2459,9 +2233,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a57321bf8bc2362081b2599912d2961fe899c0efadf1b4b2f8d48b3e253bb96c" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -2469,36 +2243,24 @@ dependencies = [ [[package]] name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012" - -[[package]] -name = "semver-parser" -version = "0.7.0" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" [[package]] name = "serde" -version = "1.0.136" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "256b9932320c590e707b94576e3cc1f7c9024d0ee6612dfbcf1cb106cbe8e055" +dependencies = [ + "serde_derive", +] [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "b4eae9b04cbffdfd550eb462ed33bc6a1b68c935127d008b27444d08380f94e4" dependencies = [ "proc-macro2", "quote", @@ -2507,24 +2269,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.78" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ - "itoa 1.0.1", + "itoa", "ryu", "serde", ] -[[package]] -name = "serde_path_to_error" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd186dd4e1748b2798a2e86789dd77f5834ecda0bf15db76962e8e104bfc9bd" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2532,270 +2285,347 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.1", + "itoa", "ryu", "serde", ] [[package]] -name = "simdutf8" -version = "0.1.3" +name = "sha1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970da16e7c682fa90a261cf0724dee241c9f7831635ecc4e988ae8f3b505559" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] [[package]] -name = "sized-chunks" -version = "0.6.5" +name = "sha2" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "bitmaps", - "typenum", + "cfg-if", + "cpufeatures", + "digest", ] [[package]] -name = "slab" -version = "0.4.5" +name = "shlex" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" +checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" [[package]] -name = "slog" -version = "2.7.0" +name = "signal-hook-registry" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +dependencies = [ + "libc", +] [[package]] -name = "slog-async" -version = "2.7.0" +name = "slab" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "766c59b252e62a34651412870ff55d8c4e6d04df19b43eecb2703e417b097ffe" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" dependencies = [ - "crossbeam-channel 0.5.2", - "slog", - "take_mut", - "thread_local", + "autocfg", ] [[package]] -name = "slog-term" -version = "2.8.0" +name = "sled" +version = "0.34.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95c1e7e5aab61ced6006149ea772770b84a0d16ce0f7885def313e4829946d76" +checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" dependencies = [ - "atty", - "chrono", - "slog", - "term 0.7.0", - "thread_local", + "crc32fast", + "crossbeam-epoch", + "crossbeam-utils", + "fs2", + "fxhash", + "libc", + "log", + "parking_lot 0.11.2", ] [[package]] name = "smallvec" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "snap" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "socket2" -version = "0.4.3" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f82496b90c36d70af5fcd482edaa2e0bd16fade569de1330405fecbbdac736b" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] name = "spin" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511254be0c5bcf062b019a6c89c01a664aa359ded62f78aa72c6fc137c0590e5" +checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" dependencies = [ "lock_api", ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" +name = "subtle" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] -name = "streaming-iterator" -version = "0.1.5" +name = "syn" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "303235c177994a476226b80d076bd333b7b560fb05bd242a10609d11b07f81f5" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] [[package]] -name = "strength_reduce" -version = "0.2.3" +name = "tar" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ff2f71c82567c565ba4b3009a9350a96a7269eaa4001ebedae926230bc2254" +checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +dependencies = [ + "filetime", + "libc", + "xattr", +] [[package]] -name = "syn" -version = "1.0.86" +name = "tempfile" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", + "cfg-if", + "fastrand", + "libc", + "redox_syscall", + "remove_dir_all", + "winapi 0.3.9", ] [[package]] -name = "synchronoise" -version = "1.0.0" +name = "tensorflow" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d717ed0efc9d39ab3b642a096bc369a3e02a38a51c41845d7fe31bdad1d6eaeb" +checksum = "813259d8b797c862effd4fb000d9ce9bdcbaa02c2d8cfcd94ec7dc742842daa7" dependencies = [ - "crossbeam-queue 0.1.2", + "byteorder", + "crc 2.1.0", + "half 1.8.2", + "libc", + "num-complex 0.4.2", + "protobuf", + "rustversion", + "tensorflow-internal-macros", + "tensorflow-sys", ] [[package]] -name = "synstructure" -version = "0.12.6" +name = "tensorflow-internal-macros" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "4975c975b6d9c05a7cbf007ebc8e01e92e7e0907be9efcc74074857fc92ceb54" dependencies = [ "proc-macro2", "quote", "syn", - "unicode-xid", ] [[package]] -name = "take_mut" -version = "0.2.2" +name = "tensorflow-sys" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba8ac1e8d3e408e14b49e7164cda710c6c992eaa76750b126ad3c5225eb18cfd" +dependencies = [ + "curl", + "flate2", + "libc", + "pkg-config", + "semver", + "tar", + "zip", +] + +[[package]] +name = "thiserror" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +dependencies = [ + "thiserror-impl", +] [[package]] -name = "tempfile" -version = "3.3.0" +name = "thiserror-impl" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ - "cfg-if 1.0.0", - "fastrand", - "libc", - "redox_syscall 0.2.10", - "remove_dir_all", - "winapi", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "term" -version = "0.5.2" +name = "threadpool" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" dependencies = [ - "byteorder", - "dirs 1.0.5", - "winapi", + "num_cpus", ] [[package]] -name = "term" -version = "0.7.0" +name = "tiff" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471" dependencies = [ - "dirs-next", - "rustversion", - "winapi", + "flate2", + "jpeg-decoder", + "weezl", ] [[package]] -name = "thiserror" -version = "1.0.30" +name = "tikv-client" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "26904b386ca52ce25b3a620b397e6e4e93c4fd06d13c2c5936d9ac597f897263" dependencies = [ - "thiserror-impl", + "async-trait", + "derive-new", + "fail", + "futures 0.3.25", + "futures-timer", + "grpcio", + "lazy_static", + "log", + "prometheus", + "rand 0.8.5", + "regex", + "serde", + "serde_derive", + "thiserror", + "tikv-client-common", + "tikv-client-pd", + "tikv-client-proto", + "tikv-client-store", + "tokio", ] [[package]] -name = "thiserror-impl" -version = "1.0.30" +name = "tikv-client-common" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "72fc3bb3fbec1f2a3354d4bbe48501b23ea47b79da2ffaedeadcc8a6183188e4" dependencies = [ - "proc-macro2", - "quote", - "syn", + "futures 0.3.25", + "grpcio", + "lazy_static", + "log", + "regex", + "thiserror", + "tikv-client-proto", ] [[package]] -name = "thread_local" -version = "1.1.4" +name = "tikv-client-pd" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "f8cadef1633d4e7952d9a3a88211f03f71e9f90769a5b50c40b5eccc06408977" dependencies = [ - "once_cell", + "async-trait", + "futures 0.3.25", + "grpcio", + "log", + "tikv-client-common", + "tikv-client-proto", ] [[package]] -name = "threadfin" -version = "0.1.1" +name = "tikv-client-proto" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4b647a40fefe14511723ec89557e4469fb273f59dc13deccf48385091b45a1" +checksum = "f9707c63c11c19b87b6eb3df40c6103d0f1e2f06b53445bad91a8c9e06407d9b" dependencies = [ - "crossbeam-channel 0.5.2", - "num_cpus", - "once_cell", - "waker-fn", + "futures 0.3.25", + "grpcio", + "lazy_static", + "prost 0.7.0", + "prost-derive 0.7.0", + "protobuf", + "protobuf-build", ] [[package]] -name = "threadpool" -version = "1.8.1" +name = "tikv-client-store" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +checksum = "8ab348b60ef0a384985c488e25bf35721956b3b45332945f0841f9ac8a693586" dependencies = [ - "num_cpus", + "async-trait", + "derive-new", + "futures 0.3.25", + "grpcio", + "log", + "tikv-client-common", + "tikv-client-proto", ] [[package]] name = "time" -version = "0.1.43" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" dependencies = [ - "libc", - "winapi", + "itoa", + "serde", + "time-core", + "time-macros", ] [[package]] -name = "time" -version = "0.3.7" +name = "time-core" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" -dependencies = [ - "libc", - "num_threads", - "rand 0.8.4", - "time-macros", -] +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] name = "time-macros" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25eb0ca3468fc0acc11828786797f6ef9aa1555e4a211a60d64cc8e4d1be47d6" +checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +dependencies = [ + "time-core", +] [[package]] name = "tinyvec" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -2808,17 +2638,33 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.15.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838" +checksum = "d76ce4a75fb488c605c54bf610f221cea8b0dafb53333c1a67e8ee199dcd2ae3" dependencies = [ + "autocfg", "bytes", "libc", "memchr", "mio", "num_cpus", + "parking_lot 0.12.1", "pin-project-lite", - "winapi", + "signal-hook-registry", + "socket2", + "tokio-macros", + "winapi 0.3.9", +] + +[[package]] +name = "tokio-macros" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2831,44 +2677,95 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" +dependencies = [ + "bytes", + "educe", + "futures-core", + "futures-sink", + "pin-project", + "serde", + "serde_json", +] + +[[package]] +name = "tokio-stream" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-util" -version = "0.6.9" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", - "log", + "futures-util", + "hashbrown", "pin-project-lite", + "slab", "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +dependencies = [ + "serde", ] [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tracing-core" -version = "0.1.21" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -2879,86 +2776,54 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicode-bidi" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + +[[package]] +name = "unicode-ident" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - -[[package]] -name = "unsafe_unwrap" -version = "0.1.0" +name = "unicode-segmentation" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1230ec65f13e0f9b28d789da20d2d419511893ea9dac2c1f4ef67b8b14e5da80" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" [[package]] name = "url" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", ] -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.4", -] - -[[package]] -name = "value-bag" -version = "1.0.0-alpha.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f" -dependencies = [ - "ctor", - "version_check 0.9.4", -] - [[package]] name = "vcpkg" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - [[package]] name = "version_check" version = "0.9.4" @@ -2966,10 +2831,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "waker-fn" -version = "1.1.0" +name = "walkdir" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi 0.3.9", + "winapi-util", +] [[package]] name = "want" @@ -2989,29 +2859,29 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.79" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.79" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -3020,11 +2890,11 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.29" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -3032,9 +2902,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.79" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3042,9 +2912,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.79" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -3055,29 +2925,80 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.79" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "web-sys" -version = "0.3.56" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "wepoll-ffi" -version = "0.1.2" +name = "webrtc-sctp" +version = "0.5.0" +source = "git+https://github.com/webrtc-rs/sctp?rev=097f65dfbe3a076b085bfeb5e4bb8b5d5afc2c78#097f65dfbe3a076b085bfeb5e4bb8b5d5afc2c78" +dependencies = [ + "async-trait", + "bytes", + "crc 3.0.0", + "log", + "rand 0.8.5", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-util" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +checksum = "8b3050262ce1f70599ca1a12f446a2e73bae80a3152baae7fca4a9a26b8f0c0f" dependencies = [ + "async-trait", + "bitflags 1.3.2", + "bytes", "cc", + "ipnet", + "lazy_static", + "libc", + "log", + "nix", + "parking_lot 0.12.1", + "rand 0.8.5", + "thiserror", + "tokio", + "winapi 0.3.9", +] + +[[package]] +name = "weezl" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" + +[[package]] +name = "which" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +dependencies = [ + "either", + "libc", + "once_cell", ] +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + [[package]] name = "winapi" version = "0.3.9" @@ -3088,23 +3009,196 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + [[package]] name = "winreg" -version = "0.7.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "xattr" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +dependencies = [ + "libc", +] + +[[package]] +name = "zip" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf225bcf73bb52cbb496e70475c7bd7a3f769df699c0020f6c7bd9a96dcf0b8d" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.10.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4a6bd64f22b5e3e94b4e238669ff9f10815c27a5180108b849d24174a83847" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "4.1.6+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b61c51bb270702d6167b8ce67340d2754b088d0c091b06e593aa772c3ee9bb" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "1.6.3+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc49afa5c8d634e75761feda8c592051e7eeb4683ba827211eb0d731d3402ea8" +dependencies = [ + "cc", + "libc", ] diff --git a/arc-sys/dataflow/Cargo.toml b/arc-sys/dataflow/Cargo.toml new file mode 100644 index 000000000..187ce38e0 --- /dev/null +++ b/arc-sys/dataflow/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = "dataflow" +version = "0.1.0" +edition = "2021" + +[lib] +name = "dataflow" +path = "src/lib.rs" + +[features] +ml = ["tensorflow", "image"] +tikv = ["tikv-client"] +thread-pinning = ["hwloc", "libc"] + +[dependencies] +macros = { path = "./macros" } +futures = { version = "0.3.25" } +num_cpus = { version = "1.15.0" } +serde = { version = "1.0.152", features = ["derive", "rc"] } +serde_json = { version = "1.0.91" } +tokio = { version = "1.24.2", features = ["full", "tracing"] } +tokio-serde = { version = "0.8.0", features = ["json"] } +tokio-util = { version = "0.7.4", features = ["full"] } +derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "deref", "deref_mut", "constructor", "as_ref"] } +serde_derive = { version = "1.0.152" } +tokio-stream = { version = "0.1.11" } +time = { version = "0.3.17", features = ["serde"] } +rdkafka = { version = "0.29.0" } +num = { version = "0.4.0" } +num-traits = { version = "0.2.15" } +arrayvec = { version = "0.7.2" } +cfg-if = { version = "1.0.0" } +hexf = { version = "0.2.1" } + +hwloc = { version = "0.5.0", optional = true } +libc = { version = "0.2.139" , optional = true } + +tikv-client = { version = "0.1.0", optional = true } +sled = { version = "0.34.7" } + +tensorflow = { version = "0.19.1", features = ["eager"], optional = true } +image = { version = "0.24.5", optional = true } +csv = { version = "1.1.6" } +tokio-rustls = { version = "0.23.4" } diff --git a/arc-sys/dataflow/examples/template.rs b/arc-sys/dataflow/examples/template.rs new file mode 100644 index 000000000..f763f117b --- /dev/null +++ b/arc-sys/dataflow/examples/template.rs @@ -0,0 +1,280 @@ +use dataflow::prelude::*; + +use custom_operator::CustomOperator; + +fn main() { + let mut args = std::env::args(); + let _ = args.next(); + let kind = args.next(); + let db = Database::local("hello.txt"); + match kind.unwrap().as_str() { + "worker0" => worker0(db), + "worker1" => worker1(db), + "worker2" => worker2(db), + "worker3" => worker3(db), + _ => panic!("Unknown arg, expected main[0-3]"), + } +} + +fn worker0(db: Database) { + Runtime::new() + .spawn(instance0(db.clone()), 0) + .spawn(instance0(db.clone()), 1); +} + +fn worker1(db: Database) { + Runtime::new() + .spawn(instance1(8080, db.clone()), 0) + .spawn(instance1(8081, db.clone()), 1); +} + +fn worker2(db: Database) { + Runtime::new() + .spawn(instance2(8082, db.clone()), 0) + .spawn(instance2(8083, db.clone()), 1); +} + +fn worker3(db: Database) { + Runtime::new() + .spawn(instance3(db.clone()), 0) + .spawn(instance3(db.clone()), 1); +} + +// kafka-source -> filter -> map -> apply() -> group_by +async fn instance0(db: Database) { + let mut worker = WorkerSource::new(); + let mut source = KafkaSource::::new("127.0.0.1:9093", "temperature", 0..10); + let mut sink = ShuffleSink::new(["127.0.0.1:8000", "127.0.0.1:8001"], key_udf).await; + + let (param0, state0) = Filter::new(filter_udf); + let (param1, state1) = Map::new(map_udf); + let (param2, state2) = CustomOperator::new(agg_udf); + let (param3, state3) = Apply::new(); + + let param = (param0, param1, param2, param3); + let mut states = State::new("instance0", db, (state0, state1, state2, state3)); + + loop { + select! { + event = source.recv() => match event { + Some((key, mut batch)) => { + let state = states.get(key); + let mut iter0 = Filter::process(&mut batch, param.0, state.0); + let mut iter1 = Map::process(&mut iter0, param.1, state.1); + let mut iter2 = CustomOperator::process(param.2, state.2); + let mut iter3 = Apply::process(&mut iter1, &mut iter2, param.3, state.3); + sink.send(&mut iter3).await; + state.3 = iter3.state(); + state.2 = iter2.state(); + state.1 = iter1.state(); + state.0 = iter0.state(); + } + None => break, + }, + event = worker.recv() => match event { + Some(PipelineEvent::Epoch(id)) => { + states.persist().await; + sink.send_epoch(id).await; + }, + None => break, + } + } + } +} + +// group-by -> filter -> scan -> apply() -> group_by +async fn instance1(port: u16, db: Database) { + let mut source = ShuffleSource::new(port, 2, key_udf).await; + let mut sink = ShuffleSink::new(["127.0.0.1:8002", "127.0.0.1:8003"], key_udf).await; + + let (param0, state0) = Filter::new(filter_udf); + let (param1, state1) = Scan::new(agg_udf, 0); + let (param2, state2) = CustomOperator::new(agg_udf); + let (param3, state3) = Apply::new(); + + let params = (param0, param1, param2, param3); + let mut states = State::new("instance1", db, (state0, state1, state2, state3)); + + while let Some((key, mut batch)) = source.recv().await { + let state = states.get(key); + let mut iter0 = Filter::process(&mut batch, params.0, state.0); + let mut iter1 = Scan::process(&mut iter0, params.1, state.1); + let mut iter2 = CustomOperator::process(params.2, state.2); + let mut iter3 = Apply::process(&mut iter1, &mut iter2, params.3, state.3); + sink.send(&mut iter3).await; + state.3 = iter3.state(); + state.2 = iter2.state(); + state.1 = iter1.state(); + state.0 = iter0.state(); + } +} + +// group-by -> filter -> scan -> apply() -> kafka-sink +async fn instance2(port: u16, db: Database) { + let mut source = ShuffleSource::new(port, 10, key_udf).await; + let mut sink = KafkaSink::new("127.0.0.1:9093", "output", key_udf); + + let (param0, state0) = Filter::new(filter_udf); + let (param1, state1) = Scan::new(agg_udf, 0); + let (param2, state2) = CustomOperator::new(agg_udf); + let (param3, state3) = Apply::new(); + + let params = (param0, param1, param2, param3); + let mut states = State::new("instance1", db, (state0, state1, state2, state3)); + + while let Some((key, mut input)) = source.recv().await { + let state = states.get(key); + let mut iter0 = Filter::process(&mut input, params.0, state.0); + let mut iter1 = Scan::process(&mut iter0, params.1, state.1); + let mut iter2 = CustomOperator::process(params.2, state.2); + let mut iter3 = Apply::process(&mut iter1, &mut iter2, params.3, state.3); + sink.send(&mut iter3).await; + state.3 = iter3.state(); + state.2 = iter2.state(); + state.1 = iter1.state(); + state.0 = iter0.state(); + } +} + +// kafka-source -> filter -+ +// v +// union -> aggregate -> kafka-sink +// ^ +// kafka-source -> map ----+ +async fn instance3(db: Database) { + let mut source0 = KafkaSource::::new("127.0.0.1:9093", "people", 0..10); + let mut source1 = KafkaSource::::new("127.0.0.1:9093", "accounts", 0..10); + let mut sink = KafkaSink::new("127.0.0.1:9093", "output", key_udf); + + let (param0, state0) = Filter::new(filter_udf); + let (param1, state1) = Union::new(); + + let param = (param0, param1); + let mut states = State::new("instance3", db, (state0, state1)); + + loop { + select! { + Some((key, mut input)) = source0.recv() => { + let state = states.get(key); + let mut iter0 = Filter::process(&mut input, param.0, state.0); + let mut iter1 = Union::process(&mut iter0, iter::empty(), param.1, state.1); + sink.send(&mut iter1).await; + state.1 = iter1.state(); + state.0 = iter0.state(); + }, + Some((key, mut input)) = source1.recv() => { + let state = states.get(key); + let mut iter0 = Union::process(&mut input, iter::empty(), param.1, state.1); + sink.send(&mut iter0).await; + state.1 = iter0.state(); + }, + else => break + } + } +} + +// UDFs + +fn key_udf(x: i32) -> i32 { + x % 2 +} + +fn map_udf(x: i32) -> i32 { + x + 1 +} + +fn filter_udf(x: i32) -> bool { + x % 2 == 0 +} + +fn agg_udf(x: i32, agg: i32) -> i32 { + x + agg +} + +// UDOs + +mod custom_operator { + use dataflow::prelude::*; + + use serde::Deserialize; + use serde::Serialize; + + pub struct CustomOperator { + param: Param, + state: State, + } + + impl CustomOperator { + pub const fn new(fun: fn(I, I) -> O) -> (Param, State) { + (Param { fun }, State::Recv0) + } + } + + impl CustomOperator { + pub const fn process(param: Param, state: State) -> Self { + Self { param, state } + } + } + + #[derive(Debug, Clone, Copy, Serialize, Deserialize)] + pub enum State { + Recv0, + Recv1 { input0: I }, + Send0 { input0: I, input1: I, output0: O }, + Send1 { output1: O }, + } + + #[derive(Copy, Clone)] + pub struct Param { + fun: fn(I, I) -> O, + } + + impl Iteratee for CustomOperator { + type Item = I; + fn feed(&mut self, input: Self::Item) { + match self.state.clone() { + State::Recv0 => { + self.state = State::Recv1 { input0: input }; + } + State::Recv1 { input0 } => { + self.state = State::Send0 { + input0: input0.clone(), + input1: input.clone(), + output0: (self.param.fun)(input0, input), + }; + } + _ => {} + } + } + } + + impl Iterator for CustomOperator { + type Item = O; + + fn next(&mut self) -> Option { + match self.state.clone() { + State::Send0 { + input0, + input1, + output0, + } => { + let output1 = (self.param.fun)(input0.clone(), input1.clone()); + self.state = State::Send1 { output1 }; + Some(output0) + } + State::Send1 { output1 } => { + self.state = State::Recv0; + Some(output1) + } + _ => None, + } + } + } + + impl Operator for CustomOperator { + type S = State; + fn state(self) -> Self::S { + self.state + } + } +} diff --git a/arc-runtime/macros/Cargo.lock b/arc-sys/dataflow/macros/Cargo.lock similarity index 100% rename from arc-runtime/macros/Cargo.lock rename to arc-sys/dataflow/macros/Cargo.lock diff --git a/arc-runtime/macros/Cargo.toml b/arc-sys/dataflow/macros/Cargo.toml similarity index 50% rename from arc-runtime/macros/Cargo.toml rename to arc-sys/dataflow/macros/Cargo.toml index 88a2fb5cb..c3d18a4d0 100644 --- a/arc-runtime/macros/Cargo.toml +++ b/arc-sys/dataflow/macros/Cargo.toml @@ -8,6 +8,6 @@ edition = "2018" proc-macro = true [dependencies] -quote = { version = "1.0.8" } -syn = { version = "1.0.58", features = ["full", "visit-mut"] } -proc-macro2 = { version = "1.0.24" } +quote = { version = "1.0.23" } +syn = { version = "1.0.107", features = ["full", "visit-mut"] } +proc-macro2 = { version = "1.0.50" } diff --git a/arc-sys/dataflow/macros/src/lib.rs b/arc-sys/dataflow/macros/src/lib.rs new file mode 100644 index 000000000..4b1d89434 --- /dev/null +++ b/arc-sys/dataflow/macros/src/lib.rs @@ -0,0 +1,247 @@ +#![feature(proc_macro_span)] + +use proc_macro::TokenStream; + +mod proc_macro_derives; +mod proc_macro_attrs { + pub mod rewrite { + pub mod enums; + pub mod externs; + pub mod functions; + pub mod main; + pub mod structs; + } + pub mod export { + pub mod impls; + } +} +mod proc_macros; +pub(crate) mod utils; + +#[proc_macro_derive(NoTrace)] +pub fn derive_notrace(input: TokenStream) -> TokenStream { + proc_macro_derives::derive_notrace(syn::parse_macro_input!(input as syn::DeriveInput)) +} + +#[proc_macro_derive(Trace)] +pub fn derive_trace(input: TokenStream) -> TokenStream { + proc_macro_derives::derive_trace(syn::parse_macro_input!(input as syn::DeriveInput)) +} + +#[proc_macro_derive(Send)] +pub fn derive_send(input: TokenStream) -> TokenStream { + proc_macro_derives::derive_send(syn::parse_macro_input!(input as syn::DeriveInput)) +} + +#[proc_macro_derive(Sync)] +pub fn derive_sync(input: TokenStream) -> TokenStream { + proc_macro_derives::derive_sync(syn::parse_macro_input!(input as syn::DeriveInput)) +} + +#[proc_macro_derive(Unpin)] +pub fn derive_unpin(input: TokenStream) -> TokenStream { + proc_macro_derives::derive_unpin(syn::parse_macro_input!(input as syn::DeriveInput)) +} + +#[proc_macro_derive(NoSerde)] +pub fn derive_noserde(input: TokenStream) -> TokenStream { + proc_macro_derives::derive_noserde(syn::parse_macro_input!(input as syn::DeriveInput)) +} + +#[proc_macro_derive(NoDebug)] +pub fn derive_nodebug(input: TokenStream) -> TokenStream { + proc_macro_derives::derive_nodebug(syn::parse_macro_input!(input as syn::DeriveInput)) +} + +#[proc_macro_derive(Accesso)] +pub fn derive_accessor(input: TokenStream) -> TokenStream { + proc_macro_derives::derive_accessor(syn::parse_macro_input!(input as syn::DeriveInput)) +} + +#[proc_macro] +pub fn call(input: TokenStream) -> TokenStream { + proc_macros::call(syn::parse_macro_input!(input as syn::Expr)) +} + +#[proc_macro] +pub fn call_async(input: TokenStream) -> TokenStream { + proc_macros::call_async(syn::parse_macro_input!(input as syn::Expr)) +} + +#[proc_macro] +pub fn call_indirect(input: TokenStream) -> TokenStream { + proc_macros::call_indirect(syn::parse_macro_input!(input as syn::Expr)) +} + +/// Enwraps a value into an enum-variant. +/// +/// ``` +/// use dataflow::prelude::*; +/// mod foo { +/// use dataflow::prelude::*; +/// #[rewrite] +/// pub enum Bar { +/// Baz(i32), +/// Qux(i32) +/// } +/// } +/// let x = enwrap!(foo::Bar::Baz, 5); +/// ``` +#[proc_macro] +pub fn enwrap(input: TokenStream) -> TokenStream { + proc_macros::enwrap(input) +} + +/// Returns `true` if enum is a certain variant, else `false`. +/// +/// ``` +/// use dataflow::prelude::*; +/// mod foo { +/// use dataflow::prelude::*; +/// #[rewrite] +/// pub enum Bar { +/// Baz(i32), +/// Qux(i32) +/// } +/// } +/// +/// let x = enwrap!(foo::Bar::Baz, 5); +/// assert!(is!(foo::Bar::Baz, x)); +/// ``` +#[proc_macro] +pub fn is(input: TokenStream) -> TokenStream { + proc_macros::is(input) +} + +/// Unwraps a value out of an enum-variant. +/// +/// ``` +/// use dataflow::prelude::*; +/// mod foo { +/// use dataflow::prelude::*; +/// #[rewrite] +/// pub enum Bar { +/// Baz(i32), +/// Qux(i32) +/// } +/// } +/// +/// let x = enwrap!(foo::Bar::Baz, 5); +/// let y = unwrap!(foo::Bar::Baz, x); +/// ``` +#[proc_macro] +pub fn unwrap(input: TokenStream) -> TokenStream { + proc_macros::unwrap(input) +} + +/// Constructs a struct. +/// +/// ``` +/// use dataflow::prelude::*; +/// mod foo { +/// use dataflow::prelude::*; +/// #[rewrite] +/// pub struct Bar { +/// x: i32, +/// y: i32 +/// } +/// } +/// let x = new!(foo::Bar { x: i32, y: i32 }); +/// ``` +#[proc_macro] +pub fn new(input: TokenStream) -> TokenStream { + proc_macros::new(input) +} + +/// Get the value of a variable. +/// +/// ``` +/// use dataflow::prelude::*; +/// let a = 5; +/// let b = val!(a); +/// ``` +#[proc_macro] +pub fn val(input: TokenStream) -> TokenStream { + proc_macros::val(input) +} + +/// Access a struct's field. +/// +/// ``` +/// use dataflow::prelude::*; +/// #[rewrite] +/// pub struct Bar { +/// pub x: i32, +/// pub y: i32 +/// } +/// #[rewrite(main)] +/// fn test() { +/// let a = new!(Bar { x: 0, y: 1 }); +/// let b = access!(a, x); +/// } +/// ``` +#[proc_macro] +pub fn access(input: TokenStream) -> TokenStream { + proc_macros::access(input) +} + +#[proc_macro] +pub fn get(input: TokenStream) -> TokenStream { + proc_macros::get(input) +} + +#[proc_macro] +pub fn label(input: TokenStream) -> TokenStream { + proc_macros::label(input) +} + +#[proc_macro] +#[allow(non_snake_case)] +pub fn Record(input: TokenStream) -> TokenStream { + proc_macros::Record(input) +} + +#[proc_macro] +#[allow(non_snake_case)] +pub fn Enum(input: TokenStream) -> TokenStream { + proc_macros::Enum(input) +} + +#[proc_macro] +pub fn record(input: TokenStream) -> TokenStream { + proc_macros::record(input) +} + +#[proc_macro] +pub fn vector(input: TokenStream) -> TokenStream { + proc_macros::vector(input) +} + +#[proc_macro_attribute] +pub fn rewrite(attr: TokenStream, input: TokenStream) -> TokenStream { + let attr = syn::parse_macro_input!(attr as syn::AttributeArgs); + let item = syn::parse_macro_input!(input as syn::Item); + let metas = utils::get_metas(&attr); + match item { + syn::Item::Enum(item) => proc_macro_attrs::rewrite::enums::rewrite(attr, item), + syn::Item::Struct(item) => proc_macro_attrs::rewrite::structs::rewrite(attr, item), + syn::Item::Fn(item) if utils::has_meta_name_val("unmangled", &metas) => { + proc_macro_attrs::rewrite::externs::rewrite(attr, item) + } + syn::Item::Fn(item) if utils::has_meta_key("main", &metas) => { + proc_macro_attrs::rewrite::main::rewrite(attr, item) + } + syn::Item::Fn(item) => proc_macro_attrs::rewrite::functions::rewrite(attr, item), + _ => panic!("#[rewrite] expects an enum, struct, function, impl, or module as input."), + } +} + +#[proc_macro_attribute] +pub fn export(attr: TokenStream, input: TokenStream) -> TokenStream { + let attr = syn::parse_macro_input!(attr as syn::AttributeArgs); + let item = syn::parse_macro_input!(input as syn::Item); + match item { + syn::Item::Impl(item) => proc_macro_attrs::export::impls::export(attr, item), + _ => panic!("#[export] expects a function or impl as input."), + } +} diff --git a/arc-sys/dataflow/macros/src/proc_macro_attrs/export/functions.rs b/arc-sys/dataflow/macros/src/proc_macro_attrs/export/functions.rs new file mode 100644 index 000000000..7a728692d --- /dev/null +++ b/arc-sys/dataflow/macros/src/proc_macro_attrs/export/functions.rs @@ -0,0 +1,33 @@ +use proc_macro as pm; +use quote::quote; + +pub(crate) fn export(_attr: syn::AttributeArgs, item: syn::ItemFn) -> pm::TokenStream { + let mut inputs = item.sig.inputs.clone().into_iter().collect::>(); + let fn_name = &item.sig.ident; + let name = crate::utils::new_id(format!("export_{}", fn_name)); + let output = &item.sig.output; + let (impl_generics, _, where_clause) = item.sig.generics.split_for_impl(); + let (ids, tys): (Vec<_>, Vec<_>) = inputs + .iter() + .map(|i| match i { + syn::FnArg::Receiver(_) => unreachable!(), + syn::FnArg::Typed(i) => (&i.pat, &i.ty), + }) + .unzip(); + if item.sig.asyncness.is_some() { + quote! { + #item + pub async fn #name #impl_generics ((#(#ids,)*):(#(#tys,)*)) #output #where_clause { + #fn_name(#(#ids,)*).await + } + } + } else { + quote! { + #item + pub fn #name #impl_generics ((#(#ids,)*):(#(#tys,)*)) #output #where_clause { + #fn_name(#(#ids,)*) + } + } + } + .into() +} diff --git a/arc-sys/dataflow/macros/src/proc_macro_attrs/export/impls.rs b/arc-sys/dataflow/macros/src/proc_macro_attrs/export/impls.rs new file mode 100644 index 000000000..832937fae --- /dev/null +++ b/arc-sys/dataflow/macros/src/proc_macro_attrs/export/impls.rs @@ -0,0 +1,67 @@ +use proc_macro as pm; +use quote::quote; + +pub(crate) fn export(_attr: syn::AttributeArgs, item: syn::ItemImpl) -> pm::TokenStream { + let mut functions = Vec::new(); + let ty_name = if let syn::Type::Path(x) = item.self_ty.as_ref() { + &x.path.segments.last().unwrap().ident + } else { + unreachable!("Found non-path type in impl") + }; + let (_, ty_generics, _) = item.generics.split_for_impl(); + let impl_generics = &item.generics.params; + let where_clause = &item.generics.where_clause; + for item in &item.items { + if let syn::ImplItem::Method(item) = item { + let mut inputs = item.sig.inputs.clone().into_iter().collect::>(); + let method_name = &item.sig.ident; + let name = crate::utils::new_id(format!("{}_{}", ty_name, method_name)); + let output = &item.sig.output; + // Replace receiver with parameter + if let Some(syn::FnArg::Receiver(r)) = inputs.first() { + assert!(r.reference.is_none(), "Found reference to receiver"); + inputs[0] = syn::parse_quote!(self_param: #ty_name #ty_generics); + } + let (ids, tys): (Vec<_>, Vec<_>) = inputs + .iter() + .map(|i| match i { + syn::FnArg::Receiver(_) => unreachable!(), + syn::FnArg::Typed(i) => (&i.pat, &i.ty), + }) + .unzip(); + // Merge generics and predicates + let generics = match (&item.sig.generics.params, impl_generics) { + (gs0, gs1) if !gs0.is_empty() && !gs1.is_empty() => quote!(<#gs0, #gs1>), + (gs0, _) if !gs0.is_empty() => quote!(<#gs0>), + (_, gs1) if !gs1.is_empty() => quote!(<#gs1>), + _ => quote!(), + }; + let where_clause = match (where_clause, &item.sig.generics.where_clause) { + (Some(w0), Some(w1)) => quote!(where #w0, #w1), + (Some(w), None) | (None, Some(w)) => quote!(where #w), + (None, None) => quote!(), + }; + // Construct wrapper + let item = if item.sig.asyncness.is_some() { + quote! { + pub async fn #name #generics ((#(#ids,)*):(#(#tys,)*)) #output #where_clause { + #ty_name::#method_name(#(#ids,)*).await + } + } + } else { + quote! { + pub fn #name #generics (#(#ids: #tys,)*) #output #where_clause { + #ty_name::#method_name(#(#ids,)*) + } + } + }; + functions.push(item); + } + } + + quote::quote!( + #item + #(#functions)* + ) + .into() +} diff --git a/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/enums.rs b/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/enums.rs new file mode 100644 index 000000000..c02c61fe6 --- /dev/null +++ b/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/enums.rs @@ -0,0 +1,25 @@ +use proc_macro as pm; +use quote::quote; + +#[allow(unused)] +pub(crate) fn rewrite(attr: syn::AttributeArgs, mut item: syn::ItemEnum) -> pm::TokenStream { + item.vis = syn::parse_quote!(pub); + item.generics.params.iter_mut().for_each(|g| { + if let syn::GenericParam::Type(t) = g { + t.bounds.push(syn::parse_quote!(Data)) + } + }); + + let (impl_generics, type_generics, where_clause) = item.generics.split_for_impl(); + + let variant_id = item.variants.iter().map(|v| &v.ident).collect::>(); + + quote!( + use dataflow::prelude::*; + + #[derive(Clone, Debug, Unpin, Serialize, Deserialize)] + #[serde(bound = "")] + #item + ) + .into() +} diff --git a/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/externs.rs b/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/externs.rs new file mode 100644 index 000000000..fbf57656c --- /dev/null +++ b/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/externs.rs @@ -0,0 +1,19 @@ +use proc_macro as pm; + +pub(crate) fn rewrite(attr: syn::AttributeArgs, mut item: syn::ItemFn) -> pm::TokenStream { + let unmangled: syn::Path = crate::utils::get_attr_val("unmangled", &attr); + let ids = item.sig.inputs.iter().map(|arg| { + if let syn::FnArg::Typed(p) = arg { + p.pat.as_ref() + } else { + unreachable!() + } + }); + item.sig.abi = None; + if item.sig.asyncness.is_some() { + item.block = syn::parse_quote!({ #unmangled(#(#ids),*).await }); + } else { + item.block = syn::parse_quote!({ #unmangled(#(#ids),*) }); + } + quote::quote!(#item).into() +} diff --git a/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/functions.rs b/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/functions.rs new file mode 100644 index 000000000..52305df82 --- /dev/null +++ b/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/functions.rs @@ -0,0 +1,10 @@ +use proc_macro as pm; + +pub(crate) fn rewrite(_attr: syn::AttributeArgs, mut item: syn::ItemFn) -> pm::TokenStream { + item.sig.generics.params.iter_mut().for_each(|p| { + if let syn::GenericParam::Type(p) = p { + p.bounds.push(syn::parse_quote!(Data)); + } + }); + quote::quote!(#item).into() +} diff --git a/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/main.rs b/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/main.rs new file mode 100644 index 000000000..f1dec3927 --- /dev/null +++ b/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/main.rs @@ -0,0 +1,5 @@ +use proc_macro as pm; + +pub(crate) fn rewrite(_attr: syn::AttributeArgs, _item: syn::ItemFn) -> pm::TokenStream { + todo!() +} diff --git a/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/structs.rs b/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/structs.rs new file mode 100644 index 000000000..8bacb24fe --- /dev/null +++ b/arc-sys/dataflow/macros/src/proc_macro_attrs/rewrite/structs.rs @@ -0,0 +1,51 @@ +use proc_macro as pm; +use quote::quote; + +#[allow(unused)] +pub(crate) fn rewrite(attr: syn::AttributeArgs, mut item: syn::ItemStruct) -> pm::TokenStream { + item.vis = syn::parse_quote!(pub); + item.fields.iter_mut().for_each(|field| { + field.vis = syn::parse_quote!(pub); + }); + item.generics.params.iter_mut().for_each(|g| { + if let syn::GenericParam::Type(t) = g { + t.bounds.push(syn::parse_quote!(Data)) + } + }); + let (impl_generics, type_generics, where_clause) = item.generics.split_for_impl(); + + let wrapper_id = item.ident.clone(); + item.ident = crate::utils::new_id(format!("_{}", wrapper_id)); + let id = &item.ident; + + let field_id = item.fields.iter().map(|f| &f.ident).collect::>(); + + let (inner_type, inner_expr) = + if crate::utils::has_meta_key("compact", &crate::utils::get_metas(&attr)) { + (quote::quote!(#id #type_generics), quote::quote!(data)) + } else { + ( + quote::quote!(Rc<#id #type_generics>), + quote::quote!(Rc::new(data)), + ) + }; + + quote!( + use dataflow::prelude::*; + + #[derive(Clone, Debug, Unpin, From, Deref, Serialize, Deserialize)] + #[serde(bound = "")] + pub struct #wrapper_id #impl_generics(pub #inner_type) #where_clause; + + impl #impl_generics #wrapper_id #type_generics #where_clause { + fn new(data: #id #type_generics) -> Self { + Self(#inner_expr) + } + } + + #[derive(Clone, Debug, Unpin, Serialize, Deserialize)] + #[serde(bound = "")] + #item + ) + .into() +} diff --git a/arc-sys/dataflow/macros/src/proc_macro_derives.rs b/arc-sys/dataflow/macros/src/proc_macro_derives.rs new file mode 100644 index 000000000..a8df19204 --- /dev/null +++ b/arc-sys/dataflow/macros/src/proc_macro_derives.rs @@ -0,0 +1,256 @@ +use proc_macro::TokenStream; + +pub fn derive_notrace(input: syn::DeriveInput) -> TokenStream { + let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + let name = &input.ident; + quote::quote!( + impl #impl_generics Trace for #name #type_generics #where_clause { + fn trace(&self, heap: Heap) { } + fn root(&self, heap: Heap) { } + fn unroot(&self, heap: Heap) { } + fn copy(&self, heap: Heap) -> Self { *self } + } + ) + .into() +} + +pub fn derive_trace(input: syn::DeriveInput) -> TokenStream { + let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + let name = &input.ident; + match &input.data { + syn::Data::Struct(data) => { + let field = data + .fields + .iter() + .enumerate() + .map(|(index, field)| { + field + .ident + .as_ref() + .map(|ident| quote::quote!(#ident)) + .unwrap_or_else(|| { + let index = syn::Index::from(index); + quote::quote!(#index) + }) + }) + .collect::>(); + let copy = match &data.fields { + syn::Fields::Named(_) => { + quote::quote!(Self {#(#field: self.#field.copy(heap)),*} ) + } + syn::Fields::Unnamed(_) => { + quote::quote!(Self(#(self.#field.copy(heap)),*)) + } + syn::Fields::Unit => { + quote::quote!(Self) + } + }; + quote::quote!( + impl #impl_generics Trace for #name #type_generics #where_clause { + fn trace(&self, heap: Heap) { + #(self.#field.trace(heap));* + } + fn root(&self, heap: Heap) { + #(self.#field.root(heap));* + } + fn unroot(&self, heap: Heap) { + #(self.#field.unroot(heap));* + } + fn copy(&self, heap: Heap) -> Self { + #copy + } + } + ) + .into() + } + syn::Data::Enum(data) => { + let variant = data.variants.iter().map(|v| &v.ident).collect::>(); + let field = data + .variants + .iter() + .map(|v| { + v.fields + .iter() + .enumerate() + .map(|(i, _)| crate::utils::new_id(format!("_{}", i))) + .collect::>() + }) + .collect::>(); + let pattern = field + .iter() + .map(|f| { + if f.is_empty() { + quote::quote!() + } else { + quote::quote!((#(#f),*)) + } + }) + .collect::>(); + let copy = field + .iter() + .map(|f| { + if f.is_empty() { + quote::quote!() + } else { + quote::quote!((#(#f.copy(heap)),*)) + } + }) + .collect::>(); + quote::quote!( + impl #impl_generics Trace for #name #type_generics #where_clause { + fn trace(&self, heap: Heap) { + match self { + #(Self::#variant #pattern => { #(#field.trace(heap));* },)* + } + } + fn root(&self, heap: Heap) { + match self { + #(Self::#variant #pattern => {#(#field.trace(heap));*},)* + } + } + fn unroot(&self, heap: Heap) { + match self { + #(Self::#variant #pattern => {#(#field.trace(heap));*},)* + } + } + fn copy(&self, heap: Heap) -> Self { + match self { + #(Self::#variant #pattern => Self::#variant #copy),* + } + } + } + ) + .into() + } + syn::Data::Union(_) => unreachable!(), + } +} + +pub fn derive_nodebug(input: syn::DeriveInput) -> TokenStream { + let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + let name = &input.ident; + quote::quote!( + impl #impl_generics std::fmt::Debug for #name #type_generics #where_clause { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", stringify!(#name)) + } + } + ) + .into() +} + +pub fn derive_send(input: syn::DeriveInput) -> TokenStream { + let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + let name = &input.ident; + quote::quote!(unsafe impl #impl_generics Send for #name #type_generics #where_clause {}).into() +} + +pub fn derive_sync(input: syn::DeriveInput) -> TokenStream { + let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + let name = &input.ident; + quote::quote!(unsafe impl #impl_generics Sync for #name #type_generics #where_clause {}).into() +} + +pub fn derive_unpin(input: syn::DeriveInput) -> TokenStream { + let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + let name = &input.ident; + quote::quote!(impl #impl_generics Unpin for #name #type_generics #where_clause {}).into() +} + +pub fn derive_noserde(input: syn::DeriveInput) -> TokenStream { + let mut deserialize_generics = input.generics.clone(); + deserialize_generics.params.push(syn::parse_quote!('de)); + let (serialize_impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + let (deserialize_impl_generics, _, _) = deserialize_generics.split_for_impl(); + let name = &input.ident; + quote::quote!( + impl #serialize_impl_generics Serialize for #name #type_generics #where_clause { + fn serialize(&self, _: S) -> Result { + panic!("Attempted to serialize an unserializable type {}", stringify!(#name)) + } + } + + impl #deserialize_impl_generics Deserialize<'de> for #name #type_generics #where_clause { + fn deserialize>(_: D) -> Result { + panic!("Attempted to deserialize an undeserializable type {}", stringify!(#name)) + } + } + ) + .into() +} + +pub fn derive_accessor(input: syn::DeriveInput) -> TokenStream { + let mut impls = Vec::new(); + match input.data { + syn::Data::Struct(data) => { + let name = &input.ident; + let mut ids = Vec::new(); + let mut labels = Vec::new(); + let mut types = Vec::new(); + for data in data.fields.iter() { + let t = &data.ty; + let id = &data.ident; + let chars = crate::utils::chars(id.as_ref().unwrap()); + ids.push(id.clone()); + labels.push(chars.clone()); + types.push(t.clone()); + let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + impls.push(quote::quote!( + impl #impl_generics Accessor<#chars, #t> for #name #type_generics #where_clause { + fn get(self) -> #t { + self.#id + } + } + )); + } + impls.push(quote::quote!( + impl Transform for #name where T: #(Accessor<#labels, #types>+)* Copy + Clone { + fn transform(other: T) -> Self { + Self { + #(#ids: get!(other, #ids),)* + } + } + } + )); + } + syn::Data::Enum(data) => { + let name = &input.ident; + let mut ids = Vec::new(); + let mut labels = Vec::new(); + let mut types = Vec::new(); + for data in data.variants.iter() { + let variant_id = &data.ident; + let data = data.fields.iter().next().unwrap(); + let t = &data.ty; + let id = &data.ident; + let chars = crate::utils::chars(id.as_ref().unwrap()); + ids.push(id.clone()); + labels.push(chars.clone()); + types.push(t.clone()); + let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl(); + impls.push(quote::quote!( + impl #impl_generics Accessor<#chars, Option<#t>> for #name #type_generics #where_clause { + fn get(self) -> #t { + if let #name::#variant_id(data) = self.#id { + Some(data) + } else { + None + } + } + } + )); + } + impls.push(quote::quote!( + impl Transform for #name where T: #(Accessor<#labels, #types>+)* Copy + Clone { + fn transform(other: T) -> Self { + Self { + #(#ids: get!(other, #ids),)* + } + } + } + )); + } + syn::Data::Union(_) => todo!(), + }; + quote::quote!(#(#impls)*).into() +} diff --git a/arc-sys/dataflow/macros/src/proc_macros.rs b/arc-sys/dataflow/macros/src/proc_macros.rs new file mode 100644 index 000000000..37cdec0e5 --- /dev/null +++ b/arc-sys/dataflow/macros/src/proc_macros.rs @@ -0,0 +1,152 @@ +use proc_macro::TokenStream; + +pub fn call(input: syn::Expr) -> TokenStream { + match input { + syn::Expr::Call(e) => { + let func = e.func; + let args = e.args; + quote::quote!(#func(#args)).into() + } + _ => panic!("Expected function call expression"), + } +} + +pub fn call_async(input: syn::Expr) -> TokenStream { + match input { + syn::Expr::Call(e) => { + let func = e.func; + let args = e.args; + quote::quote!(#func(#args).await).into() + } + _ => panic!("Expected function call expression"), + } +} + +pub fn call_indirect(input: syn::Expr) -> TokenStream { + match input { + syn::Expr::Call(e) => { + let func = e.func; + let args = e.args; + quote::quote!((#func.ptr)(#args)).into() + } + _ => panic!("Expected function call expression"), + } +} + +pub fn enwrap(input: TokenStream) -> TokenStream { + let mut iter = input.into_iter(); + let path: syn::Path = crate::utils::parse(&mut iter); + let data: syn::Expr = crate::utils::parse(&mut iter); + quote::quote!(#path(#data)).into() +} + +pub fn is(input: TokenStream) -> TokenStream { + let mut iter = input.into_iter(); + let path: syn::Path = crate::utils::parse(&mut iter); + let data: syn::Expr = crate::utils::parse(&mut iter); + quote::quote!(matches!(#data, #path(_))).into() +} + +pub fn unwrap(input: TokenStream) -> TokenStream { + let mut iter = input.into_iter(); + let path: syn::Path = crate::utils::parse(&mut iter); + let expr: syn::Expr = crate::utils::parse(&mut iter); + quote::quote!(if let #path(v) = &#expr { v.clone() } else { unreachable!() }).into() +} + +pub fn new(input: TokenStream) -> TokenStream { + let mut iter = input.into_iter(); + let mut data: syn::ExprStruct = crate::utils::parse(&mut iter); + let mut wrapper_path = data.path.clone(); + wrapper_path.segments.push(syn::parse_quote!(new)); + let mut iter = data.path.segments.iter_mut(); + match (iter.next(), iter.next()) { + (Some(_), Some(seg)) => seg.ident = crate::utils::new_id(format!("_{}", seg.ident)), + (Some(seg), None) => seg.ident = crate::utils::new_id(format!("_{}", seg.ident)), + _ => unreachable!(), + } + quote::quote!(#wrapper_path(#data)).into() +} + +pub fn access(input: TokenStream) -> TokenStream { + let mut iter = input.into_iter(); + let data: syn::Expr = crate::utils::parse(&mut iter); + let ident: syn::Ident = crate::utils::parse(&mut iter); + quote::quote!(#data.#ident).into() +} + +pub fn val(input: TokenStream) -> TokenStream { + let mut iter = input.into_iter(); + let data: syn::Expr = crate::utils::parse(&mut iter); + quote::quote!(#data.clone()).into() +} + +pub fn vector(input: TokenStream) -> TokenStream { + let mut iter = input.into_iter(); + let data: Vec = crate::utils::parse_all(&mut iter); + quote::quote!(Vector::from_vec(vec![#(#data),*])).into() +} + +pub fn get(input: TokenStream) -> TokenStream { + let mut iter = input.into_iter(); + let data: syn::Expr = crate::utils::parse(&mut iter); + let id: syn::Ident = crate::utils::parse(&mut iter); + let chars = crate::utils::chars(&id); + quote::quote!(<_ as Accessor<#chars, _>>::get(#data)).into() +} + +pub fn label(input: TokenStream) -> TokenStream { + let mut iter = input.into_iter(); + let id: syn::Ident = crate::utils::parse(&mut iter); + let chars = crate::utils::chars(&id); + quote::quote!(#chars).into() +} + +#[allow(non_snake_case)] +pub fn Record(input: TokenStream) -> TokenStream { + let fields = crate::utils::parse_type_fields(input); + let (ids, tys): (Vec<_>, Vec<_>) = fields.into_iter().map(|f| (f.ident.unwrap(), f.ty)).unzip(); + let labels = ids.iter().map(crate::utils::chars); + quote::quote!(impl #(Accessor<#labels, #tys>)+*+Copy).into() +} + +pub fn record(input: TokenStream) -> TokenStream { + let fields = crate::utils::parse_expr_fields(input); + let (ids, exprs): (Vec<_>, Vec<_>) = fields + .into_iter() + .map(|f| { + ( + match f.member { + syn::Member::Named(id) => id, + syn::Member::Unnamed(_) => panic!("Expected named fields"), + }, + f.expr, + ) + }) + .unzip(); + let (exprs, tys): (Vec<_>, Vec<_>) = exprs + .into_iter() + .map(|expr| match expr { + syn::Expr::Cast(e) => (e.expr, e.ty), + _ => panic!("Expected cast expression"), + }) + .unzip(); + let line = std::line!(); + let id = crate::utils::new_id(format!("_{}", line)); + quote::quote!( + { + #[derive(Accessor, Copy, Clone)] + struct #id { #(#ids: #tys,)* } + #id { #(#ids: #exprs,)* } + } + ) + .into() +} + +#[allow(non_snake_case)] +pub fn Enum(input: TokenStream) -> TokenStream { + let fields = crate::utils::parse_type_fields(input); + let (ids, tys): (Vec<_>, Vec<_>) = fields.into_iter().map(|f| (f.ident.unwrap(), f.ty)).unzip(); + let labels = ids.iter().map(crate::utils::chars); + quote::quote!(impl #(Accessor<#labels, Option<#tys>>)+*+Copy).into() +} diff --git a/arc-sys/dataflow/macros/src/utils.rs b/arc-sys/dataflow/macros/src/utils.rs new file mode 100644 index 000000000..81640970e --- /dev/null +++ b/arc-sys/dataflow/macros/src/utils.rs @@ -0,0 +1,136 @@ +use proc_macro::TokenStream; +use proc_macro2 as pm2; +use proc_macro as pm; + +pub(crate) fn new_id(s: impl ToString) -> syn::Ident { + syn::Ident::new(&s.to_string(), pm2::Span::call_site()) +} + +pub(crate) fn get_metas(attr: &[syn::NestedMeta]) -> Vec { + attr.iter() + .filter_map(|a| match a { + syn::NestedMeta::Meta(m) => Some(m.clone()), + _ => None, + }) + .collect() +} + +pub(crate) fn _has_attr_key(name: &str, attr: &[syn::Attribute]) -> bool { + attr.iter() + .any(|a| matches!(a.parse_meta(), Ok(syn::Meta::Path(x)) if x.is_ident(name))) +} + +pub(crate) fn has_meta_key(name: &str, meta: &[syn::Meta]) -> bool { + meta.iter() + .any(|m| matches!(m, syn::Meta::Path(x) if x.is_ident(name))) +} + +pub(crate) fn has_meta_name_val(name: &str, meta: &[syn::Meta]) -> bool { + meta.iter() + .any(|m| matches!(m, syn::Meta::NameValue(x) if x.path.is_ident(name))) +} + +pub(crate) fn _has_nested_meta_key(name: &str, meta: &[syn::NestedMeta]) -> bool { + meta.iter() + .any(|m| matches!(m, syn::NestedMeta::Meta(syn::Meta::Path(x)) if x.is_ident(name))) +} + +#[allow(unused)] +pub(crate) fn get_attr_val(name: &str, attr: &[syn::NestedMeta]) -> T { + attr.iter() + .find_map(|arg| match arg { + syn::NestedMeta::Meta(meta) => match meta { + syn::Meta::NameValue(nv) if nv.path.is_ident(name) => match &nv.lit { + syn::Lit::Str(x) => { + Some(x.parse().expect("Expected attr value to be an identifier")) + } + _ => None, + }, + _ => None, + }, + syn::NestedMeta::Lit(_) => None, + }) + .unwrap_or_else(|| panic!("`{} = ` missing from identifiers", name)) +} + +pub(crate) fn _split_name_type(params: Vec) -> (Vec, Vec) { + params + .into_iter() + .map(|p| match p { + syn::FnArg::Receiver(_) => unreachable!(), + syn::FnArg::Typed(p) => match *p.pat { + syn::Pat::Ident(i) => (i.ident, *p.ty), + _ => unreachable!(), + }, + }) + .unzip() +} + +pub(crate) struct ParsableNamedTypeField { + pub(crate) field: syn::Field, +} + +pub(crate) struct ParsableNamedExprField { + pub(crate) field: syn::FieldValue, +} + +impl syn::parse::Parse for ParsableNamedTypeField { + fn parse(input: syn::parse::ParseStream<'_>) -> syn::parse::Result { + let field = syn::Field::parse_named(input)?; + Ok(ParsableNamedTypeField { field }) + } +} + +impl syn::parse::Parse for ParsableNamedExprField { + fn parse(input: syn::parse::ParseStream<'_>) -> syn::parse::Result { + let field = syn::FieldValue::parse(input)?; + Ok(ParsableNamedExprField { field }) + } +} + +pub(crate) fn parse_type_fields(input: TokenStream) -> Vec { + let input = pm2::TokenStream::from(input); + let punctuated_fields: syn::punctuated::Punctuated = + syn::parse_quote!(#input); + punctuated_fields.into_iter().map(|f| f.field).collect() +} + +pub(crate) fn parse_expr_fields(input: TokenStream) -> Vec { + let input = pm2::TokenStream::from(input); + let punctuated_fields: syn::punctuated::Punctuated = + syn::parse_quote!(#input); + punctuated_fields.into_iter().map(|f| f.field).collect() +} + +pub(crate) fn parse(input: &mut impl Iterator) -> T { + let mut stream = pm::TokenStream::new(); + for token in input.by_ref() { + match token { + pm::TokenTree::Punct(t) if t.as_char() == ',' => break, + _ => stream.extend([token]), + } + } + syn::parse::(stream).unwrap() +} + +pub(crate) fn parse_all(input: &mut impl Iterator) -> Vec { + let mut nodes = Vec::new(); + let mut stream = pm::TokenStream::new(); + for token in input.by_ref() { + match token { + pm::TokenTree::Punct(t) if t.as_char() == ',' => { + nodes.push(syn::parse::(stream).unwrap()); + stream = pm::TokenStream::new(); + } + _ => stream.extend([token]), + } + } + nodes +} + +pub(crate) fn chars(id: &pm2::Ident) -> pm2::TokenStream { + let s = id.to_string(); + let chars = s.chars().into_iter().map(|c| crate::utils::new_id(c)); + quote::quote!((#(chars::#chars,)*)) +} + diff --git a/arc-sys/dataflow/src/aggregator.rs b/arc-sys/dataflow/src/aggregator.rs new file mode 100644 index 000000000..e2ccfa952 --- /dev/null +++ b/arc-sys/dataflow/src/aggregator.rs @@ -0,0 +1,15 @@ +use num::Zero; + +use crate::data::Data; + +// Requires associativity, and invertibility. +pub trait Aggregator { + type I: Data; + type P: Data; + type O: Data; + + fn lift(i: Self::I) -> Self::P; + fn merge(a: Self::P, b: Self::P) -> Self::P; + fn identity() -> Self::P; + fn lower(p: Self::P) -> Self::O; +} diff --git a/arc-sys/dataflow/src/aggregators/count.rs b/arc-sys/dataflow/src/aggregators/count.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/arc-sys/dataflow/src/aggregators/count.rs @@ -0,0 +1 @@ + diff --git a/arc-sys/dataflow/src/aggregators/sum.rs b/arc-sys/dataflow/src/aggregators/sum.rs new file mode 100644 index 000000000..34f3b0a4c --- /dev/null +++ b/arc-sys/dataflow/src/aggregators/sum.rs @@ -0,0 +1,89 @@ +use std::marker::PhantomData; +use std::ops::{Add, AddAssign, Div}; + +use num::NumCast; +use num::Zero; + +use crate::aggregator::Aggregator; +use crate::data::Data; + +struct Sum(PhantomData); + +impl Aggregator for Sum +where + T: Data + Zero, +{ + type I = T; + type P = T; + type O = T; + + fn lift(input: Self::I) -> Self::P { + input + } + + fn merge(a: Self::P, b: Self::P) -> Self::P { + a + b + } + + fn identity() -> Self::P { + Self::P::zero() + } + + fn lower(output: Self::P) -> Self::O { + output + } +} + +struct Count(PhantomData); + +impl Aggregator for Count +where + T: Data, +{ + type I = T; + type P = u64; + type O = u64; + + fn lift(input: Self::I) -> Self::P { + 1 + } + + fn merge(a: Self::P, b: Self::P) -> Self::P { + a + b + } + + fn identity() -> Self::P { + 0 + } + + fn lower(output: Self::P) -> Self::O { + output + } +} + +struct Average(PhantomData); + +impl Aggregator for Average +where + T: Data + Zero + Div + NumCast, +{ + type I = T; + type P = ( as Aggregator>::P, as Aggregator>::P); + type O = T; + + fn lift(input: Self::I) -> Self::P { + (Sum::::lift(input.clone()), Count::::lift(input)) + } + + fn merge(a: Self::P, b: Self::P) -> Self::P { + (Sum::::merge(a.0, b.0), Count::::merge(a.1, b.1)) + } + + fn identity() -> Self::P { + (Sum::::identity(), Count::::identity()) + } + + fn lower(output: Self::P) -> Self::O { + Sum::::lower(output.0) / NumCast::from(Count::::lower(output.1)).unwrap() + } +} diff --git a/arc-sys/dataflow/src/data.rs b/arc-sys/dataflow/src/data.rs new file mode 100644 index 000000000..b49e580c6 --- /dev/null +++ b/arc-sys/dataflow/src/data.rs @@ -0,0 +1,19 @@ +pub mod cell; +pub mod dataframe; +pub mod dict; +pub mod primitive; +pub mod series; +pub mod set; +pub mod string; +pub mod vector; + +use std::fmt::Debug; +use std::hash::Hash; + +use crate::serde::Serde; + +pub trait Data: Clone + Serde + Unpin + Debug + 'static {} +impl Data for T where T: Clone + Serde + Unpin + Debug + 'static {} + +pub trait Key: Data + Hash + Eq {} +impl Key for T where T: Data + Hash + Eq {} diff --git a/arc-sys/dataflow/src/data/cell.rs b/arc-sys/dataflow/src/data/cell.rs new file mode 100644 index 000000000..30c8e4fbc --- /dev/null +++ b/arc-sys/dataflow/src/data/cell.rs @@ -0,0 +1,84 @@ +use crate::prelude::*; +use crate::serde::Serde; + +use macros::export; +use serde::Deserialize; +use serde::Deserializer; +use serde::Serialize; +use serde::Serializer; + +use std::cell::UnsafeCell; +use std::hash::Hash; +use std::hash::Hasher; +use std::ops::Deref; +use std::ops::DerefMut; + +#[derive(Debug, Unpin)] +pub struct Cell(pub UnsafeCell); + +impl Hash for Cell { + fn hash(&self, state: &mut H) { + self.get_ref().hash(state) + } +} + +impl Eq for Cell {} + +impl PartialEq for Cell { + fn eq(&self, other: &Self) -> bool { + self.get_ref().eq(&other.get_ref()) + } +} + +impl Clone for Cell { + fn clone(&self) -> Self { + unsafe { Self(UnsafeCell::new((*self.0.get()).clone())) } + } +} + +impl Serialize for Cell { + fn serialize(&self, serializer: S) -> Result { + self.get_ref().serialize(serializer) + } +} + +impl<'de, T: Data> Deserialize<'de> for Cell { + fn deserialize>(deserializer: D) -> Result { + Ok(Cell(UnsafeCell::new(T::deserialize(deserializer)?))) + } +} + +impl Deref for Cell { + type Target = T; + fn deref(&self) -> &Self::Target { + unsafe { &*self.0.get() } + } +} + +impl DerefMut for Cell { + fn deref_mut(&mut self) -> &mut Self::Target { + unsafe { &mut *self.0.get() } + } +} + +#[export] +impl Cell { + pub fn new(v: T) -> Cell { + Cell(UnsafeCell::new(v)) + } + pub fn get(self) -> T { + unsafe { (*self.0.get()).clone() } + } + pub fn set(self, v: T) { + unsafe { *self.0.get() = v } + } +} + +impl Cell { + pub fn get_ref(&self) -> &T { + unsafe { &*self.0.get() } + } + pub fn get_mut_ref(&self) -> &mut T { + unsafe { &mut *self.0.get() } + } +} diff --git a/arc-sys/dataflow/src/data/dataframe.rs b/arc-sys/dataflow/src/data/dataframe.rs new file mode 100644 index 000000000..976197134 --- /dev/null +++ b/arc-sys/dataflow/src/data/dataframe.rs @@ -0,0 +1,206 @@ +use crate::prelude::*; +use macros::Unpin; +use serde::Serialize; +use serde_derive::Deserialize; +use std::rc::Rc; + +use std::collections::HashMap; + +use super::cell::Cell; +use super::string::Str; + +macro_rules! extract { + ($e:expr, $p:path) => { + match $e { + $p(v) => v, + _ => panic!("unwrap: expected {}", stringify!($p)), + } + }; +} + +#[derive(Serialize, Deserialize, Clone, Debug, Unpin)] +pub struct DataFrame { + data: Rc>, + head: usize, + tail: usize, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Unpin)] +enum Column { + Bool(Vec>), + U64(Vec>), + I64(Vec>), + F64(Vec>), + String(Vec>), +} + +#[derive(Deserialize, Serialize, Clone, Debug, Unpin)] +#[serde(untagged)] +enum Scalar { + Bool(bool), + U64(u64), + I64(i64), + F64(f64), + String(String), +} + +impl DataFrame { + fn get_mut(&mut self) -> &mut HashMap { + unsafe { Rc::get_mut_unchecked(&mut self.data) } + } + + pub fn new() -> Self { + Self { + data: Rc::new(HashMap::new()), + head: 0, + tail: 0, + } + } + + fn read_csv(mut rdr: csv::Reader) -> Self { + let headers: Vec<_> = rdr.headers().unwrap().iter().map(String::from).collect(); + let rows: Vec>> = rdr.deserialize().map(Result::unwrap).collect(); + let columns = transpose(rows).into_iter().map(scalars_to_column); + let data = headers + .into_iter() + .zip(columns) + .collect::>(); + Self { + data: Rc::new(data), + head: 0, + tail: 0, + } + } + + pub fn read_csv_file(filepath: Str) -> Self { + Self::read_csv(csv::Reader::from_path(filepath.as_str()).unwrap()) + } + + pub fn read_csv_data(data: Str) -> Self { + Self::read_csv(csv::Reader::from_reader(data.as_str().as_bytes())) + } + + pub fn head(mut self, n: i32) -> Self { + self.head = n as usize; + self + } + + pub fn tail(mut self, n: i32) -> Self { + self.tail = n as usize; + self + } + + fn fold( + self, + f_bool: impl Fn(bool, bool) -> bool + Copy, + f_u64: impl Fn(u64, u64) -> u64 + Copy, + f_i64: impl Fn(i64, i64) -> i64 + Copy, + f_f64: impl Fn(f64, f64) -> f64 + Copy, + f_string: impl Fn(&str, &str) -> String, + ) -> Self { + let data = self + .data + .iter() + .map(|(k, v)| { + let v = match v { + Column::U64(v) => Column::U64(fold(&v[self.head..self.tail], 0, f_u64)), + Column::I64(v) => Column::I64(fold(&v[self.head..self.tail], 0, f_i64)), + Column::F64(v) => Column::F64(fold(&v[self.head..self.tail], 0.0, f_f64)), + Column::Bool(v) => Column::Bool(fold(&v[self.head..self.tail], false, f_bool)), + Column::String(v) => { + Column::String(vec![Some(v.iter().fold(String::new(), |a, x| { + f_string(&a, &x.as_ref().map(|x| x.as_str()).unwrap_or("")) + }))]) + } + }; + (k.clone(), v) + }) + .collect::>(); + Self { + data: Rc::new(data), + ..self + } + } +} + +fn fold(v: &[Option], init: T, f: impl Fn(T, T) -> T) -> Vec> { + vec![Some(v.iter().map(|x| x.unwrap_or(init)).fold(init, f))] +} + +/// Convert a struct into a column entry. +trait AppendRow { + fn append_row(self, df: DataFrame); +} + +fn transpose(v: Vec>) -> Vec> { + assert!(!v.is_empty()); + let len = v[0].len(); + let mut iters: Vec<_> = v.into_iter().map(|n| n.into_iter()).collect(); + (0..len) + .map(|_i| { + iters + .iter_mut() + .map(|n| n.next().unwrap()) + .collect::>() + }) + .collect() +} + +fn scalars_to_column(scalars: Vec>) -> Column { + match scalars[0].as_ref().unwrap() { + Scalar::Bool(_) => Column::Bool( + scalars + .into_iter() + .map(|v| v.map(|v| extract!(v, Scalar::Bool))) + .collect(), + ), + Scalar::U64(_) => Column::F64( + scalars + .into_iter() + .map(|v| v.map(|v| extract!(v, Scalar::F64))) + .collect(), + ), + Scalar::I64(_) => Column::I64( + scalars + .into_iter() + .map(|v| v.map(|v| extract!(v, Scalar::I64))) + .collect(), + ), + Scalar::F64(_) => Column::U64( + scalars + .into_iter() + .map(|v| v.map(|v| extract!(v, Scalar::U64))) + .collect(), + ), + Scalar::String(_) => Column::String( + scalars + .into_iter() + .map(|v| v.map(|v| extract!(v, Scalar::String))) + .collect(), + ), + } +} + +#[cfg(test)] +mod test { + use super::*; + + struct Person { + name: String, + age: u64, + height: f64, + } + + impl AppendRow for Person { + fn append_row(self, mut df: DataFrame) { + extract!(df.get_mut().get_mut("name").unwrap(), Column::String).push(Some(self.name)); + extract!(df.get_mut().get_mut("age").unwrap(), Column::U64).push(Some(self.age)); + extract!(df.get_mut().get_mut("height").unwrap(), Column::F64).push(Some(self.height)); + } + } + + #[test] + fn test() { + // let df = DataFrame::from + } +} diff --git a/arc-sys/dataflow/src/data/dict.rs b/arc-sys/dataflow/src/data/dict.rs new file mode 100644 index 000000000..25891ac9f --- /dev/null +++ b/arc-sys/dataflow/src/data/dict.rs @@ -0,0 +1,34 @@ +use std::collections::HashMap; +use std::rc::Rc; + +use derive_more::From; +use macros::export; +use macros::Unpin; +use serde::Deserialize; +use serde::Serialize; + +use super::cell::Cell; +use super::Data; +use super::Key; + +#[derive(Clone, From, Debug, Unpin)] +pub struct Dict(pub Rc>); + +impl Dict { + fn get_mut(&mut self) -> &mut HashMap { + unsafe { Rc::get_mut_unchecked(&mut self.0) } + } +} + +#[export] +impl Dict { + pub fn new() -> Dict { + Dict(Rc::new(HashMap::new())) + } + pub fn get(mut self, key: K) -> Option { + self.get_mut().get(&key).cloned() + } + pub fn insert(mut self, key: K, val: V) { + self.get_mut().insert(key, val); + } +} diff --git a/arc-sys/dataflow/src/data/primitive.rs b/arc-sys/dataflow/src/data/primitive.rs new file mode 100644 index 000000000..4f38d901c --- /dev/null +++ b/arc-sys/dataflow/src/data/primitive.rs @@ -0,0 +1,27 @@ +use crate::prelude::*; + +pub use bool; +pub use char; +pub use f32; +pub use f64; +pub use i128; +pub use i16; +pub use i32; +pub use i64; +pub use i8; +pub use u128; +pub use u16; +pub use u32; +pub use u64; +pub use u8; +#[allow(non_camel_case_types)] +pub type unit = (); +pub type Unit = (); +pub use std::ops::Range; + +#[allow(non_upper_case_globals)] +pub const unit: unit = (); +#[allow(non_upper_case_globals)] +pub const Unit: unit = (); + +use crate::prelude::*; diff --git a/arc-sys/dataflow/src/data/series.rs b/arc-sys/dataflow/src/data/series.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/arc-sys/dataflow/src/data/series.rs @@ -0,0 +1 @@ + diff --git a/arc-sys/dataflow/src/data/set.rs b/arc-sys/dataflow/src/data/set.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/arc-sys/dataflow/src/data/set.rs @@ -0,0 +1 @@ + diff --git a/arc-sys/dataflow/src/data/string.rs b/arc-sys/dataflow/src/data/string.rs new file mode 100644 index 000000000..88a412d42 --- /dev/null +++ b/arc-sys/dataflow/src/data/string.rs @@ -0,0 +1,85 @@ +use std::rc::Rc; + +use crate::prelude::*; + +use derive_more::Deref; +use derive_more::DerefMut; +use derive_more::From; +use macros::export; +use serde::Deserialize; +use serde::Serialize; + +#[derive(Clone, Hash, Eq, PartialEq, Deref, DerefMut, Debug, Unpin, Serialize, Deserialize)] +pub struct Str(pub Rc); + +impl Str { + fn get_mut(&mut self) -> &mut String { + unsafe { Rc::get_mut_unchecked(&mut self.0) } + } +} + +#[export] +impl Str { + pub fn new() -> Str { + Str(Rc::new(std::string::String::new())) + } + + pub fn with_capacity(capacity: usize) -> Str { + Str(Rc::new(std::string::String::with_capacity(capacity))) + } + + pub fn push_char(mut self, ch: char) { + self.get_mut().push(ch) + } + + pub fn push_str(mut self, s: &str) { + self.get_mut().push_str(s) + } + + pub fn from_str(s: &str) -> Str { + let new = Str::with_capacity(s.len()); + new.clone().push_str(s); + new + } + + pub fn remove(mut self, idx: u32) -> char { + self.get_mut().remove(idx as usize) + } + + pub fn insert_char(mut self, idx: u32, ch: char) { + self.get_mut().insert(idx as usize, ch) + } + + pub fn is_empty(self) -> bool { + self.0.is_empty() + } + + pub fn split_off(mut self, at: u32) -> Str { + Str(Rc::new(self.get_mut().split_off(at as usize))) + } + + pub fn clear(mut self) { + self.get_mut().clear() + } + + pub fn len(self) -> u32 { + self.0.len() as u32 + } + + pub fn from_i32(i: i32) -> Str { + let mut new = Str::new(); + new.get_mut().push_str(&i.to_string()); + new + } + + pub fn eq(self, other: Str) -> bool { + self.0.eq(&other.0) + } + + pub fn concat(self, other: Str) -> Str { + let mut new = Str::new(); + new.get_mut().push_str(&self.0); + new.get_mut().push_str(&other.0); + new + } +} diff --git a/arc-sys/dataflow/src/data/vector.rs b/arc-sys/dataflow/src/data/vector.rs new file mode 100644 index 000000000..49fe760ba --- /dev/null +++ b/arc-sys/dataflow/src/data/vector.rs @@ -0,0 +1,136 @@ +use std::rc::Rc; + +use derive_more::From; +use macros::export; +use macros::Send; +use macros::Sync; +use macros::Trace; +use macros::Unpin; +use serde::Deserialize; +use serde::Serialize; + +use super::cell::Cell; +use super::Data; + +#[derive(Clone, Debug, Send, Sync, Unpin, Serialize, Deserialize)] +#[serde(bound = "")] +pub struct Vector(pub Rc>); + +impl Vector { + fn get_mut(&mut self) -> &mut Vec { + unsafe { Rc::get_mut_unchecked(&mut self.0) } + } + + pub fn retain(mut self, f: F) + where + F: FnMut(&T) -> bool, + { + self.get_mut().retain(f); + } + pub fn as_slice_mut(&mut self) -> &mut [T] { + self.get_mut().as_mut_slice() + } + + pub fn dedup(mut self) + where + T: PartialEq, + { + self.get_mut().dedup(); + } + + pub fn shrink_to(mut self, min_capacity: usize) { + self.get_mut().shrink_to(min_capacity); + } + + pub fn resize(mut self, new_len: usize, value: T) { + self.get_mut().resize(new_len, value); + } +} + +#[export] +impl Vector { + pub fn iterator(self) -> VectorIterator { + VectorIterator::new(self) + } + + pub fn new() -> Vector { + Vector(Rc::new(Vec::::new())) + } + + pub fn from_vec(vec: Vec) -> Vector { + Vector(Rc::new(vec)) + } + + pub fn with_capacity(capacity: usize) -> Vector { + Vector(Rc::new(Vec::::with_capacity(capacity))) + } + + pub fn capacity(self) -> usize { + self.0.capacity() + } + + pub fn len(self) -> usize { + self.0.len() + } + + pub fn clear(mut self) { + self.get_mut().clear(); + } + + pub fn push(mut self, value: T) { + self.get_mut().push(value); + } + + pub fn pop(mut self) -> Option { + self.get_mut().pop() + } + + pub fn remove(mut self, index: usize) -> T { + self.get_mut().remove(index) + } + + pub fn get(self, index: usize) -> T { + self.0[index].clone() + } + + pub fn insert(mut self, index: usize, value: T) { + self.get_mut().insert(index, value); + } + + pub fn is_empty(self) -> bool { + self.0.is_empty() + } +} + +#[allow(non_snake_case)] +pub fn Vector_dedup(self_param: Vector) +where + T: PartialEq, +{ + Vector::dedup(self_param) +} + +#[derive(Clone, From, Debug, Send, Sync, Unpin, Serialize, Deserialize)] +#[serde(bound = "")] +#[from(forward)] +pub struct VectorIterator { + vec: Vector, + offset: u64, +} + +#[export] +impl VectorIterator { + fn new(vec: Vector) -> VectorIterator { + VectorIterator { vec, offset: 0 } + } + + pub fn is_empty(self) -> bool { + self.offset >= self.vec.len() as u64 + } + + pub fn next(mut self) -> T { + let index = self.offset as usize; + self.offset += 1; + self.vec.get(index) + } +} diff --git a/arc-sys/dataflow/src/data/web/wasm.rs b/arc-sys/dataflow/src/data/web/wasm.rs new file mode 100644 index 000000000..9495695bb --- /dev/null +++ b/arc-sys/dataflow/src/data/web/wasm.rs @@ -0,0 +1,27 @@ +use std::error::Error; +use wasmtime::*; + +pub struct Wasm { + engine: Engine, + store: Store<()>, +} + +impl Wasm { + fn new() -> Self { + let engine = Engine::default(); + let store = Store::new(&engine, ()); + Self { engine, store } + } + + fn run(&mut self, source: &[u8], input: I) -> O { + let module = Module::from_binary(&self.engine, source).unwrap(); + let instance = Instance::new(&mut self.store, &module, &[]).unwrap(); + instance + .get_func(&mut self.store, "main") + .unwrap() + .typed::(&self.store) + .unwrap() + .call(&mut self.store, input) + .unwrap() + } +} diff --git a/arc-sys/dataflow/src/db.rs b/arc-sys/dataflow/src/db.rs new file mode 100644 index 000000000..0028a7e41 --- /dev/null +++ b/arc-sys/dataflow/src/db.rs @@ -0,0 +1,32 @@ +use futures::Future; + +#[derive(Clone)] +pub enum Database { + #[cfg(feature = "tikv")] + Remote(tikv_client::RawClient), + Local(sled::Db), +} + +pub fn block_on, T>(f: F) -> T { + tokio::runtime::Runtime::new() + .expect("failed to create runtime") + .block_on(f) +} + +impl Database { + #[cfg(feature = "tikv")] + pub fn remote(addr: &str) -> Self { + let db = block_on(async { + let client = tikv_client::RawClient::new(vec![addr]) + .await + .expect("Failed to connect to TiKV"); + client + }); + Self::Remote(db) + } + + pub fn local(path: &str) -> Self { + let db = sled::open(path).expect("Failed to connect to sled"); + Self::Local(db) + } +} diff --git a/arc-sys/dataflow/src/event.rs b/arc-sys/dataflow/src/event.rs new file mode 100644 index 000000000..ebeb21d4a --- /dev/null +++ b/arc-sys/dataflow/src/event.rs @@ -0,0 +1,37 @@ +use serde::Deserialize; +use serde::Serialize; +use time::OffsetDateTime; + +#[derive(Copy, Clone, Debug, Serialize, Deserialize)] +pub enum Event { + Data(Option, T), + Watermark(OffsetDateTime), +} + +#[derive(Copy, Clone, Debug, Serialize, Deserialize)] +pub enum NetEvent { + Data(Option, T), + Epoch(u64), +} + +#[derive(Copy, Clone, Debug, Serialize, Deserialize)] +pub enum WorkerEvent { + Commit(u64), +} + +#[derive(Copy, Clone, Debug, Serialize, Deserialize)] +pub enum PipelineEvent { + Epoch(u64), +} + +impl Event { + pub fn map(self, f: F) -> Event + where + F: FnOnce(T) -> U, + { + match self { + Event::Data(time, data) => Event::Data(time, f(data)), + Event::Watermark(time) => Event::Watermark(time), + } + } +} diff --git a/arc-sys/dataflow/src/iteratee.rs b/arc-sys/dataflow/src/iteratee.rs new file mode 100644 index 000000000..3b2f38d77 --- /dev/null +++ b/arc-sys/dataflow/src/iteratee.rs @@ -0,0 +1,14 @@ +pub trait Iteratee { + type Item; + fn feed(&mut self, input: Self::Item); +} + +impl Iteratee for &mut T +where + T: Iteratee, +{ + type Item = T::Item; + fn feed(&mut self, input: Self::Item) { + T::feed(self, input) + } +} diff --git a/arc-sys/dataflow/src/lib.rs b/arc-sys/dataflow/src/lib.rs new file mode 100644 index 000000000..b153451c5 --- /dev/null +++ b/arc-sys/dataflow/src/lib.rs @@ -0,0 +1,131 @@ +#![allow(non_snake_case)] +#![allow(unused)] +#![feature(type_alias_impl_trait)] +#![feature(poll_ready)] +#![feature(new_uninit)] +#![feature(get_mut_unchecked)] +#![feature(cell_update)] + +pub mod aggregator; +pub mod data; +pub mod db; +pub mod event; +pub mod iteratee; +pub mod operator; +pub mod runtime; +pub mod serde; + +#[cfg(feature = "ml")] +pub mod ml { + pub mod image; + pub mod model; +} + +pub mod state; + +pub mod operators { + pub mod apply; + pub mod compiler_generated; + pub mod filter; + pub mod kafka_sink; + pub mod kafka_source; + pub mod map; + pub mod scan; + pub mod shuffle_sink; + pub mod shuffle_source; + pub mod transform; + pub mod tumbling_window; + pub mod union; + pub mod worker_sink; + pub mod worker_source; +} + +pub mod aggregators { + pub mod count; + pub mod sum; +} + +pub mod utils { + pub mod serde; +} + +pub mod prelude { + + // Procedural macros + pub use macros::access; + pub use macros::call; + pub use macros::call_async; + pub use macros::call_indirect; + pub use macros::enwrap; + pub use macros::is; + pub use macros::new; + pub use macros::rewrite; + pub use macros::unwrap; + pub use macros::val; + pub use macros::vector; + pub use macros::NoDebug; + pub use macros::NoSerde; + pub use macros::Unpin; + + pub use derive_more::Deref; + pub use derive_more::DerefMut; + pub use derive_more::From; + + pub use crate::data::cell::Cell; + pub use crate::data::cell::Cell_get; + pub use crate::data::cell::Cell_new; + pub use crate::data::cell::Cell_set; + + pub use crate::data::string::Str; + pub use crate::data::string::Str_clear; + pub use crate::data::string::Str_concat; + pub use crate::data::string::Str_eq; + pub use crate::data::string::Str_from_i32; + pub use crate::data::string::Str_from_str; + pub use crate::data::string::Str_insert_char; + pub use crate::data::string::Str_is_empty; + pub use crate::data::string::Str_len; + pub use crate::data::string::Str_new; + pub use crate::data::string::Str_push_char; + pub use crate::data::string::Str_push_str; + pub use crate::data::string::Str_remove; + pub use crate::data::string::Str_split_off; + pub use crate::data::string::Str_with_capacity; + + pub use crate::data::primitive::unit; + pub use crate::data::primitive::Unit; + + pub use crate::runtime::Runtime; + + pub use crate::data::Data; + pub use crate::db::Database; + pub use crate::event::Event; + pub use crate::event::NetEvent; + pub use crate::event::PipelineEvent; + pub use crate::event::WorkerEvent; + pub use crate::iteratee::Iteratee; + pub use crate::operator::Operator; + pub use crate::operators::apply::Apply; + pub use crate::operators::filter::Filter; + pub use crate::operators::kafka_sink::KafkaSink; + pub use crate::operators::kafka_source::KafkaSource; + pub use crate::operators::map::Map; + pub use crate::operators::scan::Scan; + pub use crate::operators::shuffle_sink::ShuffleSink; + pub use crate::operators::shuffle_source::ShuffleSource; + pub use crate::operators::union::Union; + pub use crate::operators::worker_source::WorkerSource; + pub use crate::state::State; + + pub use tokio::select; + + pub use serde::Deserialize; + pub use serde::Serialize; + + pub use crate::utils; + pub use std::iter; + pub use std::sync::Arc; + pub use std::sync::Mutex; + + pub use std::rc::Rc; +} diff --git a/arc-sys/dataflow/src/ml/image.rs b/arc-sys/dataflow/src/ml/image.rs new file mode 100644 index 000000000..d5ecaa26f --- /dev/null +++ b/arc-sys/dataflow/src/ml/image.rs @@ -0,0 +1,62 @@ +use image::io::Reader; +use image::DynamicImage; +use image::GenericImageView; +use image::ImageFormat; +use serde::Deserialize; +use serde::Deserializer; +use serde::Serialize; +use serde::Serializer; +use std::io::BufWriter; +use std::io::Cursor; +use std::rc::Rc; +use tensorflow::Tensor; + +struct Image(Rc); + +impl Serialize for Image { + fn serialize(&self, serializer: S) -> Result { + let mut bytes = Vec::new(); + self.0 + .write_to(&mut Cursor::new(&mut bytes), ImageFormat::Png) + .unwrap(); + serializer.serialize_bytes(&bytes) + } +} + +impl<'de> Deserialize<'de> for Image { + fn deserialize>(deserializer: D) -> Result { + let bytes = Vec::::deserialize(deserializer)?; + let image = Reader::new(Cursor::new(bytes)) + .with_guessed_format() + .unwrap() + .decode() + .unwrap(); + Ok(Image(Rc::new(image))) + } +} + +impl Image { + fn new(bytes: Vec) -> Image { + let mut rd = Reader::new(Cursor::new(bytes)) + .with_guessed_format() + .expect("Unknown image format"); + let image = rd.decode().expect("Failed to decode image"); + Image(Rc::new(image)) + } + fn into_tensor(&self) -> Tensor { + let vec: Vec = self + .0 + .pixels() + .flat_map(|(_x, _y, rgb)| [rgb[2] as f32, rgb[1] as f32, rgb[0] as f32]) + .collect(); + Tensor::new(&[self.0.height() as u64, self.0.width() as u64, 3]) + .with_values(&vec) + .expect("Failed to create tensor") + } + // fn from_tensor(tensor: Tensor) { + // tensor + // .iter::() + // .enumerate() + // .for_each(|(i, v)| println!("{}: {}", i, v)); + // } +} diff --git a/arc-sys/dataflow/src/ml/model.rs b/arc-sys/dataflow/src/ml/model.rs new file mode 100644 index 000000000..6a2d180e6 --- /dev/null +++ b/arc-sys/dataflow/src/ml/model.rs @@ -0,0 +1,58 @@ +use std::path::PathBuf; +use std::{error::Error, marker::PhantomData}; + +use tensorflow::{ + eager, ops::ReadFile, Graph, ImportGraphDefOptions, SavedModelBundle, Session, SessionOptions, + SessionRunArgs, Tensor, TensorType, DEFAULT_SERVING_SIGNATURE_DEF_KEY, +}; + +struct Model { + bundle: SavedModelBundle, + graph: Graph, + marker: PhantomData<(X, Y)>, +} + +impl Model { + fn new(dir: &str) -> Self { + let dir = PathBuf::from(dir); + let opts = eager::ContextOptions::new(); + let ctx = eager::Context::new(opts).unwrap(); + let mut graph = Graph::new(); + let bundle = SavedModelBundle::load(&SessionOptions::new(), &["serve"], &mut graph, dir) + .expect("Failed to load model"); + + Model { + bundle, + graph, + marker: PhantomData, + } + } + + fn infer(&self, x: Tensor) -> Tensor { + let signature = self + .bundle + .meta_graph_def() + .get_signature(DEFAULT_SERVING_SIGNATURE_DEF_KEY) + .expect("Failed to get signature"); + let x_info = signature.inputs().values().next().unwrap(); + let y_info = signature.outputs().values().next().unwrap(); + let op_x = self + .graph + .operation_by_name_required(&x_info.name().name) + .expect("Failed to get op"); + let op_y = self + .graph + .operation_by_name_required(&y_info.name().name) + .expect("Failed to get op"); + + let mut args = SessionRunArgs::new(); + args.add_feed(&op_x, 0, &x); + let token_y = args.request_fetch(&op_y, 0); + self.bundle + .session + .run(&mut args) + .expect("Failed to run session"); + let y: Tensor = args.fetch(token_y).expect("Failed to fetch output"); + y + } +} diff --git a/arc-sys/dataflow/src/operator.rs b/arc-sys/dataflow/src/operator.rs new file mode 100644 index 000000000..e663c2110 --- /dev/null +++ b/arc-sys/dataflow/src/operator.rs @@ -0,0 +1,10 @@ +use std::cell::RefCell; +use std::collections::HashMap; +use std::rc::Rc; + +use crate::data::Data; + +pub trait Operator: Iterator { + type S; + fn state(self) -> Self::S; +} diff --git a/arc-sys/dataflow/src/operators/apply.rs b/arc-sys/dataflow/src/operators/apply.rs new file mode 100644 index 000000000..c3257c41b --- /dev/null +++ b/arc-sys/dataflow/src/operators/apply.rs @@ -0,0 +1,90 @@ +use std::cell::UnsafeCell; +use std::marker::PhantomData; + +use serde::Deserialize; +use serde::Serialize; +use time::OffsetDateTime; + +use crate::event::Event; +use crate::iteratee::Iteratee; +use crate::operator::Operator; +use crate::prelude::Data; + +use super::transform::TransformIteratee; + +pub struct Apply { + iter0: Iter0, + iter1: Iter1, + time: Option, + param: Param, + state: State, + _i: PhantomData, + _o: PhantomData, +} + +impl Apply<(), (), (), ()> { + pub const fn new() -> (Param, State) { + (Param, State) + } +} + +impl Apply { + pub const fn process( + iter0: Iter0, + iter1: Iter1, + param: Param, + state: State, + ) -> Apply { + Self { + iter0, + iter1, + time: None, + param, + state, + _i: PhantomData, + _o: PhantomData, + } + } +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +pub struct State; + +#[derive(Clone, Copy)] +pub struct Param; + +impl Iterator for Apply +where + Iter0: Iterator>, + Iter1: Iteratee + Iterator, +{ + type Item = Event; + + fn next(&mut self) -> Option { + loop { + match self.iter1.next() { + Some(data) => return Some(Event::Data(self.time, data)), + None => match self.iter0.next() { + Some(Event::Data(time, data)) => { + self.iter1.feed(data); + self.time = time; + continue; + } + Some(Event::Watermark(t)) => return Some(Event::Watermark(t)), + None => return None, + }, + } + } + } +} + +impl Operator for Apply +where + Iter0: Iterator>, + Iter1: Iteratee + Iterator, +{ + type S = State; + fn state(self) -> Self::S { + self.state + } +} diff --git a/arc-sys/dataflow/src/operators/compiler_generated.rs b/arc-sys/dataflow/src/operators/compiler_generated.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/arc-sys/dataflow/src/operators/compiler_generated.rs @@ -0,0 +1 @@ + diff --git a/arc-sys/dataflow/src/operators/filter.rs b/arc-sys/dataflow/src/operators/filter.rs new file mode 100644 index 000000000..4c3f412b7 --- /dev/null +++ b/arc-sys/dataflow/src/operators/filter.rs @@ -0,0 +1,68 @@ +use serde::Deserialize; +use serde::Serialize; + +use crate::data::Data; +use crate::event::Event; +use crate::operator::Operator; + +pub struct Filter { + input: Iter, + param: Param, + state: State, +} + +impl Filter<(), T> { + pub const fn new(fun: fn(T) -> bool) -> (Param, State) { + (Param { fun }, State {}) + } +} + +impl Filter { + pub const fn process(input: Iter, param: Param, state: State) -> Filter { + Self { + input, + param, + state, + } + } +} + +#[derive(Copy, Clone)] +pub struct Param { + fun: fn(T) -> bool, +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +pub struct State; + +impl Operator for Filter +where + Iter: Iterator>, + T: Data, +{ + type S = State; + fn state(self) -> Self::S { + State + } +} + +impl Iterator for Filter +where + Iter: Iterator>, + T: Data, +{ + type Item = Event; + fn next(&mut self) -> Option { + for item in &mut self.input { + match item { + Event::Data(t, data) => { + if (self.param.fun)(data.clone()) { + return Some(Event::Data(t, data)); + } + } + Event::Watermark(t) => return Some(Event::Watermark(t)), + } + } + None + } +} diff --git a/arc-sys/dataflow/src/operators/kafka_sink.rs b/arc-sys/dataflow/src/operators/kafka_sink.rs new file mode 100644 index 000000000..146b7ed51 --- /dev/null +++ b/arc-sys/dataflow/src/operators/kafka_sink.rs @@ -0,0 +1,49 @@ +use std::time::Duration; + +use crate::data::Data; +use crate::event::Event; +use rdkafka::producer::FutureProducer; +use rdkafka::producer::FutureRecord; +use rdkafka::ClientConfig; + +pub struct KafkaSink<'a, T, K> { + producer: FutureProducer, + topic: &'a str, + fun: fn(T) -> K, +} + +/// `brokers` are a comma-separated list of brokers ("IP:PORT,IP:PORT,..."). +pub fn connect(brokers: &str) -> FutureProducer { + ClientConfig::new() + .set("bootstrap.servers", brokers) + .set("message.timeout.ms", "5000") + .create() + .expect("Failed to create Kafka producer client") +} + +impl<'a, T: Data, K: Data> KafkaSink<'a, T, K> { + pub fn new(brokers: &str, topic: &'a str, fun: fn(T) -> K) -> Self { + let producer = connect(brokers); + Self { + producer, + topic, + fun, + } + } + + pub async fn send(&mut self, iter: impl Iterator>) { + for event in iter { + if let Event::Data(time, data) = event { + let key = (self.fun)(data.clone()); + self.producer + .send( + FutureRecord::to(self.topic) + .payload(&serde_json::to_vec(&data).unwrap()) + .key(&serde_json::to_vec(&key).unwrap()), + Duration::from_secs(0), + ) + .await; + } + } + } +} diff --git a/arc-sys/dataflow/src/operators/kafka_source.rs b/arc-sys/dataflow/src/operators/kafka_source.rs new file mode 100644 index 000000000..dec69c5cd --- /dev/null +++ b/arc-sys/dataflow/src/operators/kafka_source.rs @@ -0,0 +1,83 @@ +use std::ops::Range; +use std::time::Duration; + +use rdkafka::client::Client; +use rdkafka::config::RDKafkaLogLevel; +use rdkafka::consumer::Consumer; +use rdkafka::consumer::ConsumerContext; +use rdkafka::consumer::Rebalance; +use rdkafka::consumer::StreamConsumer; +use rdkafka::error::KafkaError; +use rdkafka::message::BorrowedMessage; +use rdkafka::message::OwnedHeaders; +use rdkafka::producer::FutureProducer; +use rdkafka::producer::FutureRecord; +use rdkafka::producer::ProducerContext; +use rdkafka::ClientConfig; +use rdkafka::ClientContext; +use rdkafka::Message; +use rdkafka::Timestamp; +use rdkafka::TopicPartitionList; +use serde::Deserializer; +use tokio::pin; +use tokio_stream::Stream; +use tokio_stream::StreamExt; + +use crate::data::Data; +use crate::event::Event; +use crate::serde::deserialise; + +pub struct Context {} + +impl ClientContext for Context {} + +impl ConsumerContext for Context {} + +pub struct KafkaSource { + consumer: StreamConsumer, + _k: std::marker::PhantomData, + _t: std::marker::PhantomData, +} + +pub fn connect(brokers: &str) -> StreamConsumer { + ClientConfig::new() + .set("group.id", "arc-lang") + .set("bootstrap.servers", brokers) + .set("enable.partition.eof", "false") + .set("session.timeout.ms", "6000") + .set("enable.auto.commit", "true") + .set_log_level(RDKafkaLogLevel::Debug) + .create() + .expect("Failed to create Kafka consumer client") +} + +impl KafkaSource { + /// `brokers`: A comma-separated list of brokers ("IP:PORT,IP:PORT,..."). + /// `group_id`: The group ID to use for the consumer. + /// `topics`: A comma-separated list of topics to subscribe to. + pub fn new(brokers: &str, topic: &str, partitions: Range) -> Self { + let consumer = connect(brokers); + let mut topic_partition_list = TopicPartitionList::new(); + topic_partition_list.add_partition_range(topic, partitions.start, partitions.end); + consumer.assign(&topic_partition_list); + Self { + consumer, + _k: std::marker::PhantomData, + _t: std::marker::PhantomData, + } + } + + pub async fn recv<'a>(&mut self) -> Option<(Option, impl Iterator>)> { + let msg = self.consumer.recv().await.ok()?; + let key = if let Some(key) = msg.key() { + deserialise(key).ok() + } else { + None + }; + let payload = msg.payload()?; + let value = deserialise(payload).ok()?; + let Timestamp::CreateTime(time) = msg.timestamp() else { return None; }; + let time = time::OffsetDateTime::from_unix_timestamp(time).ok()?; + Some((key, std::iter::once(Event::Data(Some(time), value)))) + } +} diff --git a/arc-sys/dataflow/src/operators/map.rs b/arc-sys/dataflow/src/operators/map.rs new file mode 100644 index 000000000..f781f4d4e --- /dev/null +++ b/arc-sys/dataflow/src/operators/map.rs @@ -0,0 +1,67 @@ +use serde::Deserialize; +use serde::Serialize; + +use crate::data::Data; +use crate::operator::Operator; + +use crate::event::Event; + +pub struct Map { + input: Iter, + param: Param, + state: State, +} + +impl Map<(), I, O> { + pub const fn new(fun: fn(I) -> O) -> (Param, State) { + (Param { fun }, State {}) + } +} + +impl Map { + pub const fn process(input: Iter, params: Param, state: State) -> Self { + Self { + input, + param: params, + state, + } + } +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +pub struct State; + +#[derive(Copy, Clone)] +pub struct Param { + fun: fn(I) -> O, +} + +impl Operator for Map +where + Iter: Iterator>, + I: Data, + O: Data, +{ + type S = State; + fn state(self) -> Self::S { + State + } +} + +impl Iterator for Map +where + Iter: Iterator>, + I: Data, + O: Data, +{ + type Item = Event; + fn next(&mut self) -> Option { + self.input.next().map(|e| e.map(self.param.fun)) + } +} + +impl State { + pub const fn new(fun: fn(I) -> O) -> (Param, State) { + (Param { fun }, State {}) + } +} diff --git a/arc-sys/dataflow/src/operators/scan.rs b/arc-sys/dataflow/src/operators/scan.rs new file mode 100644 index 000000000..f82446d5f --- /dev/null +++ b/arc-sys/dataflow/src/operators/scan.rs @@ -0,0 +1,69 @@ +use serde::Deserialize; +use serde::Serialize; + +use crate::data::Data; +use crate::event::Event; +use crate::operator::Operator; + +pub struct Scan { + input: Iter, + params: Param, + state: State, +} + +impl Scan<(), I, O> { + pub const fn new(fun: fn(I, O) -> O, agg: O) -> (Param, State) { + (Param { fun }, State { agg }) + } +} + +impl Scan { + pub const fn process(input: Iter, params: Param, state: State) -> Self { + Self { + input, + params, + state, + } + } +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +pub struct State { + agg: O, +} + +#[derive(Copy, Clone)] +pub struct Param { + fun: fn(I, O) -> O, +} + +impl Iterator for Scan +where + Iter: Iterator>, + T: Data, + U: Data, +{ + type Item = Event; + fn next(&mut self) -> Option { + match self.input.next() { + Some(Event::Data(time, data)) => { + self.state.agg = (self.params.fun)(data, self.state.agg.clone()); + Some(Event::Data(time, self.state.agg.clone())) + } + Some(Event::Watermark(time)) => Some(Event::Watermark(time)), + None => None, + } + } +} + +impl Operator for Scan +where + Iter: Iterator>, + I: Data, + O: Data, +{ + type S = State; + fn state(self) -> Self::S { + self.state + } +} diff --git a/arc-sys/dataflow/src/operators/shuffle_sink.rs b/arc-sys/dataflow/src/operators/shuffle_sink.rs new file mode 100644 index 000000000..21ab3cc61 --- /dev/null +++ b/arc-sys/dataflow/src/operators/shuffle_sink.rs @@ -0,0 +1,62 @@ +use arrayvec::ArrayVec; +use futures::SinkExt; +use tokio::net::tcp::OwnedWriteHalf; +use tokio::net::TcpStream; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +use crate::data::Data; +use crate::event::Event; +use crate::event::NetEvent; +use std::collections::hash_map::DefaultHasher; +use std::hash::Hash; +use std::hash::Hasher; + +pub struct ShuffleSink { + sinks: ArrayVec>, N>, + fun: fn(T) -> K, +} + +impl ShuffleSink { + pub async fn new(addrs: [&str; N], fun: fn(T) -> K) -> Self { + let mut sinks = ArrayVec::>, N>::new(); + for addr in addrs.iter() { + sinks.push(connect(addr).await); + } + Self { sinks, fun } + } + + pub async fn send(&mut self, iter: impl Iterator>) { + for event in iter { + if let Event::Data(time, data) = event { + let key = (self.fun)(data.clone()); + let mut hasher = DefaultHasher::new(); + key.hash(&mut hasher); + let hash = hasher.finish() as usize; + let shard = hash % N; + self.sinks[shard] + .feed(NetEvent::Data(time, data)) + .await + .expect("send"); + } + } + } + + pub async fn send_epoch(&mut self, id: u64) { + for sink in self.sinks.iter_mut() { + sink.feed(NetEvent::Epoch(id)).await.expect("send"); + } + } +} + +async fn connect(addr: &str) -> Sender { + let mut stream = TcpStream::connect(addr).await.expect("Failed to connect"); + let (_, tx) = stream.into_split(); + let tx = FramedWrite::new(tx, LengthDelimitedCodec::new()); + let tx = Framed::<_, T, T, _>::new(tx, Json::::default()); + tx +} + +type Sender = Framed, T, T, Json>; diff --git a/arc-sys/dataflow/src/operators/shuffle_source.rs b/arc-sys/dataflow/src/operators/shuffle_source.rs new file mode 100644 index 000000000..096400394 --- /dev/null +++ b/arc-sys/dataflow/src/operators/shuffle_source.rs @@ -0,0 +1,62 @@ +use std::collections::hash_map::DefaultHasher; +use std::hash::Hash; +use std::hash::Hasher; +use std::marker::PhantomData; + +use arrayvec::ArrayVec; +use futures::Sink; +use futures::SinkExt; + +use futures::future::join_all; +use futures::stream::SelectAll; +use futures::stream::Stream; +use tokio::net::tcp::OwnedReadHalf; +use tokio::net::tcp::OwnedWriteHalf; +use tokio::net::TcpListener; +use tokio::net::TcpStream; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_stream::StreamExt; +use tokio_util::codec::FramedRead; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +use crate::data::Data; +use crate::event::Event; +use crate::event::NetEvent; + +pub struct ShuffleSource { + stream: SelectAll>>, + fun: fn(T) -> K, +} + +impl ShuffleSource { + pub async fn new(port: u16, num_connections: usize, fun: fn(T) -> K) -> Self { + let socket = tokio::net::TcpListener::bind(("0.0.0.0", port)) + .await + .unwrap(); + let connections = (0..num_connections) + .into_iter() + .map(|_| connect::>(&socket)); + let connections = futures::future::join_all(connections).await; + let stream = futures::stream::select_all(connections); + + Self { stream, fun } + } + + pub async fn recv(&mut self) -> Option<(K, impl Iterator>)> { + let NetEvent::Data(time, event) = self.stream.next().await?.ok()? else { panic!("TODO") }; + let key = (self.fun)(event.clone()); + Some((key, std::iter::once(Event::Data(time, event)))) + } +} + +async fn connect(socket: &TcpListener) -> Receiver { + let (mut stream, _) = socket.accept().await.expect("Failed to accept"); + let (rx, _) = stream.into_split(); + let rx = FramedRead::new(rx, LengthDelimitedCodec::new()); + let rx = Framed::<_, T, T, _>::new(rx, Json::::default()); + rx +} + +type Receiver = Framed, T, T, Json>; diff --git a/arc-sys/dataflow/src/operators/transform.rs b/arc-sys/dataflow/src/operators/transform.rs new file mode 100644 index 000000000..0ac47e48d --- /dev/null +++ b/arc-sys/dataflow/src/operators/transform.rs @@ -0,0 +1,38 @@ +use std::cell::UnsafeCell; + +use crate::iteratee::Iteratee; + +pub struct Transform { + inner: UnsafeCell>, +} + +impl Transform { + pub fn new() -> Self { + Self { + inner: UnsafeCell::new(None), + } + } + pub fn iteratee(&self) -> TransformIteratee { + TransformIteratee(unsafe { &mut *self.inner.get() }) + } + pub fn iterator(&self) -> TransformIterator { + TransformIterator(unsafe { &mut *self.inner.get() }) + } +} + +pub struct TransformIteratee<'i, T>(&'i mut Option); +pub struct TransformIterator<'i, T>(&'i mut Option); + +impl<'i, T> Iterator for TransformIterator<'i, T> { + type Item = T; + fn next(&mut self) -> Option { + self.0.take() + } +} + +impl<'i, T> Iteratee for TransformIteratee<'i, T> { + type Item = T; + fn feed(&mut self, item: Self::Item) { + *self.0 = Some(item); + } +} diff --git a/arc-sys/dataflow/src/operators/tumbling_window.rs b/arc-sys/dataflow/src/operators/tumbling_window.rs new file mode 100644 index 000000000..9b14162f8 --- /dev/null +++ b/arc-sys/dataflow/src/operators/tumbling_window.rs @@ -0,0 +1,117 @@ +use std::collections::BTreeMap; +use std::collections::HashMap; +use std::collections::VecDeque; +use std::marker::PhantomData; + +use time::Duration; +use time::OffsetDateTime; + +use crate::aggregator::Aggregator; +use crate::data::Data; +use crate::event::Event; +use crate::operator::Operator; + +pub struct TumblingWindow { + input: Iter, + param: Param, + state: State, +} + +pub struct State

{ + window: BTreeMap, + aggregates: Option<(BTreeMap, i64)>, +} + +pub struct Param { + length: i64, + aggregator: A, +} + +impl TumblingWindow +where + A: Aggregator, +{ + fn new( + input: Iter, + every: Duration, + length: Duration, + aggregator: A, + ) -> (Param, State) { + ( + Param { + length: length.whole_seconds(), + aggregator, + }, + State { + window: BTreeMap::new(), + aggregates: None, + }, + ) + } +} + +impl TumblingWindow +where + A: Aggregator, +{ + fn process(input: Iter, param: Param, state: State) -> Self { + Self { + input, + param, + state, + } + } +} + +impl Iterator for TumblingWindow +where + Iter: Iterator>, + A: Aggregator, +{ + type Item = Event; + + fn next(&mut self) -> Option { + match self.state.aggregates.as_mut() { + None => loop { + match self.input.next()? { + Event::Data(Some(time), data) => { + let slot = time.unix_timestamp() % self.param.length; + let agg = self.state.window.entry(slot).or_insert_with(A::identity); + *agg = A::merge(A::lift(data), agg.clone()); + continue; + } + Event::Data(None, _) => break None, + Event::Watermark(time) => { + let time = time.unix_timestamp(); + let slot = time % self.param.length; + let expired = self.state.window.split_off(&slot); + self.state.aggregates = Some((expired, time)); + } + } + }, + Some((aggs, time)) => { + if let Some((time, agg)) = aggs.pop_first() { + let time = Some( + OffsetDateTime::from_unix_timestamp(time * self.param.length).unwrap(), + ); + return Some(Event::Data(time, (A::lower)(agg))); + } else { + let time: OffsetDateTime = OffsetDateTime::from_unix_timestamp(*time).unwrap(); + self.state.aggregates = None; + return Some(Event::Watermark(time)); + } + } + } + } +} + +impl Operator for TumblingWindow +where + Iter: Iterator>, + A: Aggregator, +{ + type S = (); + fn state(self) -> Self::S { + () + } +} diff --git a/arc-sys/dataflow/src/operators/union.rs b/arc-sys/dataflow/src/operators/union.rs new file mode 100644 index 000000000..5b9229ea4 --- /dev/null +++ b/arc-sys/dataflow/src/operators/union.rs @@ -0,0 +1,98 @@ +use serde::Deserialize; +use serde::Serialize; +use time::OffsetDateTime; + +use crate::data::Data; +use crate::event::Event; +use crate::operator::Operator; + +pub struct Union { + input0: Iter0, + input1: Iter1, + params: Param, + state: State, +} + +impl Union<(), ()> { + pub const fn new() -> (Param, State) { + (Param, State { watermark: None }) + } +} + +impl Union { + pub const fn process(input0: Iter0, input1: Iter1, params: Param, state: State) -> Self { + Self { + input0, + input1, + params, + state, + } + } +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +pub struct State { + watermark: Option, +} + +#[derive(Clone, Copy)] +pub struct Param; + +// The latest watermark. +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +pub enum Latest { + Iter0(OffsetDateTime), + Iter1(OffsetDateTime), +} + +impl Iterator for Union +where + I: Data, + Iter0: Iterator>, + Iter1: Iterator>, +{ + type Item = Event; + + fn next(&mut self) -> Option { + loop { + match self.input0.next() { + Some(Event::Watermark(ta)) => match self.state.watermark { + Some(Latest::Iter1(tb)) => { + if ta > tb { + self.state.watermark = Some(Latest::Iter0(ta)); + return Some(Event::Watermark(tb)); + } + } + _ => self.state.watermark = Some(Latest::Iter0(ta)), + }, + Some(Event::Data(t0, data)) => return Some(Event::Data(t0, data)), + None => {} + } + match self.input1.next() { + Some(Event::Watermark(tb)) => match self.state.watermark { + Some(Latest::Iter0(ta)) => { + if tb > ta { + self.state.watermark = Some(Latest::Iter1(tb)); + return Some(Event::Watermark(ta)); + } + } + _ => self.state.watermark = Some(Latest::Iter1(tb)), + }, + Some(Event::Data(t1, data)) => return Some(Event::Data(t1, data)), + None => return None, + } + } + } +} + +impl Operator for Union +where + I: Data, + Iter0: Iterator>, + Iter1: Iterator>, +{ + type S = State; + fn state(self) -> Self::S { + self.state + } +} diff --git a/arc-sys/dataflow/src/operators/worker_sink.rs b/arc-sys/dataflow/src/operators/worker_sink.rs new file mode 100644 index 000000000..dc0eb10f3 --- /dev/null +++ b/arc-sys/dataflow/src/operators/worker_sink.rs @@ -0,0 +1,32 @@ +use futures::SinkExt; +use tokio::io::AsyncWrite; +use tokio::io::Stdout; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +use crate::event::WorkerEvent; + +pub struct WorkerSink { + tx: Sender, +} + +impl WorkerSink { + pub fn new() -> Self { + Self { tx: connect() } + } + + pub async fn send(&mut self, event: WorkerEvent) { + self.tx.send(event).await.expect("send"); + } +} + +fn connect() -> Sender { + let tx = tokio::io::stdout(); + let tx = FramedWrite::new(tx, LengthDelimitedCodec::new()); + let tx = Framed::<_, T, T, _>::new(tx, Json::::default()); + tx +} + +type Sender = Framed, T, T, Json>; diff --git a/arc-sys/dataflow/src/operators/worker_source.rs b/arc-sys/dataflow/src/operators/worker_source.rs new file mode 100644 index 000000000..33ee241c0 --- /dev/null +++ b/arc-sys/dataflow/src/operators/worker_source.rs @@ -0,0 +1,33 @@ +use futures::StreamExt; +use tokio::io::AsyncRead; +use tokio::io::Stdin; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_util::codec::FramedRead; +use tokio_util::codec::LengthDelimitedCodec; + +use crate::event::PipelineEvent; +use crate::event::WorkerEvent; + +pub struct WorkerSource { + rx: Receiver, +} + +impl WorkerSource { + pub fn new() -> Self { + Self { rx: connect() } + } + + pub async fn recv(&mut self) -> Option { + self.rx.next().await?.ok() + } +} + +fn connect() -> Receiver { + let rx = tokio::io::stdin(); + let rx = FramedRead::new(rx, LengthDelimitedCodec::new()); + let rx = Framed::<_, T, T, _>::new(rx, Json::::default()); + rx +} + +type Receiver = Framed, T, T, Json>; diff --git a/arc-sys/dataflow/src/primitives.rs b/arc-sys/dataflow/src/primitives.rs new file mode 100644 index 000000000..358e1aa13 --- /dev/null +++ b/arc-sys/dataflow/src/primitives.rs @@ -0,0 +1,11 @@ +pub fn assert(b: bool) { + assert!(b); +} + +pub fn panic(s: Str) { + panic!("{}", s.as_str()) +} + +pub fn print(s: Str) { + tracing::info!("{}", s.as_str()) +} diff --git a/arc-sys/dataflow/src/runtime.rs b/arc-sys/dataflow/src/runtime.rs new file mode 100644 index 000000000..15b2fd05f --- /dev/null +++ b/arc-sys/dataflow/src/runtime.rs @@ -0,0 +1,58 @@ +use std::sync::Arc; +use std::sync::Mutex; + +pub struct Runtime { + #[cfg(feature = "thread-pinning")] + topology: Arc>, + threads: Vec>, +} + +impl Runtime { + pub fn new() -> Self { + Self { + #[cfg(feature = "thread-pinning")] + topology: Arc::new(Mutex::new(Topology::new())), + threads: Vec::new(), + } + } + + pub fn spawn(&mut self, instance: Fut, cpu_id: usize) -> &mut Self + where + Fut: std::future::Future + Send + 'static, + { + #[cfg(feature = "thread-pinning")] + let topology = self.topology.clone(); + self.threads.push(std::thread::spawn(move || { + #[cfg(feature = "thread-pinning")] + bind_thread_to_cpu(cpu_id, topology); + tokio::runtime::Builder::new_current_thread() + .build() + .unwrap() + .block_on(tokio::task::LocalSet::new().run_until(instance)); + })); + self + } +} + +#[cfg(feature = "thread-pinning")] +fn bind_thread_to_cpu(cpu_id: usize, topology: Arc>) { + cfg_if::cfg_if! { + if #[cfg(target_os = "linux")] { + let thread_id = unsafe { libc::pthread_self() }; + let mut topology = topology.lock().unwrap(); + let cpus = topology.objects_with_type(&ObjectType::Core).unwrap(); + let cpuset = cpus.get(cpu_id).expect("Core not found").cpuset().unwrap(); + topology + .set_cpubind_for_thread(thread_id, cpuset, CPUBIND_THREAD) + .unwrap(); + } + } +} + +impl Drop for Runtime { + fn drop(&mut self) { + for thread in self.threads.drain(..) { + thread.join().expect("Failed to join thread"); + } + } +} diff --git a/arc-sys/dataflow/src/serde.rs b/arc-sys/dataflow/src/serde.rs new file mode 100644 index 000000000..4e67b6e76 --- /dev/null +++ b/arc-sys/dataflow/src/serde.rs @@ -0,0 +1,21 @@ +use std::cell::UnsafeCell; +use std::collections::HashMap; +use std::collections::HashSet; + +use serde::Deserialize; +use serde::Serialize; + +pub trait Serde: Serialize + for<'a> Deserialize<'a> {} +impl Serde for T where T: Serialize + for<'a> Deserialize<'a> {} + +pub fn serialise(data: T) -> Result, serde_json::Error> { + let mut buffer = Vec::new(); + let mut serializer = serde_json::Serializer::new(&mut buffer); + data.serialize(&mut serializer); + Ok(buffer) +} + +pub fn deserialise<'de, T: Deserialize<'de>>(bytes: &'de [u8]) -> Result { + let mut deserializer = serde_json::Deserializer::from_slice(bytes); + T::deserialize(&mut deserializer) +} diff --git a/arc-sys/dataflow/src/state.rs b/arc-sys/dataflow/src/state.rs new file mode 100644 index 000000000..48707a990 --- /dev/null +++ b/arc-sys/dataflow/src/state.rs @@ -0,0 +1,59 @@ +use crate::serde::serialise; +use crate::serde::Serde; +use std::collections::HashMap; +use std::hash::Hash; +use std::ops::Deref; +use std::ops::DerefMut; + +use futures::Future; +use serde::de::DeserializeOwned; +use serde::Serialize; +use sled::Batch; + +use crate::data::Data; +use crate::data::Key; +use crate::db::Database; +use crate::utils::serde::ser; + +#[derive(Clone)] +pub struct State { + name: String, + db: Database, + cache: HashMap, + default: T, +} + +impl State { + pub fn new(name: impl ToString, db: Database, default: T) -> Self { + Self { + name: name.to_string(), + db: db.into(), + cache: HashMap::new(), + default, + } + } + pub fn get(&mut self, key: K) -> &mut T { + let default = &self.default; + self.cache.entry(key).or_insert_with(|| default.clone()) + } + pub fn batch(&self) -> impl Iterator { + self.cache.iter() + } + pub async fn persist(&mut self) { + let name = &self.name; + let batch = self.cache.iter().filter_map(|(k, v)| { + serialise((name, k)) + .and_then(|k| Ok((k, serialise(v)?))) + .ok() + }); + match &self.db { + #[cfg(feature = "tikv")] + Database::Remote(db) => db.batch_put(batch).await.expect("tikv: failed to insert"), + Database::Local(db) => { + for (k, v) in batch { + db.insert(k, v).expect("sled: failed to insert"); + } + } + } + } +} diff --git a/arc-runtime/src/timer.rs b/arc-sys/dataflow/src/timer.rs similarity index 97% rename from arc-runtime/src/timer.rs rename to arc-sys/dataflow/src/timer.rs index a26d3f440..7675ea676 100644 --- a/arc-runtime/src/timer.rs +++ b/arc-sys/dataflow/src/timer.rs @@ -1,16 +1,14 @@ #![allow(deprecated)] +use uuid::Uuid; use wheel::wheels::quad_wheel::QuadWheelWithOverflow; use wheel::wheels::Skip; use wheel::UuidOnlyTimerEntry as Entry; -use uuid::Uuid; - -use crate::data::DynSharable; use std::collections::HashMap; use std::time::Duration; -/// An event timer +/// A timer pub struct Timer { pub wheel: QuadWheelWithOverflow, pub callbacks: HashMap, diff --git a/arc-sys/dataflow/src/utils/serde.rs b/arc-sys/dataflow/src/utils/serde.rs new file mode 100644 index 000000000..bcf630d55 --- /dev/null +++ b/arc-sys/dataflow/src/utils/serde.rs @@ -0,0 +1,10 @@ +use serde::de::DeserializeOwned; +use serde::ser::Serialize; + +pub fn ser(v: T) -> Result, serde_json::Error> { + serde_json::to_vec(&v) +} + +pub fn deser(v: Option>) -> Result, serde_json::Error> { + v.map(|v| serde_json::from_slice(&v)).transpose() +} diff --git a/arc-sys/dataflow/tests/basic.rs b/arc-sys/dataflow/tests/basic.rs new file mode 100644 index 000000000..1b333d395 --- /dev/null +++ b/arc-sys/dataflow/tests/basic.rs @@ -0,0 +1,13 @@ +#![allow(unused)] + +use dataflow::prelude::*; + +#[rewrite] +fn plus_one(x: i32) -> i32 { + x + 1 +} + +#[rewrite] +fn main() { + plus_one(1); +} diff --git a/arc-sys/dataflow/tests/closures.rs b/arc-sys/dataflow/tests/closures.rs new file mode 100644 index 000000000..f4278ed5c --- /dev/null +++ b/arc-sys/dataflow/tests/closures.rs @@ -0,0 +1,16 @@ +use dataflow::prelude::*; + +#[rewrite] +fn f(a: i32) -> i32 { + a + a +} + +#[test] +fn test() { + let x0: fn(i32) -> i32 = f; + let x1: fn(i32) -> i32 = f; + x0(1); + x1(1); + f(1); + f(1); +} diff --git a/arc-sys/dataflow/tests/erased.rs b/arc-sys/dataflow/tests/erased.rs new file mode 100644 index 000000000..b956a150b --- /dev/null +++ b/arc-sys/dataflow/tests/erased.rs @@ -0,0 +1,38 @@ +// TODO: `serde_state` does not support type erasure. +// +// #![allow(unused)] +// #[allow(non_camel_case_types)] +// mod test_closure { +// +// use arc_runtime::prelude::*; +// +// declare_functions!(f); +// +// #[rewrite] +// pub struct Closure { +// pub fun: Function<(i32, Erased), i32>, +// pub env: Erased, +// } +// +// #[rewrite(erase)] +// pub struct Env { +// pub b: i32, +// } +// +// #[rewrite] +// fn f(a: i32, env: Erased) -> i32 { +// let env: Env = unerase!(env, Env); +// let b: i32 = env.b; +// a + b +// } +// +// #[rewrite(main)] +// #[test] +// fn main() { +// let x: function!((i32, Erased) -> i32) = function!(f); +// let env: Env = new!(Env { b: 1 }); +// let env: Erased = erase!(env, Env); +// let y: i32 = call_indirect!(x(1, env)); +// let y: i32 = call_indirect!(x(1, env,)); +// } +// } diff --git a/arc-sys/dataflow/tests/externs.rs b/arc-sys/dataflow/tests/externs.rs new file mode 100644 index 000000000..68ffabf99 --- /dev/null +++ b/arc-sys/dataflow/tests/externs.rs @@ -0,0 +1,30 @@ +#![allow(unused)] + +use dataflow::prelude::*; + +#[rewrite(unmangled = "identity")] +fn identity_i32(x: i32) -> i32 {} + +#[rewrite(unmangled = "identity")] +fn identity_i64(x: i64) -> i64 {} + +#[rewrite(unmangled = "Foo::identity")] +fn identity_foo(x: i32) -> i32 {} + +// TODO: `i128` and `u128` are not yet supported by `serde_state` +// #[rewrite(unmangled = "identity")] +// fn identity_i128(x: i128) -> i128 {} + +#[rewrite] +fn identity(x: T) -> T { + x +} + +struct Foo {} + +impl Foo { + #[rewrite] + fn identity(x: i32) -> i32 { + x + } +} diff --git a/arc-sys/dataflow/tests/functions.rs b/arc-sys/dataflow/tests/functions.rs new file mode 100644 index 000000000..186542d77 --- /dev/null +++ b/arc-sys/dataflow/tests/functions.rs @@ -0,0 +1,20 @@ +#![allow(dead_code)] +#![allow(clippy::let_unit_value)] + +use dataflow::prelude::*; + +#[rewrite] +fn foo(x: i32) { + let a: i32 = x - 1; + if x == 0 { + println!("Hello, world!"); + } else { + call!(foo(a)) + } +} + +fn main() { + let x: Str = call!(Str_from_str("Hello, world!")); + let y: &str = "Hello, world!"; + let _z: unit = call!(Str_push_str(x, y)); +} diff --git a/arc-runtime/tests/generic_enum_rewrite.rs b/arc-sys/dataflow/tests/generic_enum_rewrite.rs similarity index 63% rename from arc-runtime/tests/generic_enum_rewrite.rs rename to arc-sys/dataflow/tests/generic_enum_rewrite.rs index 5d5c19a04..b41b96b35 100644 --- a/arc-runtime/tests/generic_enum_rewrite.rs +++ b/arc-sys/dataflow/tests/generic_enum_rewrite.rs @@ -1,14 +1,14 @@ #![allow(unused)] -use arc_runtime::prelude::*; +use dataflow::prelude::*; #[rewrite] -pub enum Foo { +enum Foo { X(A), } #[rewrite] -pub enum Bar { +enum Bar { X(A), Y(B), } diff --git a/arc-sys/dataflow/tests/generic_struct_rewrite.rs b/arc-sys/dataflow/tests/generic_struct_rewrite.rs new file mode 100644 index 000000000..5276e4538 --- /dev/null +++ b/arc-sys/dataflow/tests/generic_struct_rewrite.rs @@ -0,0 +1,16 @@ +#![allow(unused)] + +use dataflow::prelude::*; + +#[rewrite] +struct Foo { + a: A, +} + +#[rewrite] +struct Bar { + a: A, + b: B, +} + +type Baz = Bar, Bar>; diff --git a/arc-runtime/tests/prost.rs b/arc-sys/dataflow/tests/prost.rs similarity index 100% rename from arc-runtime/tests/prost.rs rename to arc-sys/dataflow/tests/prost.rs diff --git a/arc-sys/dataflow/tests/serde.rs b/arc-sys/dataflow/tests/serde.rs new file mode 100644 index 000000000..aed13ecd1 --- /dev/null +++ b/arc-sys/dataflow/tests/serde.rs @@ -0,0 +1,24 @@ +use dataflow::prelude::*; + +#[derive(Serialize, Deserialize, Debug)] +struct Point { + x: i32, + y: i32, +} + +#[test] +fn serde() { + let point = Point { x: 1, y: 2 }; + + // Convert the Point to a JSON string. + let serialized = serde_json::to_string(&point).unwrap(); + + // Prints serialized = {"x":1,"y":2} + println!("serialized = {}", serialized); + + // Convert the JSON string back to a Point. + let deserialized: Point = serde_json::from_str(&serialized).unwrap(); + + // Prints deserialized = Point { x: 1, y: 2 } + println!("deserialized = {:?}", deserialized); +} diff --git a/arc-sys/dataflow/tests/types.rs b/arc-sys/dataflow/tests/types.rs new file mode 100644 index 000000000..a1764866a --- /dev/null +++ b/arc-sys/dataflow/tests/types.rs @@ -0,0 +1,146 @@ +mod basic1 { + use dataflow::prelude::*; + + #[rewrite] + struct Point { + x: i32, + y: i32, + } + + #[rewrite] + enum Foo { + Bar(i32), + Baz(f32), + } +} + +mod basic2 { + use dataflow::prelude::*; + + #[rewrite] + struct A { + b: B, + } + + #[rewrite] + struct B { + c: i32, + } +} + +mod basic3 { + use dataflow::prelude::*; + + #[rewrite] + enum A { + B(B), + C(C), + } + + #[rewrite] + struct B { + v: i32, + } + + #[rewrite] + struct C {} +} + +mod list { + use dataflow::prelude::*; + + #[rewrite] + enum List { + Cons(Cons), + Nil(unit), + } + + #[rewrite] + struct Cons { + v: i32, + t: List, + } + + #[test] + fn test() { + let l = enwrap!(List::Nil, unit); + let _x = is!(List::Cons, l); + let h = new!(Cons { v: 5, t: l }); + let l = enwrap!(List::Cons, h); + let h = unwrap!(List::Cons, l); + assert_eq!(h.v, 5); + } +} + +mod structs { + use dataflow::prelude::*; + + #[rewrite] + struct Foo { + a: i32, + b: Bar, + } + + #[rewrite] + struct Bar {} + + #[test] + fn test() { + let x0 = new!(Bar {}); + let _f = new!(Foo { a: 0, b: x0 }); + } +} + +mod unit { + use dataflow::prelude::*; + + #[rewrite] + enum Foo { + Bar(unit), + } + + #[test] + fn test() { + let _x = enwrap!(Foo::Bar, unit); + } +} + +mod compact_structs { + use dataflow::prelude::*; + + #[rewrite(compact)] + struct CompactFoo { + a: i32, + b: CompactBar, + } + + #[rewrite(compact)] + struct CompactBar {} + + #[test] + fn test() { + let x0 = new!(CompactBar {}); + let _f = new!(CompactFoo { a: 0, b: x0 }); + } +} + +mod compact_enums { + use dataflow::prelude::*; + + #[rewrite(compact)] + enum CompactFoo { + Bar(i32), + Baz(CompactBaz), + } + + #[rewrite(compact)] + enum CompactBaz { + Qux(i32), + } + + #[test] + fn test() { + enwrap!(CompactFoo::Bar, 1); + enwrap!(CompactFoo::Baz, enwrap!(CompactBaz::Qux, 2)); + } +} diff --git a/arc-sys/shared/Cargo.toml b/arc-sys/shared/Cargo.toml new file mode 100644 index 000000000..25c3f1e5c --- /dev/null +++ b/arc-sys/shared/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "shared" +version = "0.1.0" +edition = "2021" + +[dependencies] +const_format = { version = "0.2.30" } +halfbrown = { version = "0.1.18", features = ["serde"] } +raw-cpuid = { version = "10.6.0", features = ["serde"] } +serde = { version = "1.0.152", features = ["derive", "rc"] } +serde_json = { version = "1.0.91", features = ["preserve_order"] } +tokio = { version = "1.24.2", features = ["net", "process"] } +tokio-serde = { version = "0.8.0", features = ["json"] } +tokio-util = { version = "0.7.4", features = ["full"] } +console-subscriber = { version = "0.1.8" } +tracing-subscriber = { version = "0.3.16" } +tracing = { version = "0.1.37" } +indexmap = { version = "1.9.2", features = ["serde"] } diff --git a/arc-sys/shared/src/api.rs b/arc-sys/shared/src/api.rs new file mode 100644 index 000000000..81e68554d --- /dev/null +++ b/arc-sys/shared/src/api.rs @@ -0,0 +1,117 @@ +use halfbrown::HashMap; +use indexmap::IndexMap; +use std::net::SocketAddr; +use std::ops::Range; +use std::sync::Arc; + +use serde::Deserialize; +use serde::Serialize; + +/// Messages that can be sent to a worker. +#[derive(Clone, Debug, Deserialize, Serialize)] +pub enum WorkerAPI { + /// Execute a program on the worker. + Execute { + name: Arc, + binary: Arc>, + }, + /// Shutdown the worker. + Shutdown, +} + +/// Messages that can be sent to a coordinator. +#[derive(Clone, Debug, Deserialize, Serialize)] +pub enum CoordinatorAPI { + /// Register a new worker. + RegisterWorker { arch: Architecture }, + /// Register a new client. + RegisterClient, + /// Post a new query. + Query { source: String, config: QueryConfig }, + /// Shutdown the coordinator (and consequently the whole system). + Shutdown, +} + +/// Messages that can be sent to a client. +#[derive(Clone, Debug, Deserialize, Serialize)] +pub enum ClientAPI { + /// Request to execute query. + Query { source: String }, + /// Result of the query. + QueryResponse { data: String }, +} + +/// Responses that can be sent to an interpreter. +#[derive(Clone, Debug, Deserialize, Serialize)] +pub enum InterpreterAPI { + /// Begin interpreting file. + InterpretFile { path: String }, + /// Result of a query. + QueryResponse { data: String }, +} + +/// The config of a query +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct QueryConfig { + pub parallelism: usize, + pub state_backend: StateBackend, +} + +/// The state backend to use for a query. +#[derive(Clone, Debug, Deserialize, Serialize)] +pub enum StateBackend { + Sled, + TiKV, +} + +/// Requests that can be sent to a pipeline. +#[derive(Clone, Debug, Deserialize, Serialize)] +pub enum DataflowAPI { + /// Shutdown the pipeline. + Shutdown, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Architecture { + pub target_triple: String, + pub num_cpus: usize, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct Graph { + pub nodes: IndexMap, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub enum Node { + Filter { + input: String, // Input stream variable name + fun: String, // Predicate function name + }, + Map { + input: String, // Input stream variable name + fun: String, // Mapping function name + }, + Source { + key_type: String, // Key type name + data_type: String, // Data type name + topic: String, // Kafka topic + num_partitions: u32, // Partitions to consume from. + }, + Sink { + input: String, // Input stream variable name + topic: String, // Kafka topic + fun: String, // Key extractor function name + }, + Group { + input: String, // Input stream + fun: String, // Key extractor + }, + Union { + input0: String, // Input stream 0 variable name + input1: String, // Input stream 1 variable name + }, + Window { + input: String, // Input stream variable name + }, +} diff --git a/arc-sys/shared/src/config.rs b/arc-sys/shared/src/config.rs new file mode 100644 index 000000000..7ee8a53dd --- /dev/null +++ b/arc-sys/shared/src/config.rs @@ -0,0 +1,9 @@ +use const_format::formatcp; + +pub const DEFAULT_COORDINATOR_TCP_PORT: u16 = 8000; +pub const DEFAULT_COORDAINTOR_REST_PORT: u16 = 8001; +pub const DEFAULT_BROKER_PORT: u16 = 9092; + +pub const DEFAULT_COORDINATOR_TCP_ADDR: &str = + formatcp!("localhost:{}", DEFAULT_COORDINATOR_TCP_PORT); +pub const DEFAULT_COORDINATOR_BROKER_ADDR: &str = formatcp!("localhost:{}", DEFAULT_BROKER_PORT); diff --git a/arc-sys/shared/src/io.rs b/arc-sys/shared/src/io.rs new file mode 100644 index 000000000..24d3a5797 --- /dev/null +++ b/arc-sys/shared/src/io.rs @@ -0,0 +1,10 @@ +use tokio::process::ChildStdin; +use tokio::process::ChildStdout; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_util::codec::FramedRead; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +pub type Receiver = Framed, I, I, Json>; +pub type Sender = Framed, O, O, Json>; diff --git a/arc-sys/shared/src/lib.rs b/arc-sys/shared/src/lib.rs new file mode 100644 index 000000000..3b959df5c --- /dev/null +++ b/arc-sys/shared/src/lib.rs @@ -0,0 +1,8 @@ +#![allow(unused)] + +pub mod api; +pub mod config; +pub mod io; +pub mod socket; +pub mod tcp; +pub mod tracing; diff --git a/arc-sys/shared/src/socket.rs b/arc-sys/shared/src/socket.rs new file mode 100644 index 000000000..8dbaaee11 --- /dev/null +++ b/arc-sys/shared/src/socket.rs @@ -0,0 +1,7 @@ +use std::net::SocketAddr; +use std::net::ToSocketAddrs; + +pub fn parse_addr(s: &str) -> Result { + s.to_socket_addrs() + .map(|mut addrs| addrs.next().expect("no address")) +} diff --git a/arc-sys/shared/src/tcp.rs b/arc-sys/shared/src/tcp.rs new file mode 100644 index 000000000..fb47270ce --- /dev/null +++ b/arc-sys/shared/src/tcp.rs @@ -0,0 +1,11 @@ +use serde::de::DeserializeOwned; +use tokio::net::tcp::OwnedReadHalf; +use tokio::net::tcp::OwnedWriteHalf; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_util::codec::FramedRead; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +pub type Receiver = Framed, I, I, Json>; +pub type Sender = Framed, O, O, Json>; diff --git a/arc-sys/shared/src/tracing.rs b/arc-sys/shared/src/tracing.rs new file mode 100644 index 000000000..91a153377 --- /dev/null +++ b/arc-sys/shared/src/tracing.rs @@ -0,0 +1,28 @@ +use std::time::Duration; + +use tracing::log::LevelFilter; +use tracing::Level; +use tracing_subscriber::filter::Directive; +use tracing_subscriber::prelude::*; +use tracing_subscriber::EnvFilter; + +pub fn init() { + // let console_layer = console_subscriber::ConsoleLayer::builder() + // .server_addr(([127, 0, 0, 1], 5555)) + // .spawn(); + + let fmt_layer = tracing_subscriber::fmt::layer() + .compact() + .with_filter(EnvFilter::from_default_env().add_directive(Directive::from(Level::INFO))); + // .with_target(true) + // .with_thread_ids(true) + // .with_line_number(true) + // .with_file(true) + // .with_thread_names(true) + // .with_ansi(true); + + tracing_subscriber::registry() + // .with(console_layer) + .with(fmt_layer) + .init(); +} diff --git a/arc-sys/worker/Cargo.toml b/arc-sys/worker/Cargo.toml new file mode 100644 index 000000000..4fdbe9a1e --- /dev/null +++ b/arc-sys/worker/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "worker" +version = "0.1.0" +edition = "2021" + +[dependencies] +shared = { path = "../shared" } +axum = { version = "0.6.3" } +clap = { version = "4.1.3", features = ["derive"] } +futures = { version = "0.3.25" } +serde = { version = "1.0.152", features = ["derive"] } +tokio = { version = "1.24.2", features = ["full"] } +tokio-futures = { version = "0.0.0" } +tokio-serde = { version = "0.8.0", features = ["json"] } +tokio-stream = { version = "0.1.11" } +tokio-util = { version = "0.7.4", features = ["full"] } +tracing = { version = "0.1.37" } +raw-cpuid = { version = "10.6.0", features = ["serde"] } +num_cpus = { version = "1.15.0" } diff --git a/arc-sys/worker/build.rs b/arc-sys/worker/build.rs new file mode 100644 index 000000000..3a52fcaef --- /dev/null +++ b/arc-sys/worker/build.rs @@ -0,0 +1,9 @@ +fn main() { + if std::env::var("IGNORE_WORKER_BUILD_SCRIPT").is_ok() { + return; + } + println!( + "cargo:rustc-env=TARGET={}", + std::env::var("TARGET").unwrap() + ); +} diff --git a/arc-sys/worker/src/coordinator_connector.rs b/arc-sys/worker/src/coordinator_connector.rs new file mode 100644 index 000000000..0eea50042 --- /dev/null +++ b/arc-sys/worker/src/coordinator_connector.rs @@ -0,0 +1,72 @@ +use std::net::SocketAddr; + +use futures::SinkExt; +use shared::api::Architecture; +use shared::api::CoordinatorAPI; +use tokio::net::TcpStream; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_util::codec::FramedRead; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +use crate::coordinator_receiver::CoordinatorReceiver; +use crate::coordinator_sender::CoordinatorSender; + +use super::server::Server; + +struct Actor { + addr: SocketAddr, + server: Server, +} + +impl Actor { + fn new(addr: SocketAddr, server: Server) -> Self { + Self { addr, server } + } + + async fn run(mut self) { + tracing::info!("Connecting to {}", self.addr); + loop { + match TcpStream::connect(self.addr).await { + Ok(msg) => { + self.handle(msg).await; + break; + } + Err(err) => { + tracing::error!("Connection failed: {}", err); + tokio::time::sleep(tokio::time::Duration::from_secs(1)).await; + } + } + } + } + + async fn handle(&mut self, stream: TcpStream) { + let (rx, tx) = stream.into_split(); + let rx = FramedRead::new(rx, LengthDelimitedCodec::new()); + let rx = Framed::new(rx, Json::default()); + let tx = FramedWrite::new(tx, LengthDelimitedCodec::new()); + let mut tx = Framed::new(tx, Json::default()); + tx.send(CoordinatorAPI::RegisterWorker { + arch: Architecture { + target_triple: crate::TARGET.to_string(), + num_cpus: num_cpus::get(), + }, + }) + .await + .expect("Failed to send register message"); + tracing::info!("Handshake successful"); + + self.server.connect(CoordinatorSender::start(tx)).await; + CoordinatorReceiver::start(rx, self.server.clone()); + } +} + +pub struct CoordinatorConnector; + +impl CoordinatorConnector { + pub fn start(addr: SocketAddr, server: Server) -> Self { + tokio::spawn(Actor::new(addr, server).run()); + Self + } +} diff --git a/arc-sys/worker/src/coordinator_receiver.rs b/arc-sys/worker/src/coordinator_receiver.rs new file mode 100644 index 000000000..fcf49a045 --- /dev/null +++ b/arc-sys/worker/src/coordinator_receiver.rs @@ -0,0 +1,50 @@ +use std::sync::Arc; + +use shared::api::WorkerAPI; +use shared::tcp; +use tokio_stream::StreamExt; + +use crate::server::Server; + +struct Actor { + mailbox: tcp::Receiver, + server: Server, +} + +impl Actor { + fn new(mailbox: tcp::Receiver, server: Server) -> Self { + Self { mailbox, server } + } + + async fn run(mut self) { + while let Some(msg) = self.mailbox.next().await { + match msg { + Ok(msg) => self.handle(msg).await, + Err(err) => println!("Error: {}", err), + } + } + } + + async fn handle(&mut self, msg: WorkerAPI) { + match msg { + WorkerAPI::Execute { name, binary } => { + self.server + .execute( + Arc::try_unwrap(name).unwrap(), + Arc::try_unwrap(binary).unwrap(), + ) + .await + } + WorkerAPI::Shutdown => self.server.shutdown().await, + } + } +} + +pub struct CoordinatorReceiver; + +impl CoordinatorReceiver { + pub fn start(rx: tcp::Receiver, server: Server) -> Self { + tokio::spawn(Actor::new(rx, server).run()); + Self + } +} diff --git a/arc-sys/worker/src/coordinator_sender.rs b/arc-sys/worker/src/coordinator_sender.rs new file mode 100644 index 000000000..11f52d004 --- /dev/null +++ b/arc-sys/worker/src/coordinator_sender.rs @@ -0,0 +1,45 @@ +use futures::SinkExt; +use shared::api::CoordinatorAPI; +use shared::tcp; +use tokio::sync::mpsc; + +struct Actor { + mailbox: mpsc::Receiver, + tx: tcp::Sender, +} + +#[allow(unused)] +enum Message { + Cast(CoordinatorAPI), +} + +impl Actor { + fn new(mailbox: mpsc::Receiver, tx: tcp::Sender) -> Self { + Self { mailbox, tx } + } + + async fn run(mut self) { + while let Some(msg) = self.mailbox.recv().await { + self.handle(msg).await; + } + } + + async fn handle(&mut self, msg: Message) { + match msg { + Message::Cast(msg) => { + self.tx.send(msg).await.expect("failed sending message"); + } + } + } +} + +#[derive(Clone, Debug)] +pub struct CoordinatorSender(mpsc::Sender); + +impl CoordinatorSender { + pub fn start(tx_tcp: tcp::Sender) -> Self { + let (tx, rx) = mpsc::channel(10); + tokio::spawn(Actor::new(rx, tx_tcp).run()); + Self(tx) + } +} diff --git a/arc-sys/worker/src/dataflow_receiver.rs b/arc-sys/worker/src/dataflow_receiver.rs new file mode 100644 index 000000000..0b83a29eb --- /dev/null +++ b/arc-sys/worker/src/dataflow_receiver.rs @@ -0,0 +1,42 @@ +use futures::StreamExt; +use shared::api::DataflowAPI; +use shared::io; + +use crate::server::Server; + +#[allow(unused)] +struct Actor { + mailbox: io::Receiver, + id: u64, + server: Server, +} + +impl Actor { + fn new(mailbox: io::Receiver, id: u64, server: Server) -> Self { + Self { mailbox, id, server } + } + + async fn run(mut self) { + while let Some(msg) = self.mailbox.next().await { + match msg { + Ok(msg) => self.handle(msg).await, + Err(_) => todo!(), + } + } + } + + async fn handle(&mut self, msg: DataflowAPI) { + match msg { + DataflowAPI::Shutdown => {} + } + } +} + +pub struct DataflowReceiver; + +impl DataflowReceiver { + pub fn start(rx: io::Receiver, id: u64, server: Server) -> Self { + tokio::spawn(Actor::new(rx, id, server).run()); + Self + } +} diff --git a/arc-sys/worker/src/dataflow_sender.rs b/arc-sys/worker/src/dataflow_sender.rs new file mode 100644 index 000000000..8242e5153 --- /dev/null +++ b/arc-sys/worker/src/dataflow_sender.rs @@ -0,0 +1,45 @@ +use futures::SinkExt; +use shared::api::DataflowAPI; +use shared::io; +use tokio::sync::mpsc; + +struct Actor { + mailbox: mpsc::Receiver, + tx: io::Sender, +} + +#[allow(unused)] +enum Message { + Cast(DataflowAPI), +} + +impl Actor { + fn new(mailbox: mpsc::Receiver, tx: io::Sender) -> Self { + Self { mailbox, tx } + } + + async fn run(mut self) { + while let Some(msg) = self.mailbox.recv().await { + self.handle(msg).await; + } + } + + async fn handle(&mut self, msg: Message) { + match msg { + Message::Cast(msg) => { + self.tx.send(msg).await.expect("Failed to send message"); + } + } + } +} + +#[derive(Clone, Debug)] +pub struct DataflowSender(mpsc::Sender); + +impl DataflowSender { + pub fn start(tx_tcp: io::Sender) -> Self { + let (tx, rx) = mpsc::channel(8); + tokio::spawn(Actor::new(rx, tx_tcp).run()); + Self(tx) + } +} diff --git a/arc-sys/worker/src/main.rs b/arc-sys/worker/src/main.rs new file mode 100644 index 000000000..899080b9d --- /dev/null +++ b/arc-sys/worker/src/main.rs @@ -0,0 +1,30 @@ +#![feature(arc_unwrap_or_clone)] +// #![allow(unused)] + +mod coordinator_connector; +mod coordinator_receiver; +mod coordinator_sender; +mod dataflow_receiver; +mod dataflow_sender; +mod server; + +use clap::Parser; +use server::Server; +use shared::config::DEFAULT_COORDINATOR_TCP_ADDR; +use shared::socket::parse_addr; +use std::net::SocketAddr; + +#[derive(Parser)] +pub struct Args { + #[clap(short, long, value_parser = parse_addr, default_value = DEFAULT_COORDINATOR_TCP_ADDR)] + coordinator: SocketAddr, +} + +pub const TARGET: &str = env!("TARGET"); + +#[tokio::main(flavor = "current_thread")] +async fn main() { + shared::tracing::init(); + tracing::info!("Starting worker on {TARGET}"); + Server::start(Args::parse()).await; +} diff --git a/arc-sys/worker/src/server.rs b/arc-sys/worker/src/server.rs new file mode 100644 index 000000000..1894697f9 --- /dev/null +++ b/arc-sys/worker/src/server.rs @@ -0,0 +1,111 @@ +use std::collections::HashMap; +use std::env::temp_dir; +use std::fs::File; +use std::io::Write; +use tokio::process::Command; +use tokio::sync::mpsc; +use tokio_serde::formats::Json; +use tokio_serde::Framed; +use tokio_util::codec::FramedRead; +use tokio_util::codec::FramedWrite; +use tokio_util::codec::LengthDelimitedCodec; + +use crate::coordinator_connector::CoordinatorConnector; +use crate::coordinator_sender::CoordinatorSender; +use crate::dataflow_receiver::DataflowReceiver; +use crate::dataflow_sender::DataflowSender; +use crate::Args; + +struct Actor { + mailbox: mpsc::Receiver, + tx: Option, + txs: HashMap, + server: Server, + args: Args, + id: u64, +} + +#[derive(Clone)] +pub struct Server(mpsc::Sender); + +#[derive(Debug)] +enum Message { + Connect { tx: CoordinatorSender }, + Execute { name: String, binary: Vec }, + Shutdown, +} + +impl Actor { + fn new(mailbox: mpsc::Receiver, server: Server, args: Args) -> Self { + Self { + mailbox, + tx: None, + txs: HashMap::new(), + server, + id: 0, + args, + } + } + + async fn run(mut self) { + CoordinatorConnector::start(self.args.coordinator, self.server.clone()); + while let Some(msg) = self.mailbox.recv().await { + self.handle(msg); + } + } + + fn handle(&mut self, msg: Message) { + match msg { + Message::Connect { tx } => { + self.tx = Some(tx); + } + Message::Execute { name, binary } => { + let path = temp_dir().join("arc-lang").join(name); + + let mut file = File::create(&path).unwrap(); + file.write_all(&binary).unwrap(); + file.flush().unwrap(); + drop(file); + + let mut child = Command::new(path).spawn().expect("Spawning failed"); + + let rx = child.stdout.take().expect("Failed to get stdin"); + let tx = child.stdin.take().expect("Failed to get stdin"); + + let rx = FramedRead::new(rx, LengthDelimitedCodec::new()); + let rx = Framed::new(rx, Json::default()); + let tx = FramedWrite::new(tx, LengthDelimitedCodec::new()); + let tx = Framed::new(tx, Json::default()); + + self.txs.insert(self.id, DataflowSender::start(tx)); + DataflowReceiver::start(rx, self.id, self.server.clone()); + } + Message::Shutdown => self.mailbox.close(), + } + } +} + +impl Server { + pub async fn start(args: Args) { + let (tx, rx) = mpsc::channel(100); + let server = Self(tx); + tokio::spawn(Actor::new(rx, server, args).run()) + .await + .expect("Failed to spawn"); + } + + pub async fn connect(&self, tx: CoordinatorSender) { + self.0.send(Message::Connect { tx }).await.unwrap(); + } + + pub async fn execute(&self, name: String, binary: Vec) { + self.0 + .send(Message::Execute { name, binary }) + .await + .expect("failed to forward"); + } + + pub async fn shutdown(&self) { + self.0.send(Message::Shutdown).await.unwrap(); + } +} diff --git a/arc-runtime/examples/consensus/Cargo.lock b/arc-sys/workspace/Cargo.lock similarity index 54% rename from arc-runtime/examples/consensus/Cargo.lock rename to arc-sys/workspace/Cargo.lock index 851651a8a..443b0fa47 100644 --- a/arc-runtime/examples/consensus/Cargo.lock +++ b/arc-sys/workspace/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addr2line" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" -dependencies = [ - "gimli", -] - [[package]] name = "adler" version = "1.0.2" @@ -23,71 +14,44 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.8", "once_cell", - "version_check 0.9.4", + "version_check", ] [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] [[package]] -name = "arc-runtime" -version = "0.0.0" +name = "alga" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2" dependencies = [ - "arrayvec", - "async-recursion", - "comet", - "coz", - "crossfire", - "derive_more", - "dyn-clone", - "erased-serde", - "futures", - "hierarchical_hash_wheel_timer", - "kompact", - "lazy_static", - "macros", - "paste", - "rand 0.8.4", - "replace_with", - "slog", - "time 0.3.5", - "tokio", - "uuid", + "approx", + "num-complex 0.2.4", + "num-traits", ] [[package]] -name = "arc-swap" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabe5a181f83789739c194cbe5a897dde195078fac08568d09221fd6137a7ba8" - -[[package]] -name = "arr_macro" -version = "0.1.3" +name = "anyhow" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a105bfda48707cf19220129e78fca01e9639433ffaef4163546ed8fb04120a5" -dependencies = [ - "arr_macro_impl", - "proc-macro-hack", -] +checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" [[package]] -name = "arr_macro_impl" -version = "0.1.3" +name = "approx" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609c78bd572f4edc74310dfb63a01f5609d53fa8b4dd7c4d98aef3b3e8d72d1" +checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" dependencies = [ - "proc-macro-hack", - "quote", - "syn", + "num-traits", ] [[package]] @@ -97,94 +61,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] -name = "as_num" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62eaa19b325e1b3dc2f7b9b6de544dd536619e3dcf986fc391b2c643f10d68c0" - -[[package]] -name = "async-channel" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-executor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "once_cell", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" -dependencies = [ - "async-channel", - "async-executor", - "async-io", - "async-mutex", - "blocking", - "futures-lite", - "num_cpus", - "once_cell", -] - -[[package]] -name = "async-io" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" -dependencies = [ - "concurrent-queue", - "futures-lite", - "libc", - "log", - "once_cell", - "parking", - "polling", - "slab", - "socket2", - "waker-fn", - "winapi", -] - -[[package]] -name = "async-lock" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-mutex" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-recursion" -version = "0.3.2" +name = "async-trait" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2" +checksum = "677d1d8ab452a3936018a687b20e6f7cf5363d713b732b8884001317b0e48aa3" dependencies = [ "proc-macro2", "quote", @@ -192,113 +72,41 @@ dependencies = [ ] [[package]] -name = "async-std" -version = "1.10.0" +name = "autocfg" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" -dependencies = [ - "async-channel", - "async-global-executor", - "async-io", - "async-lock", - "crossbeam-utils 0.8.6", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "num_cpus", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "async-task" -version = "4.0.3" +name = "base64" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] -name = "async-trait" -version = "0.1.52" +name = "bindgen" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" +checksum = "fd4865004a46a0aafb2a0a5eb19d3c9fc46ee5f063a6cfc605c69ac9ecf5263d" dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "atomic" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "atomic-waker" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" - -[[package]] -name = "backtrace" -version = "0.3.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" -dependencies = [ - "addr2line", - "cc", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", + "regex", + "rustc-hash", + "shlex", ] [[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitfields" -version = "0.2.0" +name = "bitflags" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a0dd3fdef66457be053e25548d0f9b75f389547c897739daa13d39db01bf0a" +checksum = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" [[package]] name = "bitflags" @@ -307,60 +115,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "bitmaps" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" -dependencies = [ - "typenum", -] - -[[package]] -name = "blocking" -version = "1.1.0" +name = "boringssl-src" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427" +checksum = "0511b9f0b739706e05b7279ece5dfc1932a42839cf005cb0f00420a3fea27c96" dependencies = [ - "async-channel", - "async-task", - "atomic-waker", - "fastrand", - "futures-lite", - "once_cell", + "cmake", ] [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] -name = "bytes" -version = "1.1.0" +name = "byteorder" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" -dependencies = [ - "serde", -] +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] -name = "cache-padded" -version = "1.2.0" +name = "bytes" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" [[package]] name = "cc" -version = "1.0.72" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +dependencies = [ + "jobserver", +] [[package]] -name = "cfg-if" -version = "0.1.10" +name = "cexpr" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +dependencies = [ + "nom", +] [[package]] name = "cfg-if" @@ -369,66 +166,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "chrono" -version = "0.4.19" +name = "clang-sys" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "time 0.1.43", - "winapi", -] - -[[package]] -name = "comet" -version = "0.1.0" -source = "git+https://github.com/Starlight-JS/comet?branch=multi-threaded#8c819020a7828236abae962a6dcecdaad9cf2052" +checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" dependencies = [ - "ahash", - "atomic", - "bit-vec", - "crossbeam 0.8.1", - "flume", - "hashbrown", - "im", + "glob", "libc", - "memx", - "mopa", - "parking_lot", - "rand 0.8.4", - "rosalloc", - "scoped_threadpool", - "threadfin", - "winapi", + "libloading", ] [[package]] -name = "concurrent-queue" -version = "1.2.2" +name = "cmake" +version = "0.1.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" -dependencies = [ - "cache-padded", -] - -[[package]] -name = "consensus" -version = "0.1.0" +checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" dependencies = [ - "arc-runtime", - "hocon 0.5.2", - "kompact", - "omnipaxos", - "rand 0.8.4", + "cc", ] [[package]] name = "core-foundation" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -441,381 +202,232 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] -name = "coz" -version = "0.1.3" +name = "crc" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef55b3fe2f5477d59e12bc792e8b3c95a25bd099eadcfae006ecea136de76e2" +checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" dependencies = [ - "libc", - "once_cell", + "crc-catalog", ] [[package]] -name = "crossbeam" -version = "0.7.3" +name = "crc-catalog" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-channel 0.4.4", - "crossbeam-deque 0.7.4", - "crossbeam-epoch 0.8.2", - "crossbeam-queue 0.2.3", - "crossbeam-utils 0.7.2", -] +checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" [[package]] -name = "crossbeam" -version = "0.8.1" +name = "crc32c" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845" +checksum = "3dfea2db42e9927a3845fb268a10a72faed6d416065f77873f05e411457c363e" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-channel 0.5.2", - "crossbeam-deque 0.8.1", - "crossbeam-epoch 0.9.6", - "crossbeam-queue 0.3.3", - "crossbeam-utils 0.8.6", + "rustc_version", ] [[package]] -name = "crossbeam-channel" -version = "0.4.4" +name = "crc32fast" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", + "cfg-if", ] [[package]] -name = "crossbeam-channel" -version = "0.5.2" +name = "crossbeam" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" +checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", + "cfg-if", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", ] [[package]] -name = "crossbeam-deque" -version = "0.7.4" +name = "crossbeam-channel" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "crossbeam-epoch 0.8.2", - "crossbeam-utils 0.7.2", - "maybe-uninit", + "cfg-if", + "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch 0.9.6", - "crossbeam-utils 0.8.6", -] - -[[package]] -name = "crossbeam-epoch" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "lazy_static", - "maybe-uninit", - "memoffset 0.5.6", - "scopeguard", + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.6" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", - "lazy_static", - "memoffset 0.6.5", + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.1.2" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" dependencies = [ - "crossbeam-utils 0.6.6", + "cfg-if", + "crossbeam-utils", ] [[package]] -name = "crossbeam-queue" -version = "0.2.3" +name = "crossbeam-utils" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", + "cfg-if", ] [[package]] -name = "crossbeam-queue" -version = "0.3.3" +name = "derive-new" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b979d76c9fcb84dffc80a73f7290da0f83e4c95773494674cb44b76d13a7a110" +checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "crossbeam-utils" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" +name = "doto" +version = "0.0.0" dependencies = [ - "cfg-if 0.1.10", - "lazy_static", + "pipeline", ] [[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +name = "dummy" +version = "0.1.0" dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", + "pipeline", ] [[package]] -name = "crossbeam-utils" -version = "0.8.6" +name = "educe" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120" +checksum = "cb0188e3c3ba8df5753894d54461f0e39bc91741dc5b22e1c46999ec2c71f4e4" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "enum-ordinalize", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "crossfire" -version = "0.1.7" +name = "either" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c0493a3bfdcd4102975721ca3a958e0e5b31203ed50093d396819519f8ef24" -dependencies = [ - "async-trait", - "crossbeam 0.7.3", - "futures", -] +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] -name = "ctor" -version = "0.1.21" +name = "encoding_rs" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ - "quote", - "syn", + "cfg-if", ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "enum-ordinalize" +version = "3.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "a62bb1df8b45ecb7ffa78dca1c17a438fb193eb083db0b1b494d2a61bcb5096a" dependencies = [ + "num-bigint", + "num-traits", "proc-macro2", "quote", + "rustc_version", "syn", ] [[package]] -name = "dirs-next" -version = "2.0.0" +name = "errno" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" dependencies = [ - "cfg-if 1.0.0", - "dirs-sys-next", + "errno-dragonfly", + "libc", + "winapi 0.3.9", ] [[package]] -name = "dirs-sys-next" +name = "errno-dragonfly" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" dependencies = [ + "cc", "libc", - "redox_users", - "winapi", ] [[package]] -name = "dyn-clone" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" - -[[package]] -name = "encoding" -version = "0.2.33" +name = "fail" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" +checksum = "3be3c61c59fdc91f5dbc3ea31ee8623122ce80057058be560654c5d410d181a6" dependencies = [ - "encoding-index-japanese", - "encoding-index-korean", - "encoding-index-simpchinese", - "encoding-index-singlebyte", - "encoding-index-tradchinese", + "lazy_static", + "log", + "rand 0.7.3", ] [[package]] -name = "encoding-index-japanese" -version = "1.20141219.5" +name = "fastrand" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ - "encoding_index_tests", + "instant", ] [[package]] -name = "encoding-index-korean" -version = "1.20141219.5" +name = "fixedbitset" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" -dependencies = [ - "encoding_index_tests", -] +checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" [[package]] -name = "encoding-index-simpchinese" -version = "1.20141219.5" +name = "fixedbitset" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" -dependencies = [ - "encoding_index_tests", -] +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] -name = "encoding-index-singlebyte" -version = "1.20141219.5" +name = "flate2" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding-index-tradchinese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" -dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding_index_tests" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" - -[[package]] -name = "encoding_rs" -version = "0.8.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "erased-serde" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44a5d80251b806a14cd3e4e1a582e912d5cbf6904ab19fdefbd7a56adca088e1" -dependencies = [ - "serde", -] - -[[package]] -name = "event-listener" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" - -[[package]] -name = "executors" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99e7b1533b6caa2e16120bfc652aeb087c9197b1bf419edfc8587e6022f2fc9" -dependencies = [ - "arr_macro", - "async-task", - "crossbeam-channel 0.4.4", - "crossbeam-deque 0.7.4", - "crossbeam-utils 0.7.2", - "log", - "num_cpus", - "rand 0.7.3", - "synchronoise", - "threadpool", -] - -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "fastrand" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779d043b6a0b90cc4c0ed7ee380a6504394cee7efd7db050e3774eee387324b2" -dependencies = [ - "instant", -] - -[[package]] -name = "flume" -version = "0.10.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d04dafd11240188e146b6f6476a898004cace3be31d4ec5e08e216bf4947ac0" -dependencies = [ - "futures-core", - "futures-sink", - "nanorand", - "pin-project", - "spin", + "crc32fast", + "miniz_oxide", ] [[package]] @@ -841,19 +453,34 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "futures" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" + [[package]] name = "futures" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28560757fe2bb34e79f907794bb6b22ae8b0e5c669b638a1132f2592b19035b4" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" dependencies = [ "futures-channel", "futures-core", @@ -866,9 +493,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3dda0b6588335f360afc675d0564c17a77a2bda81ca178a4b6081bd86c7f0b" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" dependencies = [ "futures-core", "futures-sink", @@ -876,47 +503,33 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" [[package]] name = "futures-executor" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d6d2ff5bb10fb95c85b8ce46538a2e5f5e7fdc755623a7d4529ab8a4ed9d2a" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" dependencies = [ "futures-core", "futures-task", "futures-util", + "num_cpus", ] [[package]] name = "futures-io" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2" - -[[package]] -name = "futures-lite" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" [[package]] name = "futures-macro" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ "proc-macro2", "quote", @@ -925,22 +538,29 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3055baccb68d74ff6480350f8d6eb8fcfa3aa11bdc1a1ae3afdd0514617d508" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] name = "futures-task" -version = "0.3.19" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-timer" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" dependencies = [ + "futures 0.1.31", "futures-channel", "futures-core", "futures-io", @@ -953,54 +573,93 @@ dependencies = [ "slab", ] +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + [[package]] name = "getrandom" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.2.4" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 1.0.0", - "js-sys", + "cfg-if", "libc", - "wasi 0.10.3+wasi-snapshot-preview1", - "wasm-bindgen", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] -name = "gimli" -version = "0.26.1" +name = "glob" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] -name = "gloo-timers" -version = "0.2.2" +name = "grpcio" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f16c88aa13d2656ef20d1c042086b8767bbe2bdb62526894275a1b062161b2e" +checksum = "99cf790272c5fb75a2fd7f2e8282e910d0fe0ed1d954cb29b07b74228694302a" dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", - "web-sys", + "bytes", + "futures 0.3.25", + "grpcio-sys", + "libc", + "log", + "parking_lot 0.11.2", + "prost 0.7.0", +] + +[[package]] +name = "grpcio-compiler" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad402dbef95d726c4170fc69209c4d669a199c6462c63c69d67fa1d8f44511f4" +dependencies = [ + "derive-new", + "prost 0.11.5", + "prost-build 0.11.5", + "prost-types 0.11.5", + "tempfile", +] + +[[package]] +name = "grpcio-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f89a56d830be4dddc939c377c95e3b77e30c86a8df99c20095c34cf9038447b" +dependencies = [ + "bindgen", + "boringssl-src", + "cc", + "cmake", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "walkdir", ] [[package]] name = "h2" -version = "0.3.10" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9de88456263e249e241fcd211d3954e2c9b0ef7ccfc235a444eb367cae3689" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ "bytes", "fnv", @@ -1017,79 +676,59 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "heck" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" dependencies = [ - "libc", + "unicode-segmentation", ] [[package]] -name = "hierarchical_hash_wheel_timer" -version = "1.1.0" +name = "heck" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58ffa8e952c33857fbaad0fab19d41ecd3a7a68c15c4e7b79c698e6379ded79" -dependencies = [ - "crossbeam-channel 0.5.2", - "rustc-hash", - "uuid", -] +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] -name = "hocon" -version = "0.3.7" +name = "hermit-abi" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8249bcd360b81ac97a9c42fe46e08c520f0c9942a16cae6670979e6ea1759b4" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" dependencies = [ - "failure", - "java-properties", - "memchr", - "nom", - "serde_path_to_error", - "uuid", + "libc", ] [[package]] -name = "hocon" -version = "0.5.2" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b343112b7ebf5f59651daf37533fc623b88b4363111a883ed9448fdc38e0b73" -dependencies = [ - "java-properties", - "memchr", - "nom", - "reqwest", - "serde", - "serde_path_to_error", - "thiserror", - "uuid", -] +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "http" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 1.0.1", + "itoa", ] [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -1098,9 +737,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.5.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -1108,11 +747,26 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +[[package]] +name = "hwloc" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2934f84993b8b4bcae9b6a4e5f0aca638462dda9c7b4f26a570241494f21e0f4" +dependencies = [ + "bitflags 0.7.0", + "errno", + "kernel32-sys", + "libc", + "num 0.1.42", + "pkg-config", + "winapi 0.2.8", +] + [[package]] name = "hyper" -version = "0.14.16" +version = "0.14.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" dependencies = [ "bytes", "futures-channel", @@ -1123,7 +777,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 0.4.8", + "itoa", "pin-project-lite", "socket2", "tokio", @@ -1147,34 +801,19 @@ dependencies = [ [[package]] name = "idna" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] -[[package]] -name = "im" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111c1983f3c5bb72732df25cddacee9b546d08325fb584b5ebd38148be7b0246" -dependencies = [ - "bitmaps", - "rand_core 0.5.1", - "rand_xoshiro", - "sized-chunks", - "typenum", - "version_check 0.9.4", -] - [[package]] name = "indexmap" -version = "1.8.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown", @@ -1186,209 +825,163 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] -name = "iovec" -version = "0.1.4" +name = "integer-encoding" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] +checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" [[package]] name = "ipnet" -version = "2.3.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" [[package]] -name = "iprange" -version = "0.6.7" +name = "itertools" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37209be0ad225457e63814401415e748e2453a5297f9b637338f5fb8afa4ec00" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" dependencies = [ - "ipnet", + "either", ] [[package]] -name = "itoa" -version = "0.4.8" +name = "itertools" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] -name = "java-properties" -version = "1.4.0" +name = "jobserver" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20e9b11dedd144ceb96484add3f9088c131795e4295ce51448ef755e0ec19c07" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" dependencies = [ - "encoding", - "lazy_static", - "regex", + "libc", ] [[package]] name = "js-sys" -version = "0.3.55" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] -name = "kompact" -version = "0.11.0" -source = "git+https://github.com/segeljakt/kompact?branch=master#db0519a504444bcb1dbc0e3390477750d426d76f" +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" dependencies = [ - "arc-swap", - "as_num", - "async-std", - "bitfields", - "bytes", - "crossbeam-channel 0.4.4", - "crossbeam-queue 0.2.3", - "crossbeam-utils 0.7.2", - "executors", - "futures", - "hierarchical_hash_wheel_timer", - "hocon 0.3.7", - "iovec", - "ipnet", - "iprange", - "kompact-actor-derive", - "kompact-component-derive", - "log", - "lru", - "mio", - "num_cpus", - "oncemutex", - "owning_ref", - "rustc-hash", - "rustc_version 0.2.3", - "serde", - "slog", - "slog-async", - "slog-term", - "synchronoise", - "uuid", + "winapi 0.2.8", + "winapi-build", ] [[package]] -name = "kompact-actor-derive" -version = "0.11.0" -source = "git+https://github.com/segeljakt/kompact?branch=master#db0519a504444bcb1dbc0e3390477750d426d76f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "kompact-component-derive" -version = "0.11.0" -source = "git+https://github.com/segeljakt/kompact?branch=master#db0519a504444bcb1dbc0e3390477750d426d76f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] -name = "kv-log-macro" -version = "1.0.7" +name = "libc" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "log", + "cfg-if", + "winapi 0.3.9", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "libm" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] -name = "libc" -version = "0.2.112" +name = "libz-sys" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" +checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] [[package]] name = "lock_api" -version = "0.4.5" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ + "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.14" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", - "value-bag", + "cfg-if", ] [[package]] -name = "lru" -version = "0.6.6" +name = "lz4" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ea2d928b485416e8908cff2d97d621db22b27f7b3b6729e438bcf42c671ba91" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" dependencies = [ - "hashbrown", + "libc", + "lz4-sys", ] [[package]] -name = "macros" -version = "0.0.0" +name = "lz4-sys" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" dependencies = [ - "cfg-if 1.0.0", - "indexmap", - "proc-macro2", - "quote", - "syn", + "cc", + "libc", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" - -[[package]] -name = "memoffset" -version = "0.5.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg", -] +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" @@ -1400,12 +993,12 @@ dependencies = [ ] [[package]] -name = "memx" -version = "0.1.18" +name = "memoffset" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902bfec851b10e18f2d749bb2a6ea639fa725383575a2737ffd2a8ac4f2ae01a" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ - "rustc_version 0.4.0", + "autocfg", ] [[package]] @@ -1416,56 +1009,36 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "miniz_oxide" -version = "0.4.4" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ "adler", - "autocfg", ] [[package]] name = "mio" -version = "0.7.14" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", - "miow", - "ntapi", - "winapi", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.42.0", ] [[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", -] - -[[package]] -name = "mopa" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a785740271256c230f57462d3b83e52f998433a7062fc18f96d5999474a9f915" - -[[package]] -name = "nanorand" -version = "0.6.1" +name = "multimap" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729eb334247daa1803e0a094d0a5c55711b85571179f5ec6e53eccfdf7008958" -dependencies = [ - "getrandom 0.2.4", -] +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "native-tls" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -1479,248 +1052,572 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + [[package]] name = "nom" -version = "4.2.3" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" dependencies = [ "memchr", - "version_check 0.1.5", + "version_check", +] + +[[package]] +name = "noop-waker" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56902c3f29ce7afbecc1d088dfd2e3108033f3c02041c70788ed94280a3d5261" + +[[package]] +name = "num" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" +dependencies = [ + "num-integer", + "num-iter", + "num-traits", +] + +[[package]] +name = "num" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +dependencies = [ + "num-bigint", + "num-complex 0.4.2", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", ] [[package]] -name = "ntapi" -version = "0.3.6" +name = "num-complex" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" dependencies = [ - "winapi", + "num-traits", ] [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", + "num-bigint", + "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "once_cell" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" + +[[package]] +name = "openssl" +version = "0.10.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-src" +version = "111.24.0+1.1.1s" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3498f259dab01178c6228c6b00dcef0ed2a2d5e20d648c017861227773ea4abd" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" dependencies = [ "autocfg", + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.5", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi 0.3.9", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys 0.42.0", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "petgraph" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +dependencies = [ + "fixedbitset 0.2.0", + "indexmap", ] [[package]] -name = "num_cpus" -version = "1.13.1" +name = "petgraph" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" dependencies = [ - "hermit-abi", - "libc", + "fixedbitset 0.4.2", + "indexmap", ] [[package]] -name = "object" -version = "0.27.1" +name = "pin-project" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" dependencies = [ - "memchr", + "pin-project-internal", ] [[package]] -name = "omnipaxos" -version = "0.1.0" -source = "git+https://github.com/segeljakt/omnipaxos?branch=master#36dd86dfadaf91f442a3ad35c6cc01fd129d0f4a" +name = "pin-project-internal" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ - "hocon 0.5.2", - "slog", - "slog-async", - "slog-term", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "once_cell" -version = "1.9.0" +name = "pin-project-lite" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] -name = "oncemutex" -version = "0.1.1" +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d11de466f4a3006fe8a5e7ec84e93b79c70cb992ae0aa0eb631ad2df8abfe2" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "openssl" -version = "0.10.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" +name = "pipeline" +version = "0.1.0" dependencies = [ - "bitflags", - "cfg-if 1.0.0", - "foreign-types", + "alga", + "arrayvec", + "cfg-if", + "crossbeam", + "futures 0.3.25", + "hwloc", "libc", - "once_cell", - "openssl-sys", + "noop-waker", + "num 0.4.0", + "num-traits", + "num_cpus", + "rdkafka", + "rskafka", + "serde", + "serde_derive", + "serde_json", + "sled", + "tikv-client", + "time", + "tokio", + "tokio-serde", + "tokio-stream", + "tokio-util", + "webrtc-sctp", + "webrtc-util", ] [[package]] -name = "openssl-probe" -version = "0.1.5" +name = "pkg-config" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] -name = "openssl-sys" -version = "0.9.72" +name = "ppv-lite86" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" -dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", -] +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] -name = "owning_ref" -version = "0.4.1" +name = "prettyplease" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" +checksum = "2c8992a85d8e93a28bdf76137db888d3874e3b230dee5ed8bebac4c9f7617773" dependencies = [ - "stable_deref_trait", + "proc-macro2", + "syn", ] [[package]] -name = "parking" -version = "2.0.0" +name = "proc-macro-crate" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" +checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +dependencies = [ + "once_cell", + "thiserror", + "toml", +] [[package]] -name = "parking_lot" -version = "0.11.2" +name = "proc-macro2" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" dependencies = [ - "instant", - "lock_api", - "parking_lot_core", + "unicode-ident", ] [[package]] -name = "parking_lot_core" -version = "0.8.5" +name = "procfs" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "ab8809e0c18450a2db0f236d2a44ec0b4c1412d0eb936233579f0990faa5d5cd" dependencies = [ - "cfg-if 1.0.0", - "instant", + "bitflags 1.3.2", + "byteorder", + "flate2", + "hex", + "lazy_static", "libc", - "redox_syscall", - "smallvec", - "winapi", ] [[package]] -name = "paste" -version = "1.0.6" +name = "prometheus" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" +checksum = "5986aa8d62380092d2f50f8b1cdba9cb9b6731ffd4b25b51fd126b6c3e05b99c" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "libc", + "memchr", + "parking_lot 0.11.2", + "procfs", + "protobuf", + "reqwest", + "thiserror", +] [[package]] -name = "percent-encoding" -version = "2.1.0" +name = "prost" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "9e6984d2f1a23009bd270b8bb56d0926810a3d483f59c987d77969e9d8e840b2" +dependencies = [ + "bytes", + "prost-derive 0.7.0", +] [[package]] -name = "pin-project" -version = "1.0.10" +name = "prost" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" +checksum = "c01db6702aa05baa3f57dec92b8eeeeb4cb19e894e73996b32a4093289e54592" dependencies = [ - "pin-project-internal", + "bytes", + "prost-derive 0.11.5", ] [[package]] -name = "pin-project-internal" -version = "1.0.10" +name = "prost-build" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" +checksum = "32d3ebd75ac2679c2af3a92246639f9fcc8a442ee420719cc4fe195b98dd5fa3" dependencies = [ - "proc-macro2", - "quote", - "syn", + "bytes", + "heck 0.3.3", + "itertools 0.9.0", + "log", + "multimap", + "petgraph 0.5.1", + "prost 0.7.0", + "prost-types 0.7.0", + "tempfile", + "which", ] [[package]] -name = "pin-project-lite" -version = "0.2.8" +name = "prost-build" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "cb5320c680de74ba083512704acb90fe00f28f79207286a848e730c45dd73ed6" +dependencies = [ + "bytes", + "heck 0.4.0", + "itertools 0.10.5", + "lazy_static", + "log", + "multimap", + "petgraph 0.6.2", + "prettyplease", + "prost 0.11.5", + "prost-types 0.11.5", + "regex", + "syn", + "tempfile", + "which", +] [[package]] -name = "pin-utils" -version = "0.1.0" +name = "prost-derive" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "169a15f3008ecb5160cba7d37bcd690a7601b6d30cfb87a117d45e59d52af5d4" +dependencies = [ + "anyhow", + "itertools 0.9.0", + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "pkg-config" -version = "0.3.24" +name = "prost-derive" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" +checksum = "c8842bad1a5419bca14eac663ba798f6bc19c413c2fdceb5f3ba3b0932d96720" +dependencies = [ + "anyhow", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "polling" -version = "2.2.0" +name = "prost-types" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" +checksum = "b518d7cdd93dab1d1122cf07fa9a60771836c668dde9d9e2a139f957f0d9f1bb" dependencies = [ - "cfg-if 1.0.0", - "libc", - "log", - "wepoll-ffi", - "winapi", + "bytes", + "prost 0.7.0", ] [[package]] -name = "ppv-lite86" -version = "0.2.16" +name = "prost-types" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "017f79637768cde62820bc2d4fe0e45daaa027755c323ad077767c6c5f173091" +dependencies = [ + "bytes", + "prost 0.11.5", +] [[package]] -name = "proc-macro-hack" -version = "0.5.19" +name = "protobuf" +version = "2.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" +checksum = "cf7e6d18738ecd0902d30d1ad232c9125985a3422929b16c65517b38adc14f96" [[package]] -name = "proc-macro2" -version = "1.0.36" +name = "protobuf-build" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" +checksum = "6a7266835d38c38c73b091a24412de1f4b4382a5195fab1ec038161582b03b78" dependencies = [ - "unicode-xid", + "bitflags 1.3.2", + "grpcio-compiler", + "proc-macro2", + "prost-build 0.7.0", + "quote", + "syn", ] [[package]] name = "quote" -version = "1.0.14" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47aa80447ce4daf1717500037052af176af5d38cc3e571d9ec1c7353fc10c87d" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ "proc-macro2", ] @@ -1735,19 +1632,18 @@ dependencies = [ "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", - "rand_hc 0.2.0", + "rand_hc", ] [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", - "rand_core 0.6.3", - "rand_hc 0.3.1", + "rand_core 0.6.4", ] [[package]] @@ -1767,7 +1663,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -1781,11 +1677,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.8", ] [[package]] @@ -1798,47 +1694,49 @@ dependencies = [ ] [[package]] -name = "rand_hc" -version = "0.3.1" +name = "rdkafka" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +checksum = "bd7c5d6d17442bcb9f943aae96d67d98c6d36af60442dd5da62aaa7fcbb25c48" dependencies = [ - "rand_core 0.6.3", + "futures-channel", + "futures-util", + "libc", + "log", + "rdkafka-sys", + "serde", + "serde_derive", + "serde_json", + "slab", + "tokio", ] [[package]] -name = "rand_xoshiro" -version = "0.4.0" +name = "rdkafka-sys" +version = "4.3.0+1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9fcdd2e881d02f1d9390ae47ad8e5696a9e4be7b547a1da2afbc61973217004" +checksum = "d222a401698c7f2010e3967353eae566d9934dcda49c29910da922414ab4e3f4" dependencies = [ - "rand_core 0.5.1", + "libc", + "libz-sys", + "num_enum", + "pkg-config", ] [[package]] name = "redox_syscall" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.0" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "getrandom 0.2.4", - "redox_syscall", + "bitflags 1.3.2", ] [[package]] name = "regex" -version = "1.5.4" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" dependencies = [ "aho-corasick", "memchr", @@ -1847,9 +1745,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "remove_dir_all" @@ -1857,20 +1755,14 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi", + "winapi 0.3.9", ] -[[package]] -name = "replace_with" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a8614ee435691de62bcffcf4a66d91b3594bf1428a5722e79103249a095690" - [[package]] name = "reqwest" -version = "0.11.9" +version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f242f1488a539a79bac6dbe7c8609ae43b7914b7736210f239a37cccb32525" +checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" dependencies = [ "base64", "bytes", @@ -1884,10 +1776,10 @@ dependencies = [ "hyper-tls", "ipnet", "js-sys", - "lazy_static", "log", "mime", "native-tls", + "once_cell", "percent-encoding", "pin-project-lite", "serde", @@ -1895,6 +1787,7 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-native-tls", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -1903,75 +1796,69 @@ dependencies = [ ] [[package]] -name = "rosalloc" -version = "0.1.0" -source = "git+https://github.com/playxe/rosalloc#ac11a8684b5c1d8e043cf33a153de0fa9e9564e4" +name = "rskafka" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47f86cd4975252119d94a5c202548a0ef037f7263b44be3130577bc4e4e9288a" dependencies = [ - "indexmap", - "libc", - "memx", - "parking_lot", - "thread_local", + "async-trait", + "bytes", + "crc32c", + "flate2", + "futures 0.3.25", + "integer-encoding", + "lz4", + "parking_lot 0.12.1", + "pin-project-lite", + "rand 0.8.5", + "snap", + "thiserror", + "time", + "tokio", + "tracing", + "zstd", ] -[[package]] -name = "rustc-demangle" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" - [[package]] name = "rustc-hash" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.4", + "semver", ] [[package]] -name = "rustversion" -version = "1.0.6" +name = "ryu" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] -name = "ryu" -version = "1.0.9" +name = "same-file" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "winapi", + "windows-sys 0.36.1", ] -[[package]] -name = "scoped_threadpool" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" - [[package]] name = "scopeguard" version = "1.1.0" @@ -1980,11 +1867,11 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "security-framework" -version = "2.5.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09d3c15d814eda1d6a836f2f2b56a6abc1446c8a34351cb3180d3db92ffe4ce" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -1993,9 +1880,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e90dd10c41c6bfc633da6e0c659bd25d31e0791e5974ac42970267d59eba87f7" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -2003,48 +1890,38 @@ dependencies = [ [[package]] name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.4" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012" - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" [[package]] name = "serde" -version = "1.0.133" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +dependencies = [ + "serde_derive", +] [[package]] -name = "serde_json" -version = "1.0.75" +name = "serde_derive" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c059c05b48c5c0067d4b4b2b4f0732dd65feb52daf7e0ea09cd87e7dadc1af79" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ - "itoa 1.0.1", - "ryu", - "serde", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "serde_path_to_error" -version = "0.1.6" +name = "serde_json" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd186dd4e1748b2798a2e86789dd77f5834ecda0bf15db76962e8e104bfc9bd" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" dependencies = [ + "itoa", + "ryu", "serde", ] @@ -2055,166 +1932,112 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.1", + "itoa", "ryu", "serde", ] [[package]] -name = "sized-chunks" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" -dependencies = [ - "bitmaps", - "typenum", -] - -[[package]] -name = "slab" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" - -[[package]] -name = "slog" -version = "2.7.0" +name = "shlex" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" +checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" [[package]] -name = "slog-async" -version = "2.7.0" +name = "signal-hook-registry" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "766c59b252e62a34651412870ff55d8c4e6d04df19b43eecb2703e417b097ffe" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" dependencies = [ - "crossbeam-channel 0.5.2", - "slog", - "take_mut", - "thread_local", + "libc", ] [[package]] -name = "slog-term" -version = "2.8.0" +name = "slab" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95c1e7e5aab61ced6006149ea772770b84a0d16ce0f7885def313e4829946d76" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" dependencies = [ - "atty", - "chrono", - "slog", - "term", - "thread_local", + "autocfg", ] [[package]] -name = "smallvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" - -[[package]] -name = "socket2" -version = "0.4.2" +name = "sled" +version = "0.34.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" +checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" dependencies = [ + "crc32fast", + "crossbeam-epoch", + "crossbeam-utils", + "fs2", + "fxhash", "libc", - "winapi", -] - -[[package]] -name = "spin" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511254be0c5bcf062b019a6c89c01a664aa359ded62f78aa72c6fc137c0590e5" -dependencies = [ - "lock_api", + "log", + "parking_lot 0.11.2", ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" +name = "smallvec" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] -name = "syn" -version = "1.0.85" +name = "snap" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] +checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] -name = "synchronoise" -version = "1.0.0" +name = "socket2" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d717ed0efc9d39ab3b642a096bc369a3e02a38a51c41845d7fe31bdad1d6eaeb" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ - "crossbeam-queue 0.1.2", + "libc", + "winapi 0.3.9", ] [[package]] -name = "synstructure" -version = "0.12.6" +name = "syn" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ "proc-macro2", "quote", - "syn", - "unicode-xid", + "unicode-ident", ] -[[package]] -name = "take_mut" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" - [[package]] name = "tempfile" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", "redox_syscall", "remove_dir_all", - "winapi", -] - -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", + "winapi 0.3.9", ] [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", @@ -2222,60 +2045,122 @@ dependencies = [ ] [[package]] -name = "thread_local" -version = "1.1.3" +name = "tikv-client" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +checksum = "26904b386ca52ce25b3a620b397e6e4e93c4fd06d13c2c5936d9ac597f897263" dependencies = [ - "once_cell", + "async-trait", + "derive-new", + "fail", + "futures 0.3.25", + "futures-timer", + "grpcio", + "lazy_static", + "log", + "prometheus", + "rand 0.8.5", + "regex", + "serde", + "serde_derive", + "thiserror", + "tikv-client-common", + "tikv-client-pd", + "tikv-client-proto", + "tikv-client-store", + "tokio", ] [[package]] -name = "threadfin" -version = "0.1.1" +name = "tikv-client-common" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4b647a40fefe14511723ec89557e4469fb273f59dc13deccf48385091b45a1" +checksum = "72fc3bb3fbec1f2a3354d4bbe48501b23ea47b79da2ffaedeadcc8a6183188e4" dependencies = [ - "crossbeam-channel 0.5.2", - "num_cpus", - "once_cell", - "waker-fn", + "futures 0.3.25", + "grpcio", + "lazy_static", + "log", + "regex", + "thiserror", + "tikv-client-proto", ] [[package]] -name = "threadpool" -version = "1.8.1" +name = "tikv-client-pd" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +checksum = "f8cadef1633d4e7952d9a3a88211f03f71e9f90769a5b50c40b5eccc06408977" dependencies = [ - "num_cpus", + "async-trait", + "futures 0.3.25", + "grpcio", + "log", + "tikv-client-common", + "tikv-client-proto", ] [[package]] -name = "time" -version = "0.1.43" +name = "tikv-client-proto" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "f9707c63c11c19b87b6eb3df40c6103d0f1e2f06b53445bad91a8c9e06407d9b" dependencies = [ - "libc", - "winapi", + "futures 0.3.25", + "grpcio", + "lazy_static", + "prost 0.7.0", + "prost-derive 0.7.0", + "protobuf", + "protobuf-build", +] + +[[package]] +name = "tikv-client-store" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ab348b60ef0a384985c488e25bf35721956b3b45332945f0841f9ac8a693586" +dependencies = [ + "async-trait", + "derive-new", + "futures 0.3.25", + "grpcio", + "log", + "tikv-client-common", + "tikv-client-proto", ] [[package]] name = "time" -version = "0.3.5" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41effe7cfa8af36f439fac33861b66b049edc6f9a32331e2312660529c1c24ad" +checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" dependencies = [ - "libc", - "rand 0.8.4", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" + +[[package]] +name = "time-macros" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +dependencies = [ + "time-core", ] [[package]] name = "tinyvec" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -2286,19 +2171,42 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +[[package]] +name = "todo" +version = "0.0.0" +dependencies = [ + "pipeline", +] + [[package]] name = "tokio" -version = "1.15.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838" +checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" dependencies = [ + "autocfg", "bytes", "libc", "memchr", "mio", "num_cpus", + "parking_lot 0.12.1", "pin-project-lite", - "winapi", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.42.0", +] + +[[package]] +name = "tokio-macros" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2311,44 +2219,95 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" +dependencies = [ + "bytes", + "educe", + "futures-core", + "futures-sink", + "pin-project", + "serde", + "serde_json", +] + +[[package]] +name = "tokio-stream" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-util" -version = "0.6.9" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", - "log", + "futures-util", + "hashbrown", "pin-project-lite", + "slab", "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +dependencies = [ + "serde", ] [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tracing-core" -version = "0.1.21" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -2358,75 +2317,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] -name = "typenum" -version = "1.15.0" +name = "unicode-bidi" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] -name = "unicode-bidi" -version = "0.3.7" +name = "unicode-ident" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "unicode-segmentation" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" [[package]] name = "url" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", ] -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.4", -] - -[[package]] -name = "value-bag" -version = "1.0.0-alpha.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f" -dependencies = [ - "ctor", - "version_check 0.9.4", -] - [[package]] name = "vcpkg" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - [[package]] name = "version_check" version = "0.9.4" @@ -2434,10 +2367,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "waker-fn" -version = "1.1.0" +name = "walkdir" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi 0.3.9", + "winapi-util", +] [[package]] name = "want" @@ -2457,29 +2395,29 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.3+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a2e384a3f170b0c7543787a91411175b71afd56ba4d3a0ae5678d4e2243c0e" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.78" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.78" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -2488,11 +2426,11 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.28" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -2500,9 +2438,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.78" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2510,9 +2448,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.78" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -2523,29 +2461,74 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.78" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "web-sys" -version = "0.3.55" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "wepoll-ffi" -version = "0.1.2" +name = "webrtc-sctp" +version = "0.5.0" +source = "git+https://github.com/webrtc-rs/sctp?rev=097f65dfbe3a076b085bfeb5e4bb8b5d5afc2c78#097f65dfbe3a076b085bfeb5e4bb8b5d5afc2c78" +dependencies = [ + "async-trait", + "bytes", + "crc", + "log", + "rand 0.8.5", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-util" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +checksum = "8b3050262ce1f70599ca1a12f446a2e73bae80a3152baae7fca4a9a26b8f0c0f" dependencies = [ + "async-trait", + "bitflags 1.3.2", + "bytes", "cc", + "ipnet", + "lazy_static", + "libc", + "log", + "nix", + "parking_lot 0.12.1", + "rand 0.8.5", + "thiserror", + "tokio", + "winapi 0.3.9", +] + +[[package]] +name = "which" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +dependencies = [ + "either", + "libc", + "once_cell", ] +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + [[package]] name = "winapi" version = "0.3.9" @@ -2556,23 +2539,167 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + [[package]] name = "winreg" -version = "0.7.0" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "zstd" +version = "0.10.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4a6bd64f22b5e3e94b4e238669ff9f10815c27a5180108b849d24174a83847" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "4.1.6+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "94b61c51bb270702d6167b8ce67340d2754b088d0c091b06e593aa772c3ee9bb" dependencies = [ - "winapi", + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "1.6.3+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc49afa5c8d634e75761feda8c592051e7eeb4683ba827211eb0d731d3402ea8" +dependencies = [ + "cc", + "libc", ] diff --git a/arc-sys/workspace/Cargo.toml b/arc-sys/workspace/Cargo.toml new file mode 100644 index 000000000..8b7cd6a6b --- /dev/null +++ b/arc-sys/workspace/Cargo.toml @@ -0,0 +1,2 @@ +[workspace] +members = [ "crates/*" ] diff --git a/arc-sys/workspace/crates/doto/Cargo.toml b/arc-sys/workspace/crates/doto/Cargo.toml new file mode 100644 index 000000000..2e6f5b015 --- /dev/null +++ b/arc-sys/workspace/crates/doto/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "doto" +version = "0.0.0" +edition = "2021" + +[dependencies] +pipeline = { path = "/Users/klasseg/Workspace/arc/arc-sys/coordinator/../pipeline" } diff --git a/arc-sys/workspace/crates/doto/src/main.rs b/arc-sys/workspace/crates/doto/src/main.rs new file mode 100644 index 000000000..e2a63e0b1 --- /dev/null +++ b/arc-sys/workspace/crates/doto/src/main.rs @@ -0,0 +1,83 @@ +use pipeline::prelude::*; +fn main() { + let mut args = std::env::args(); + let _ = args.next(); + let kind = args.next(); + let db = Database::remote("127.0.0.1:2379"); + match kind.unwrap().as_str() { + "worker3" => worker3(db), + "worker0" => worker0(db), + _ => panic!("Unknown arg, expected instance[N]"), + } +} +fn worker3(db: Database) { + Runtime::new() + .spawn(worker3_shard0(db.clone()), 0usize) + .spawn(worker3_shard1(db.clone()), 1usize); +} +async fn worker3_shard0(db: Database) { + let mut node3 = ShuffleSource::new(8000u16, 2usize, key_udf).await; + let (param0, state0) = Map::new(map_udf); + let mut node5 = KafkaSink::new("127.0.0.1:9093", "my-topic-2", key_udf); + let param = (param0,); + let mut state = State::new("worker3_shard0", db, (state0,)); + while let Some((key, mut node3)) = node3.recv().await { + let mut state = state.get(key); + let mut node4 = Map::process(&mut node3, param.0, state.0); + node5.send(&mut node4).await; + state.0 = node4.state(); + } +} +async fn worker3_shard1(db: Database) { + let mut node3 = ShuffleSource::new(8001u16, 2usize, key_udf).await; + let (param0, state0) = Map::new(map_udf); + let mut node5 = KafkaSink::new("127.0.0.1:9093", "my-topic-2", key_udf); + let param = (param0,); + let mut state = State::new("worker3_shard1", db, (state0,)); + while let Some((key, mut node3)) = node3.recv().await { + let mut state = state.get(key); + let mut node4 = Map::process(&mut node3, param.0, state.0); + node5.send(&mut node4).await; + state.0 = node4.state(); + } +} +fn worker0(db: Database) { + Runtime::new() + .spawn(worker0_shard0(db.clone()), 0usize) + .spawn(worker0_shard1(db.clone()), 1usize); +} +async fn worker0_shard0(db: Database) { + let mut node0 = KafkaSource::::new("127.0.0.1:9093", "my-topic-1", 0..10i32); + let (param0, state0) = Filter::new(filter_udf); + let mut node2 = ShuffleSink::new(["127.0.0.1:8000", "127.0.0.1:8001"], key_udf).await; + let param = (param0,); + let mut state = State::new("worker0_shard0", db, (state0,)); + while let Some((key, mut node0)) = node0.recv().await { + let mut state = state.get(key); + let mut node1 = Filter::process(&mut node0, param.0, state.0); + node2.send(&mut node1).await; + state.0 = node1.state(); + } +} +async fn worker0_shard1(db: Database) { + let mut node0 = KafkaSource::::new("127.0.0.1:9093", "my-topic-1", 0..10i32); + let (param0, state0) = Filter::new(filter_udf); + let mut node2 = ShuffleSink::new(["127.0.0.1:8000", "127.0.0.1:8001"], key_udf).await; + let param = (param0,); + let mut state = State::new("worker0_shard1", db, (state0,)); + while let Some((key, mut node0)) = node0.recv().await { + let mut state = state.get(key); + let mut node1 = Filter::process(&mut node0, param.0, state.0); + node2.send(&mut node1).await; + state.0 = node1.state(); + } +} +fn filter_udf(x: i32) -> bool { + x > 0 +} +fn map_udf(x: i32) -> i32 { + x + 1 +} +fn key_udf(x: i32) -> i32 { + x % 2 +} diff --git a/arc-sys/workspace/crates/dummy/Cargo.toml b/arc-sys/workspace/crates/dummy/Cargo.toml new file mode 100644 index 000000000..254d3a140 --- /dev/null +++ b/arc-sys/workspace/crates/dummy/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "dummy" +version = "0.1.0" +edition = "2021" + +[dependencies] +pipeline = { path = "/Users/klasseg/Workspace/arc/arc-sys/pipeline" } diff --git a/arc-runtime/src/data/channels/remote/data_parallel.rs b/arc-sys/workspace/crates/dummy/src/lib.rs similarity index 100% rename from arc-runtime/src/data/channels/remote/data_parallel.rs rename to arc-sys/workspace/crates/dummy/src/lib.rs diff --git a/arc-sys/workspace/crates/todo/Cargo.toml b/arc-sys/workspace/crates/todo/Cargo.toml new file mode 100644 index 000000000..ff2dd5b1a --- /dev/null +++ b/arc-sys/workspace/crates/todo/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "todo" +version = "0.0.0" +edition = "2021" + +[dependencies] +pipeline = { path = "/Users/klasseg/Workspace/arc/arc-sys/coordinator/../pipeline" } diff --git a/arc-sys/workspace/crates/todo/src/main.rs b/arc-sys/workspace/crates/todo/src/main.rs new file mode 100644 index 000000000..d7dc7aea4 --- /dev/null +++ b/arc-sys/workspace/crates/todo/src/main.rs @@ -0,0 +1,83 @@ +use pipeline::prelude::*; +fn main() { + let mut args = std::env::args(); + let _ = args.next(); + let kind = args.next(); + let db = Database::remote("127.0.0.1:2379"); + match kind.unwrap().as_str() { + "worker2" => worker2(db), + "worker0" => worker0(db), + _ => panic!("Unknown arg, expected instance[N]"), + } +} +fn worker2(db: Database) { + Runtime::new() + .spawn(worker2_shard0(db.clone()), 0usize) + .spawn(worker2_shard1(db.clone()), 1usize); +} +async fn worker2_shard0(db: Database) { + let mut node3 = ShuffleSource::new(8000u16, 2usize, key_udf).await; + let (param0, state0) = Map::new(map_udf); + let mut node5 = KafkaSink::new("127.0.0.1:9093", "my-topic-2", key_udf); + let param = (param0,); + let mut state = State::new("worker2_shard0", db, (state0,)); + while let Some((key, mut node3)) = node3.recv().await { + let mut state = state.get(key); + let mut node4 = Map::process(&mut node3, param.0, state.0); + node5.send(&mut node4).await; + state.0 = node4.state(); + } +} +async fn worker2_shard1(db: Database) { + let mut node3 = ShuffleSource::new(8001u16, 2usize, key_udf).await; + let (param0, state0) = Map::new(map_udf); + let mut node5 = KafkaSink::new("127.0.0.1:9093", "my-topic-2", key_udf); + let param = (param0,); + let mut state = State::new("worker2_shard1", db, (state0,)); + while let Some((key, mut node3)) = node3.recv().await { + let mut state = state.get(key); + let mut node4 = Map::process(&mut node3, param.0, state.0); + node5.send(&mut node4).await; + state.0 = node4.state(); + } +} +fn worker0(db: Database) { + Runtime::new() + .spawn(worker0_shard0(db.clone()), 0usize) + .spawn(worker0_shard1(db.clone()), 1usize); +} +async fn worker0_shard0(db: Database) { + let mut node0 = KafkaSource::::new("127.0.0.1:9093", "my-topic-1", 0..10i32); + let (param0, state0) = Filter::new(filter_udf); + let mut node2 = ShuffleSink::new(["127.0.0.1:8000", "127.0.0.1:8001"], key_udf).await; + let param = (param0,); + let mut state = State::new("worker0_shard0", db, (state0,)); + while let Some((key, mut node0)) = node0.recv().await { + let mut state = state.get(key); + let mut node1 = Filter::process(&mut node0, param.0, state.0); + node2.send(&mut node1).await; + state.0 = node1.state(); + } +} +async fn worker0_shard1(db: Database) { + let mut node0 = KafkaSource::::new("127.0.0.1:9093", "my-topic-1", 0..10i32); + let (param0, state0) = Filter::new(filter_udf); + let mut node2 = ShuffleSink::new(["127.0.0.1:8000", "127.0.0.1:8001"], key_udf).await; + let param = (param0,); + let mut state = State::new("worker0_shard1", db, (state0,)); + while let Some((key, mut node0)) = node0.recv().await { + let mut state = state.get(key); + let mut node1 = Filter::process(&mut node0, param.0, state.0); + node2.send(&mut node1).await; + state.0 = node1.state(); + } +} +fn filter_udf(x: i32) -> bool { + x > 0 +} +fn map_udf(x: i32) -> i32 { + x + 1 +} +fn key_udf(x: i32) -> i32 { + x % 2 +}