forked from google/tarpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99bf3e6
commit df610b8
Showing
16 changed files
with
288 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
if ! has nix_direnv_version || ! nix_direnv_version 2.1.1; then | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.1.1/direnvrc" "sha256-b6qJ4r34rbE23yWjMqbmu3ia2z4b2wIlZUksBke/ol0=" | ||
fi | ||
|
||
use flake | ||
|
||
source_env_if_exists .envrc.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ Cargo.lock | |
*.bk | ||
tarpc.iml | ||
.idea | ||
|
||
/.direnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"nixEnvSelector.nixFile": "${workspaceRoot}/vscode-env.nix" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
[workspace] | ||
resolver = "2" | ||
|
||
members = [ | ||
"example-service", | ||
"tarpc", | ||
"plugins", | ||
] | ||
members = ["example-service", "tarpc", "plugins"] | ||
|
||
[profile.dev] | ||
split-debuginfo = "unpacked" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
description = "tarpc-wasm"; | ||
|
||
inputs = { | ||
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; }; | ||
nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; }; | ||
flake-utils = { url = "github:numtide/flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; }; | ||
cargo2nix = { url = "github:cargo2nix/cargo2nix"; inputs.nixpkgs.follows = "nixpkgs"; }; | ||
rust-overlay = { url = "github:oxalica/rust-overlay"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; }; | ||
}; | ||
|
||
outputs = { self, nixpkgs, cargo2nix, flake-utils, rust-overlay, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
overlays = [ | ||
cargo2nix.overlays.default | ||
rust-overlay.overlays.default | ||
]; | ||
}; | ||
|
||
node_pkg = pkgs.nodejs-18_x.override { enableNpm = false; }; | ||
|
||
rust = import ./nix/rust.nix { | ||
inherit pkgs; | ||
channel = "nightly"; | ||
version = "2022-08-16"; | ||
}; | ||
in rec { | ||
devShell = pkgs.mkShell rec { | ||
nativeBuildInputs = with pkgs; [ | ||
binaryen | ||
cargo-expand | ||
rust.toolchain | ||
wasm-bindgen-cli | ||
wasm-pack | ||
|
||
node_pkg | ||
(yarn.override { nodejs = node_pkg; }) # by default yarn uses the latest version of nodejs, so we override it to the correct version here | ||
]; | ||
}; | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
pkgs, | ||
channel, | ||
version | ||
}: let | ||
toolchain = pkgs.rust-bin.${channel}.${version}.default.override { | ||
extensions = [ "rust-src" "rustfmt" "rust-analyzer" ]; | ||
targets = [ | ||
(pkgs.rust.toRustTarget pkgs.stdenv.buildPlatform) | ||
(pkgs.rust.toRustTarget pkgs.stdenv.hostPlatform) | ||
"wasm32-unknown-unknown" | ||
]; | ||
}; | ||
|
||
project = pkgs.rustBuilder.makePackageSet { | ||
rustChannel = toolchain; | ||
packageFun = import ../Cargo.nix; | ||
target = null; | ||
}; | ||
|
||
platform = pkgs.makeRustPlatform { | ||
cargo = toolchain; | ||
rustc = toolchain; | ||
}; | ||
in { | ||
inherit toolchain project platform; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ name = "tarpc" | |
version = "0.30.0" | ||
rust-version = "1.58.0" | ||
authors = [ | ||
"Adam Wright <[email protected]>", | ||
"Tim Kuehn <[email protected]>", | ||
"Adam Wright <[email protected]>", | ||
"Tim Kuehn <[email protected]>", | ||
] | ||
edition = "2021" | ||
license = "MIT" | ||
|
@@ -27,12 +27,12 @@ serde-transport-bincode = ["tokio-serde/bincode"] | |
tcp = ["tokio/net"] | ||
|
||
full = [ | ||
"serde1", | ||
"tokio1", | ||
"serde-transport", | ||
"serde-transport-json", | ||
"serde-transport-bincode", | ||
"tcp", | ||
"serde1", | ||
"tokio1", | ||
"serde-transport", | ||
"serde-transport-json", | ||
"serde-transport-bincode", | ||
"tcp", | ||
] | ||
|
||
[badges] | ||
|
@@ -44,38 +44,32 @@ fnv = "1.0" | |
futures = "0.3" | ||
humantime = "2.0" | ||
pin-project = "1.0" | ||
rand = "0.8" | ||
serde = { optional = true, version = "1.0", features = ["derive"] } | ||
static_assertions = "1.1.0" | ||
tarpc-plugins = { path = "../plugins", version = "0.12" } | ||
thiserror = "1.0" | ||
tokio = { version = "1", features = ["time"] } | ||
tokio = { version = "1", features = [] } | ||
tokio-util = { version = "0.7.3", features = ["time"] } | ||
tokio-serde = { optional = true, version = "0.8" } | ||
tracing = { version = "0.1", default-features = false, features = [ | ||
"attributes", | ||
"log", | ||
"attributes", | ||
"log", | ||
] } | ||
tracing-opentelemetry = { version = "0.17.2", default-features = false } | ||
opentelemetry = { version = "0.17.0", default-features = false } | ||
|
||
|
||
[dev-dependencies] | ||
assert_matches = "1.4" | ||
bincode = "1.3" | ||
bytes = { version = "1", features = ["serde"] } | ||
flate2 = "1.0" | ||
futures-test = "0.3" | ||
opentelemetry = { version = "0.17.0", default-features = false, features = [ | ||
"rt-tokio", | ||
] } | ||
opentelemetry-jaeger = { version = "0.16.0", features = ["rt-tokio"] } | ||
pin-utils = "0.1.0-alpha" | ||
serde_bytes = "0.11" | ||
tracing-subscriber = { version = "0.3", features = ["env-filter"] } | ||
tokio = { version = "1", features = ["full", "test-util"] } | ||
tokio = { version = "1", features = ["macros", "test-util"] } | ||
tokio-serde = { version = "0.8", features = ["json", "bincode"] } | ||
trybuild = "1.0" | ||
wasm-bindgen = "0.2" | ||
wasm-bindgen-test = "0.2" | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
|
Oops, something went wrong.