You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,13 +113,13 @@ cd s3-active-storage-rs
113
113
Next, use Cargo to build the package:
114
114
115
115
```sh
116
-
cargo build
116
+
cargo build --release
117
117
```
118
118
119
119
The active storage server may be run using Cargo:
120
120
121
121
```sh
122
-
cargo run
122
+
cargo run --release
123
123
```
124
124
125
125
Or installed to the system:
@@ -203,6 +203,19 @@ The proxy adds two custom headers `x-activestorage-dtype` and `x-activestrorage-
203
203
204
204
---
205
205
206
+
## Documentation
207
+
208
+
The source code is documented using [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html).
209
+
Currently the `s3-active-storage` crate is not uploaded to https://crates.io, so we do not benefit from hosted documentation on https://docs.rs.
210
+
It is however possible to build the documentation locally:
211
+
212
+
```sh
213
+
cargo doc
214
+
```
215
+
216
+
Cargo builds documentation for the `s3-active-storage` crate and all of its dependencies.
217
+
The resulting documentation is available under `target/doc`, and may be viewed in a web browser using file:///path/to/s3-active-storage/target/doc/s3-active-storage/index.html.
218
+
206
219
## Contributing
207
220
208
221
See [CONTRIBUTING.md](CONTRIBUTING.md) for information about contributing to S3 active storage.
//! The Active Storage Server is built on top of a number of open source components.
16
+
//!
17
+
//! * [Tokio](tokio), the most popular asynchronous Rust runtime.
18
+
//! * [Axum](axum) web framework, built by the Tokio team. Axum performs well in [various](https://github.com/programatik29/rust-web-benchmarks/blob/master/result/hello-world.md) [benchmarks](https://web-frameworks-benchmark.netlify.app/result?l=rust)
19
+
//! and is built on top of various popular components, including the [hyper] HTTP library.
20
+
//! * [Serde](serde) performs (de)serialisation of JSON request and response data.
21
+
//! * [AWS SDK for S3](aws-sdk-s3) is used to interact with S3-compatible object stores.
22
+
//! * [ndarray] provides [NumPy](https://numpy.orgq)-like n-dimensional arrays used in numerical
23
+
//! computation.
24
+
1
25
use tokio::signal;
2
26
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
3
27
@@ -10,6 +34,7 @@ mod operations;
10
34
mod s3_client;
11
35
mod validated_json;
12
36
37
+
/// Application entry point
13
38
#[tokio::main]
14
39
asyncfnmain(){
15
40
init_tracing();
@@ -24,6 +49,10 @@ async fn main() {
24
49
.unwrap();
25
50
}
26
51
52
+
/// Initlialise tracing (logging)
53
+
///
54
+
/// Applies a filter based on the `RUST_LOG` environment variable, falling back to enable debug
55
+
/// logging for this crate and tower_http if not set.
27
56
fninit_tracing(){
28
57
tracing_subscriber::registry()
29
58
.with(
@@ -34,6 +63,9 @@ fn init_tracing() {
34
63
.init();
35
64
}
36
65
66
+
/// Graceful shutdown handler
67
+
///
68
+
/// Installs signal handlers to catch Ctrl-C or SIGTERM and trigger a graceful shutdown.
0 commit comments