Skip to content

Commit

Permalink
fbcode/thrift/lib/ [A] [B] [B]
Browse files Browse the repository at this point in the history
Reviewed By: zertosh

Differential Revision: D68595596

fbshipit-source-id: 486e0f9a97e72339ef93e01fbbe039520931c38e
  • Loading branch information
David Tolnay authored and facebook-github-bot committed Feb 5, 2025
1 parent f7d526e commit 76c0866
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 6 deletions.
1 change: 1 addition & 0 deletions thrift/lib/rust/src/dep_tests/cargo_thrift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ codegen_includer_proc_macro = { version = "0.1.0", git = "https://github.com/fac
fbthrift = { version = "0.0.1+unstable", path = "../../.." }
futures = { version = "0.3.30", features = ["async-await", "compat"] }
ref-cast = "1.0.18"
rust = { version = "0.0.1+unstable", path = "../../../annotation/rust" }
serde = { version = "1.0.185", features = ["derive", "rc"] }
serde_derive = "1.0.185"
thiserror = "2"
Expand Down
2 changes: 2 additions & 0 deletions thrift/lib/rust/src/dep_tests/cargo_thrift/clients/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ async-trait = "0.1.71"
codegen_includer_proc_macro = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
fbthrift = { version = "0.0.1+unstable", path = "../../../.." }
futures = { version = "0.3.30", features = ["async-await", "compat"] }
rust = { version = "0.0.1+unstable", path = "../../../../annotation/rust" }
rust_clients = { version = "0.0.1+unstable", path = "../../../../annotation/rust/clients" }
test_if__types = { package = "fbthrift_test_if", version = "0.0.1+unstable", path = ".." }
thrift = { version = "0.0.1+unstable", path = "../../../../annotation/thrift" }
thrift_clients = { version = "0.0.1+unstable", path = "../../../../annotation/thrift/clients" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use std::path::Path;
use thrift_compiler::Config;
use thrift_compiler::GenContext;
const CRATEMAP: &str = "\
thrift/annotation/scope.thrift thrift->scope //thrift/annotation:scope-rust
thrift/annotation/rust.thrift rust //thrift/annotation:rust-rust
thrift/annotation/scope.thrift rust->scope //thrift/annotation:scope-rust
thrift/annotation/thrift.thrift thrift //thrift/annotation:thrift-rust
thrift/lib/rust/src/dep_tests/test_thrift.thrift crate //thrift/lib/rust/src/dep_tests:test_if-rust
";
Expand Down
3 changes: 3 additions & 0 deletions thrift/lib/rust/src/dep_tests/cargo_thrift/mocks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ async-trait = "0.1.71"
codegen_includer_proc_macro = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
fbthrift = { version = "0.0.1+unstable", path = "../../../.." }
futures = { version = "0.3.30", features = ["async-await", "compat"] }
rust = { version = "0.0.1+unstable", path = "../../../../annotation/rust" }
rust_clients = { version = "0.0.1+unstable", path = "../../../../annotation/rust/clients" }
rust_mocks = { version = "0.0.1+unstable", path = "../../../../annotation/rust/mocks" }
test_if__clients = { package = "fbthrift_test_if_clients", version = "0.0.1+unstable", path = "../clients" }
test_if__types = { package = "fbthrift_test_if", version = "0.0.1+unstable", path = ".." }
thrift = { version = "0.0.1+unstable", path = "../../../../annotation/thrift" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use std::path::Path;
use thrift_compiler::Config;
use thrift_compiler::GenContext;
const CRATEMAP: &str = "\
thrift/annotation/scope.thrift thrift->scope //thrift/annotation:scope-rust
thrift/annotation/rust.thrift rust //thrift/annotation:rust-rust
thrift/annotation/scope.thrift rust->scope //thrift/annotation:scope-rust
thrift/annotation/thrift.thrift thrift //thrift/annotation:thrift-rust
thrift/lib/rust/src/dep_tests/test_thrift.thrift crate //thrift/lib/rust/src/dep_tests:test_if-rust
";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ async-trait = "0.1.71"
codegen_includer_proc_macro = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
fbthrift = { version = "0.0.1+unstable", path = "../../../.." }
futures = { version = "0.3.30", features = ["async-await", "compat"] }
rust = { version = "0.0.1+unstable", path = "../../../../annotation/rust" }
rust_services = { version = "0.0.1+unstable", path = "../../../../annotation/rust/services" }
test_if__types = { package = "fbthrift_test_if", version = "0.0.1+unstable", path = ".." }
thrift = { version = "0.0.1+unstable", path = "../../../../annotation/thrift" }
thrift_services = { version = "0.0.1+unstable", path = "../../../../annotation/thrift/services" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use std::path::Path;
use thrift_compiler::Config;
use thrift_compiler::GenContext;
const CRATEMAP: &str = "\
thrift/annotation/scope.thrift thrift->scope //thrift/annotation:scope-rust
thrift/annotation/rust.thrift rust //thrift/annotation:rust-rust
thrift/annotation/scope.thrift rust->scope //thrift/annotation:scope-rust
thrift/annotation/thrift.thrift thrift //thrift/annotation:thrift-rust
thrift/lib/rust/src/dep_tests/test_thrift.thrift crate //thrift/lib/rust/src/dep_tests:test_if-rust
";
Expand Down
3 changes: 2 additions & 1 deletion thrift/lib/rust/src/dep_tests/cargo_thrift/thrift_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use std::path::Path;
use thrift_compiler::Config;
use thrift_compiler::GenContext;
const CRATEMAP: &str = "\
thrift/annotation/scope.thrift thrift->scope //thrift/annotation:scope-rust
thrift/annotation/rust.thrift rust //thrift/annotation:rust-rust
thrift/annotation/scope.thrift rust->scope //thrift/annotation:scope-rust
thrift/annotation/thrift.thrift thrift //thrift/annotation:thrift-rust
thrift/lib/rust/src/dep_tests/test_thrift.thrift crate //thrift/lib/rust/src/dep_tests:test_if-rust
";
Expand Down
6 changes: 5 additions & 1 deletion thrift/lib/rust/src/dep_tests/test_thrift.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
namespace cpp2 facebook
namespace rust fbthrift_test_if

include "thrift/annotation/rust.thrift"
include "thrift/annotation/thrift.thrift"

struct Small {
Expand Down Expand Up @@ -83,7 +84,10 @@ struct Containers {
2: list<string> l;
}

typedef double Double (rust.newtype, rust.type = "OrderedFloat<f64>", rust.ord)
@rust.NewType
@rust.Ord
@rust.Type{name = "OrderedFloat<f64>"}
typedef double Double

safe stateful server exception TestException {
1: string message;
Expand Down
5 changes: 4 additions & 1 deletion thrift/lib/thrift/RpcMetadata.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -657,4 +657,7 @@ struct HeadersPayloadMetadata {
}

// The following were automatically generated and may benefit from renaming.
typedef string (java.swift.binary_string = "1") string_4852
@thrift.DeprecatedUnvalidatedAnnotations{
items = {"java.swift.binary_string": "1"},
}
typedef string string_4852

0 comments on commit 76c0866

Please sign in to comment.