Skip to content

Commit b2fdbaf

Browse files
Rust docs (#17)
* Rust docs * Fix doc test
1 parent a08ee31 commit b2fdbaf

File tree

16 files changed

+254
-8
lines changed

16 files changed

+254
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Documentation](https://img.shields.io/badge/doc-reference-blue)](https://docs.restate.dev)
1+
[![Documentation](https://img.shields.io/docsrs/restate-sdk)](https://docs.rs/restate-sdk)
22
[![crates.io](https://img.shields.io/crates/v/restate_sdk.svg)](https://crates.io/crates/restate-sdk/)
33
[![Examples](https://img.shields.io/badge/view-examples-blue)](https://github.com/restatedev/examples)
44
[![Discord](https://img.shields.io/discord/1128210118216007792?logo=discord)](https://discord.gg/skW3AZ6uGd)

justfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@ print-target:
6666
test: (_target-installed target)
6767
cargo nextest run {{ _target-option }} --all-features
6868

69+
doctest:
70+
cargo test --doc
71+
6972
# Runs lints and tests
70-
verify: lint test
73+
verify: lint test doctest
7174

7275
udeps *flags:
7376
RUSTC_BOOTSTRAP=1 cargo udeps --all-features --all-targets {{ flags }}

macros/src/ast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// the Business Source License, use of this software will be governed
99
// by the Apache License, Version 2.0.
1010

11-
//! Some parts copied from https://github.com/dtolnay/thiserror/blob/39aaeb00ff270a49e3c254d7b38b10e934d3c7a5/impl/src/ast.rs
12-
//! License Apache-2.0 or MIT
11+
// Some parts copied from https://github.com/dtolnay/thiserror/blob/39aaeb00ff270a49e3c254d7b38b10e934d3c7a5/impl/src/ast.rs
12+
// License Apache-2.0 or MIT
1313

1414
use syn::ext::IdentExt;
1515
use syn::parse::{Parse, ParseStream};

macros/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// the Business Source License, use of this software will be governed
99
// by the Apache License, Version 2.0.
1010

11-
//! Some parts of this codebase were taken from https://github.com/google/tarpc/blob/b826f332312d3702667880a464e247556ad7dbfe/plugins/src/lib.rs
12-
//! License MIT
11+
// Some parts of this codebase were taken from https://github.com/google/tarpc/blob/b826f332312d3702667880a464e247556ad7dbfe/plugins/src/lib.rs
12+
// License MIT
1313

1414
extern crate proc_macro;
1515

@@ -22,6 +22,7 @@ use proc_macro::TokenStream;
2222
use quote::ToTokens;
2323
use syn::parse_macro_input;
2424

25+
/// Entry-point macro to define a Restate service.
2526
#[proc_macro_attribute]
2627
pub fn service(_: TokenStream, input: TokenStream) -> TokenStream {
2728
let svc = parse_macro_input!(input as Service);
@@ -31,6 +32,7 @@ pub fn service(_: TokenStream, input: TokenStream) -> TokenStream {
3132
.into()
3233
}
3334

35+
/// Entry-point macro to define a Restate object.
3436
#[proc_macro_attribute]
3537
pub fn object(_: TokenStream, input: TokenStream) -> TokenStream {
3638
let svc = parse_macro_input!(input as Object);
@@ -40,6 +42,7 @@ pub fn object(_: TokenStream, input: TokenStream) -> TokenStream {
4042
.into()
4143
}
4244

45+
/// Entry-point macro to define a Restate workflow.
4346
#[proc_macro_attribute]
4447
pub fn workflow(_: TokenStream, input: TokenStream) -> TokenStream {
4548
let svc = parse_macro_input!(input as Workflow);

0 commit comments

Comments
 (0)