diff --git a/RELEASES.md b/RELEASES.md index 694f03d..999a845 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,21 +1,52 @@ +## 0.13.0 (2018-10-16) + +### Breaking Changes + +Version 0.13 marks a significant departure from previous versions of tarpc. The +API has changed significantly. The tokio-proto crate has been torn out and +replaced with a homegrown rpc framework. Additionally, the crate has been +modularized, so that the tarpc crate itself contains only the macro code. + +### New Crates + +- crate rpc contains the core client/server request-response framework, as well as a transport trait. +- crate bincode-transport implements a transport that works almost exactly as tarpc works today (not to say it's wire-compatible). +- crate trace has some foundational types for tracing. This isn't really fleshed out yet, but it's useful for in-process log tracing, at least. + +All crates are now at the top level. e.g. tarpc-plugins is now tarpc/plugins rather than tarpc/src/plugins. tarpc itself is now a *very* small code surface, as most functionality has been moved into the other more granular crates. + +### New Features +- deadlines: all requests specify a deadline, and a server will stop processing a response when past its deadline. +- client cancellation propagation: when a client drops a request, the client sends a message to the server informing it to cancel its response. This means cancellations can propagate across multiple server hops. +- trace context stuff as mentioned above +- more server configuration for total connection limits, per-connection request limits, etc. + +### Removals +- no more shutdown handle. I left it out for now because of time and not being sure what the right solution is. +- all async now, no blocking stub or server interface. This helps with maintainability, and async/await makes async code much more usable. The service trait is thusly renamed Service, and the client is renamed Client. +- no built-in transport. Tarpc is now transport agnostic (see bincode-transport for transitioning existing uses). +- going along with the previous bullet, no preferred transport means no TLS support at this time. We could make a tls transport or make bincode-transport compatible with TLS. +- a lot of examples were removed because I couldn't keep up with maintaining all of them. Hopefully the ones I kept are still illustrative. +- no more plugins! + ## 0.10.0 (2018-04-08) -## Breaking Changes +### Breaking Changes Fixed rustc breakage in tarpc-plugins. These changes require a recent version of rustc. ## 0.10.0 (2018-03-26) -## Breaking Changes +### Breaking Changes Updates bincode to version 1.0. ## 0.9.0 (2017-09-17) -## Breaking Changes +### Breaking Changes Updates tarpc to use tarpc-plugins 0.2. ## 0.8.0 (2017-05-05) -## Breaking Changes +### Breaking Changes This release updates tarpc to use serde 1.0. As such, users must also update to use serde 1.0. The serde 1.0 [release notes](https://github.com/serde-rs/serde/releases/tag/v1.0.0) @@ -28,7 +59,7 @@ clients. No breaking changes. ## 0.7.2 (2017-04-22) -## Breaking Changes +### Breaking Changes This release updates tarpc-plugins to work with rustc master. Thus, older versions of rustc are no longer supported. We chose a minor version bump because it is still source-compatible with existing code using tarpc. @@ -39,7 +70,7 @@ This release was purely doc fixes. No breaking changes. ## 0.7 (2017-03-31) -## Breaking Changes +### Breaking Changes This release is a complete overhaul to build tarpc on top of the tokio stack. It's safe to assume that everything broke with this release. diff --git a/bincode-transport/Cargo.toml b/bincode-transport/Cargo.toml index b006d71..9839b60 100644 --- a/bincode-transport/Cargo.toml +++ b/bincode-transport/Cargo.toml @@ -1,17 +1,25 @@ cargo-features = ["rename-dependency"] [package] -name = "bincode-transport" +name = "tarpc-bincode-transport" version = "0.1.0" authors = ["Tim Kuehn "] edition = '2018' +license = "MIT" +documentation = "https://docs.rs/tarpc-bincode-transport" +homepage = "https://github.com/google/tarpc" +repository = "https://github.com/google/tarpc" +keywords = ["rpc", "network", "bincode", "serde", "tarpc"] +categories = ["asynchronous", "network-programming"] +readme = "../README.md" +description = "A bincode-based transport for tarpc services." [dependencies] bincode = { version = "1.0", features = ["i128"] } bytes = "0.4" futures_legacy = { version = "0.1", package = "futures" } pin-utils = "0.1.0-alpha.2" -rpc = { path = "../rpc", features = ["serde"] } +rpc = { package = "tarpc-lib", version = "0.1", path = "../rpc", features = ["serde1"] } serde = "1.0" tokio = "0.1" tokio-io = "0.1" @@ -20,10 +28,10 @@ tokio-tcp = "0.1" tokio-serde = "0.2" [target.'cfg(not(test))'.dependencies] -futures-preview = { git = "https://github.com/rust-lang-nursery/futures-rs", features = ["compat"] } +futures-preview = { version = "0.3.0-alpha.8", features = ["compat"] } [dev-dependencies] -futures-preview = { git = "https://github.com/rust-lang-nursery/futures-rs", features = ["compat", "tokio-compat"] } +futures-preview = { version = "0.3.0-alpha.8", features = ["compat", "tokio-compat"] } env_logger = "0.5" humantime = "1.0" log = "0.4" diff --git a/bincode-transport/src/lib.rs b/bincode-transport/src/lib.rs index 8ada0a8..fc85538 100644 --- a/bincode-transport/src/lib.rs +++ b/bincode-transport/src/lib.rs @@ -1,7 +1,8 @@ -// Copyright 2018 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. //! A TCP [`Transport`] that serializes as bincode. diff --git a/bincode-transport/src/vendored/mod.rs b/bincode-transport/src/vendored/mod.rs index 2b5432b..5ad3496 100644 --- a/bincode-transport/src/vendored/mod.rs +++ b/bincode-transport/src/vendored/mod.rs @@ -1 +1,7 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + pub(crate) mod tokio_serde_bincode; diff --git a/bincode-transport/tests/bench.rs b/bincode-transport/tests/bench.rs index c635e06..670acf8 100644 --- a/bincode-transport/tests/bench.rs +++ b/bincode-transport/tests/bench.rs @@ -1,7 +1,8 @@ -// Copyright 2018 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. //! Tests client/server control flow. @@ -29,7 +30,7 @@ use std::{ }; async fn bench() -> io::Result<()> { - let listener = bincode_transport::listen(&"0.0.0.0:0".parse().unwrap())?; + let listener = tarpc_bincode_transport::listen(&"0.0.0.0:0".parse().unwrap())?; let addr = listener.local_addr(); tokio_executor::spawn( @@ -42,7 +43,7 @@ async fn bench() -> io::Result<()> { .compat() ); - let conn = await!(bincode_transport::connect(&addr))?; + let conn = await!(tarpc_bincode_transport::connect(&addr))?; let client = &mut await!(Client::::new(client::Config::default(), conn))?; let total = 10_000usize; diff --git a/bincode-transport/tests/cancel.rs b/bincode-transport/tests/cancel.rs index 0400211..ed14fb7 100644 --- a/bincode-transport/tests/cancel.rs +++ b/bincode-transport/tests/cancel.rs @@ -1,7 +1,8 @@ -// Copyright 2018 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. //! Tests client/server control flow. @@ -37,7 +38,7 @@ impl AsDuration for SystemTime { } async fn run() -> io::Result<()> { - let listener = bincode_transport::listen(&"0.0.0.0:0".parse().unwrap())?; + let listener = tarpc_bincode_transport::listen(&"0.0.0.0:0".parse().unwrap())?; let addr = listener.local_addr(); let server = Server::::new(server::Config::default()) .incoming(listener) @@ -78,14 +79,14 @@ async fn run() -> io::Result<()> { tokio_executor::spawn(server.unit_error().boxed().compat()); - let conn = await!(bincode_transport::connect(&addr))?; + let conn = await!(tarpc_bincode_transport::connect(&addr))?; let client = await!(Client::::new( client::Config::default(), conn ))?; // Proxy service - let listener = bincode_transport::listen(&"0.0.0.0:0".parse().unwrap())?; + let listener = tarpc_bincode_transport::listen(&"0.0.0.0:0".parse().unwrap())?; let addr = listener.local_addr(); let proxy_server = Server::::new(server::Config::default()) .incoming(listener) @@ -116,7 +117,7 @@ async fn run() -> io::Result<()> { let client = await!(Client::::new( config, - await!(bincode_transport::connect(&addr))? + await!(tarpc_bincode_transport::connect(&addr))? ))?; // Make 3 speculative requests, returning only the quickest. diff --git a/bincode-transport/tests/pushback.rs b/bincode-transport/tests/pushback.rs index 5c403a6..e1e5e5a 100644 --- a/bincode-transport/tests/pushback.rs +++ b/bincode-transport/tests/pushback.rs @@ -1,7 +1,8 @@ -// Copyright 2018 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. //! Tests client/server control flow. @@ -36,7 +37,7 @@ impl AsDuration for SystemTime { } async fn run() -> io::Result<()> { - let listener = bincode_transport::listen(&"0.0.0.0:0".parse().unwrap())?; + let listener = tarpc_bincode_transport::listen(&"0.0.0.0:0".parse().unwrap())?; let addr = listener.local_addr(); let server = Server::::new(server::Config::default()) .incoming(listener) @@ -81,7 +82,7 @@ async fn run() -> io::Result<()> { config.max_in_flight_requests = 10; config.pending_request_buffer = 10; - let conn = await!(bincode_transport::connect(&addr))?; + let conn = await!(tarpc_bincode_transport::connect(&addr))?; let client = await!(Client::::new(config, conn))?; let clients = (1..=100u32).map(|_| client.clone()).collect::>(); diff --git a/example-service/Cargo.toml b/example-service/Cargo.toml index 211332c..c42f937 100644 --- a/example-service/Cargo.toml +++ b/example-service/Cargo.toml @@ -1,15 +1,24 @@ +cargo-features = ["rename-dependency"] + [package] -name = "example-service" +name = "tarpc-example-service" version = "0.1.0" authors = ["Tim Kuehn "] edition = "2018" +license = "MIT" +documentation = "https://docs.rs/tarpc-example-service" +homepage = "https://github.com/google/tarpc" +repository = "https://github.com/google/tarpc" +keywords = ["rpc", "network", "server", "api", "microservices", "example"] +categories = ["asynchronous", "network-programming"] +readme = "../README.md" +description = "An example server built on tarpc." [dependencies] -bincode-transport = { path = "../bincode-transport" } -futures-preview = { git = "https://github.com/rust-lang-nursery/futures-rs", features = ["compat", "tokio-compat"] } +bincode-transport = { package = "tarpc-bincode-transport", version = "0.1", path = "../bincode-transport" } +futures-preview = { version = "0.3.0-alpha.8", features = ["compat", "tokio-compat"] } serde = { version = "1.0" } -tarpc = { path = "../tarpc", features = ["serde"] } -tarpc-plugins = { path = "../plugins" } +tarpc = { version = "0.13", path = "../tarpc", features = ["serde1"] } tokio = "0.1" tokio-executor = "0.1" diff --git a/example-service/src/lib.rs b/example-service/src/lib.rs index 9d351e8..1cf003d 100644 --- a/example-service/src/lib.rs +++ b/example-service/src/lib.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + #![feature( futures_api, pin, diff --git a/example-service/src/main.rs b/example-service/src/main.rs index e38a1f1..e544edf 100644 --- a/example-service/src/main.rs +++ b/example-service/src/main.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + #![feature( futures_api, pin, diff --git a/plugins/Cargo.toml b/plugins/Cargo.toml index 9abea39..fb79084 100644 --- a/plugins/Cargo.toml +++ b/plugins/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "tarpc-plugins" -version = "0.4.0" +version = "0.5.0" authors = ["Adam Wright ", "Tim Kuehn "] license = "MIT" -documentation = "https://docs.rs/tarpc" +documentation = "https://docs.rs/tarpc-plugins" homepage = "https://github.com/google/tarpc" repository = "https://github.com/google/tarpc" -keywords = ["rpc", "network", "server", "api", "tls"] +keywords = ["rpc", "network", "server", "api", "microservices"] categories = ["asynchronous", "network-programming"] -readme = "../../README.md" -description = "Plugins for tarpc, an RPC framework for Rust with a focus on ease of use." +readme = "../README.md" +description = "Proc macros for tarpc." [badges] travis-ci = { repository = "google/tarpc" } diff --git a/plugins/src/lib.rs b/plugins/src/lib.rs index adf47f9..dc750c4 100644 --- a/plugins/src/lib.rs +++ b/plugins/src/lib.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + extern crate proc_macro; extern crate proc_macro2; extern crate syn; diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 2c9a447..ae087b2 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,15 +1,22 @@ -cargo-features = ["namespaced-features"] +cargo-features = ["rename-dependency"] [package] -name = "rpc" +name = "tarpc-lib" version = "0.1.0" authors = ["Tim Kuehn "] edition = '2018' -namespaced-features = true +license = "MIT" +documentation = "https://docs.rs/tarpc-lib" +homepage = "https://github.com/google/tarpc" +repository = "https://github.com/google/tarpc" +keywords = ["rpc", "network", "server", "api", "microservices"] +categories = ["asynchronous", "network-programming"] +readme = "../README.md" +description = "An RPC framework for Rust with a focus on ease of use." [features] default = [] -serde = ["trace/serde", "crate:serde", "serde/derive"] +serde1 = ["trace/serde", "serde", "serde/derive"] [dependencies] fnv = "1.0" @@ -18,14 +25,14 @@ log = "0.4" pin-utils = "0.1.0-alpha.2" rand = "0.5" tokio-timer = "0.2" -trace = { path = "../trace" } +trace = { package = "tarpc-trace", version = "0.1", path = "../trace" } serde = { optional = true, version = "1.0" } [target.'cfg(not(test))'.dependencies] -futures-preview = { git = "https://github.com/rust-lang-nursery/futures-rs", features = ["compat"] } +futures-preview = { version = "0.3.0-alpha.8", features = ["compat"] } [dev-dependencies] -futures-preview = { git = "https://github.com/rust-lang-nursery/futures-rs", features = ["compat", "tokio-compat"] } -futures-test-preview = { git = "https://github.com/rust-lang-nursery/futures-rs" } +futures-preview = { version = "0.3.0-alpha.8", features = ["compat", "tokio-compat"] } +futures-test-preview = { version = "0.3.0-alpha.8" } env_logger = "0.5" tokio = "0.1" diff --git a/rpc/src/client/dispatch.rs b/rpc/src/client/dispatch.rs index 95e8937..d0e53b1 100644 --- a/rpc/src/client/dispatch.rs +++ b/rpc/src/client/dispatch.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + use crate::{ context, util::{deadline_compat, AsDuration, Compact}, diff --git a/rpc/src/client/mod.rs b/rpc/src/client/mod.rs index 88832da..208b3fc 100644 --- a/rpc/src/client/mod.rs +++ b/rpc/src/client/mod.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + //! Provides a client that connects to a server and sends multiplexed requests. use crate::{context::Context, ClientMessage, Response, Transport}; diff --git a/rpc/src/context.rs b/rpc/src/context.rs index 82abfc2..677d355 100644 --- a/rpc/src/context.rs +++ b/rpc/src/context.rs @@ -1,7 +1,8 @@ -// Copyright 2018 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. //! Provides a request context that carries a deadline and trace context. This context is sent from //! client to server and is used by the server to enforce response deadlines. diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index 2c3b330..ab95a9b 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -1,7 +1,8 @@ -// Copyright 2018 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. #![feature( const_fn, @@ -54,7 +55,7 @@ use std::{cell::RefCell, io, sync::Once, time::SystemTime}; /// A message from a client to a server. #[derive(Debug)] #[cfg_attr( - feature = "serde", + feature = "serde1", derive(serde::Serialize, serde::Deserialize) )] #[non_exhaustive] @@ -69,7 +70,7 @@ pub struct ClientMessage { /// Different messages that can be sent from a client to a server. #[derive(Debug)] #[cfg_attr( - feature = "serde", + feature = "serde1", derive(serde::Serialize, serde::Deserialize) )] #[non_exhaustive] @@ -94,7 +95,7 @@ pub enum ClientMessageKind { /// A request from a client to a server. #[derive(Debug)] #[cfg_attr( - feature = "serde", + feature = "serde1", derive(serde::Serialize, serde::Deserialize) )] #[non_exhaustive] @@ -106,11 +107,11 @@ pub struct Request { /// When the client expects the request to be complete by. The server will cancel the request /// if it is not complete by this time. #[cfg_attr( - feature = "serde", + feature = "serde1", serde(serialize_with = "util::serde::serialize_epoch_secs") )] #[cfg_attr( - feature = "serde", + feature = "serde1", serde(deserialize_with = "util::serde::deserialize_epoch_secs") )] pub deadline: SystemTime, @@ -119,7 +120,7 @@ pub struct Request { /// A response from a server to a client. #[derive(Debug, PartialEq, Eq)] #[cfg_attr( - feature = "serde", + feature = "serde1", derive(serde::Serialize, serde::Deserialize) )] #[non_exhaustive] @@ -133,17 +134,17 @@ pub struct Response { /// An error response from a server to a client. #[derive(Debug, PartialEq, Eq)] #[cfg_attr( - feature = "serde", + feature = "serde1", derive(serde::Serialize, serde::Deserialize) )] #[non_exhaustive] pub struct ServerError { #[cfg_attr( - feature = "serde", + feature = "serde1", serde(serialize_with = "util::serde::serialize_io_error_kind_as_u32") )] #[cfg_attr( - feature = "serde", + feature = "serde1", serde(deserialize_with = "util::serde::deserialize_io_error_kind_from_u32") )] /// The type of error that occurred to fail the request. diff --git a/rpc/src/server/filter.rs b/rpc/src/server/filter.rs index d5d7617..ed2c9e3 100644 --- a/rpc/src/server/filter.rs +++ b/rpc/src/server/filter.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + use crate::{ server::{Channel, Config}, util::Compact, diff --git a/rpc/src/server/mod.rs b/rpc/src/server/mod.rs index 2c8f862..38d75fd 100644 --- a/rpc/src/server/mod.rs +++ b/rpc/src/server/mod.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + //! Provides a server that concurrently handles many connections sending multiplexed requests. use crate::{ diff --git a/rpc/src/transport/channel.rs b/rpc/src/transport/channel.rs index 8c0368e..ac55447 100644 --- a/rpc/src/transport/channel.rs +++ b/rpc/src/transport/channel.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + //! Transports backed by in-memory channels. use crate::Transport; diff --git a/rpc/src/transport/mod.rs b/rpc/src/transport/mod.rs index 2821fb3..41a8fe6 100644 --- a/rpc/src/transport/mod.rs +++ b/rpc/src/transport/mod.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + //! Provides a [`Transport`] trait as well as implementations. //! //! The rpc crate is transport- and protocol-agnostic. Any transport that impls [`Transport`] diff --git a/rpc/src/util/deadline_compat.rs b/rpc/src/util/deadline_compat.rs index 3a73bfd..0a0e9dc 100644 --- a/rpc/src/util/deadline_compat.rs +++ b/rpc/src/util/deadline_compat.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + use futures::{ compat::{Compat01As03, Future01CompatExt}, prelude::*, diff --git a/rpc/src/util/mod.rs b/rpc/src/util/mod.rs index 472d04f..8c55178 100644 --- a/rpc/src/util/mod.rs +++ b/rpc/src/util/mod.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + use std::{ collections::HashMap, hash::{BuildHasher, Hash}, diff --git a/rpc/src/util/serde.rs b/rpc/src/util/serde.rs index 260b47b..ac8f703 100644 --- a/rpc/src/util/serde.rs +++ b/rpc/src/util/serde.rs @@ -1,3 +1,9 @@ +// Copyright 2018 Google LLC +// +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. + use serde::{Deserialize, Deserializer, Serialize, Serializer}; use std::{ io, diff --git a/tarpc/Cargo.toml b/tarpc/Cargo.toml index cc9d21b..0ea5d3c 100644 --- a/tarpc/Cargo.toml +++ b/tarpc/Cargo.toml @@ -1,22 +1,21 @@ -cargo-features = ["namespaced-features"] +cargo-features = ["rename-dependency"] [package] name = "tarpc" -version = "0.12.1" +version = "0.13.0" authors = ["Adam Wright ", "Tim Kuehn "] edition = "2018" -namespaced-features = true license = "MIT" documentation = "https://docs.rs/tarpc" homepage = "https://github.com/google/tarpc" repository = "https://github.com/google/tarpc" -keywords = ["rpc", "network", "server", "api", "tls"] +keywords = ["rpc", "network", "server", "api", "microservices"] categories = ["asynchronous", "network-programming"] -readme = "README.md" +readme = "../README.md" description = "An RPC framework for Rust with a focus on ease of use." [features] -serde = ["rpc/serde", "crate:serde", "serde/derive"] +serde1 = ["rpc/serde1", "serde", "serde/derive"] [badges] travis-ci = { repository = "google/tarpc" } @@ -24,16 +23,16 @@ travis-ci = { repository = "google/tarpc" } [dependencies] log = "0.4" serde = { optional = true, version = "1.0" } -tarpc-plugins = { path = "../plugins", version = "0.4.0" } -rpc = { path = "../rpc" } +tarpc-plugins = { path = "../plugins", version = "0.5.0" } +rpc = { package = "tarpc-lib", path = "../rpc", version = "0.1" } [target.'cfg(not(test))'.dependencies] -futures-preview = { git = "https://github.com/rust-lang-nursery/futures-rs" } +futures-preview = "0.3.0-alpha.8" [dev-dependencies] humantime = "1.0" -futures-preview = { git = "https://github.com/rust-lang-nursery/futures-rs", features = ["compat", "tokio-compat"] } -bincode-transport = { path = "../bincode-transport" } +futures-preview = { version = "0.3.0-alpha.8", features = ["compat", "tokio-compat"] } +bincode-transport = { package = "tarpc-bincode-transport", version = "0.1", path = "../bincode-transport" } env_logger = "0.5" tokio = "0.1" tokio-executor = "0.1" diff --git a/tarpc/examples/pubsub.rs b/tarpc/examples/pubsub.rs index 1a8d2a3..258cd69 100644 --- a/tarpc/examples/pubsub.rs +++ b/tarpc/examples/pubsub.rs @@ -1,7 +1,8 @@ -// Copyright 2016 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. #![feature( arbitrary_self_types, diff --git a/tarpc/examples/readme.rs b/tarpc/examples/readme.rs index 65fb0d6..0841e57 100644 --- a/tarpc/examples/readme.rs +++ b/tarpc/examples/readme.rs @@ -1,7 +1,8 @@ -// Copyright 2016 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. #![feature( futures_api, diff --git a/tarpc/examples/server_calling_server.rs b/tarpc/examples/server_calling_server.rs index 0854403..b1e7a8c 100644 --- a/tarpc/examples/server_calling_server.rs +++ b/tarpc/examples/server_calling_server.rs @@ -1,7 +1,8 @@ -// Copyright 2016 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. #![feature( existential_type, diff --git a/tarpc/src/lib.rs b/tarpc/src/lib.rs index 6e652c1..89aa271 100644 --- a/tarpc/src/lib.rs +++ b/tarpc/src/lib.rs @@ -1,7 +1,8 @@ -// Copyright 2016 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. //! tarpc is an RPC framework for rust with a focus on ease of use. Defining a //! service can be done in just a few lines of code, and most of the boilerplate of diff --git a/tarpc/src/macros.rs b/tarpc/src/macros.rs index b335db4..b06f06b 100644 --- a/tarpc/src/macros.rs +++ b/tarpc/src/macros.rs @@ -1,7 +1,8 @@ -// Copyright 2016 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. #[cfg(feature = "serde")] #[doc(hidden)] diff --git a/tarpc/tests/latency.rs b/tarpc/tests/latency.rs index 7def3bd..c543133 100644 --- a/tarpc/tests/latency.rs +++ b/tarpc/tests/latency.rs @@ -1,7 +1,8 @@ -// Copyright 2018 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. #![feature( test, diff --git a/trace/Cargo.toml b/trace/Cargo.toml index ad1308d..244a2b9 100644 --- a/trace/Cargo.toml +++ b/trace/Cargo.toml @@ -1,8 +1,16 @@ [package] -name = "trace" +name = "tarpc-trace" version = "0.1.0" authors = ["tikue "] edition = '2018' +license = "MIT" +documentation = "https://docs.rs/tarpc-trace" +homepage = "https://github.com/google/tarpc" +repository = "https://github.com/google/tarpc" +keywords = ["rpc", "network", "server", "api", "tls"] +categories = ["asynchronous", "network-programming"] +readme = "../README.md" +description = "foundations for tracing in tarpc" [dependencies] rand = "0.5" diff --git a/trace/src/lib.rs b/trace/src/lib.rs index 71d702d..abe7400 100644 --- a/trace/src/lib.rs +++ b/trace/src/lib.rs @@ -1,7 +1,8 @@ -// Copyright 2018 Google Inc. All Rights Reserved. +// Copyright 2018 Google LLC // -// Licensed under the MIT License, . -// This file may not be copied, modified, or distributed except according to those terms. +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT. #![deny(missing_docs, missing_debug_implementations)]