We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
rust-script
1 parent a908d97 commit 2b708f6Copy full SHA for 2b708f6
examples
examples/hello.rs
@@ -0,0 +1,21 @@
1
+#!/usr/bin/env rust-script
2
+//! This is free and unencumbered software released into the public domain.
3
+//!
4
+//! ```cargo
5
+//! [dependencies]
6
+//! protoflow = "0.2"
7
+//! ```
8
+
9
+use protoflow::{blocks::*, BlockResult};
10
11
+fn main() -> BlockResult {
12
+ System::run(|s| {
13
+ let greeting = s.const_string("Hello, world!");
14
15
+ let line_encoder = s.encode_lines();
16
+ s.connect(&greeting.output, &line_encoder.input);
17
18
+ let stdout = s.write_stdout();
19
+ s.connect(&line_encoder.output, &stdout.input);
20
+ })
21
+}
0 commit comments