Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rustでパケットと戯れる
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
nwiizo
December 22, 2017
160
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rustでパケットと戯れる
nwiizo
December 22, 2017
More Decks by nwiizo
See All by nwiizo
システムは「動く」だけでは足りない 実装編 - 非機能要件・分散システム・トレードオフをコードで見る
nwiizo
4
610
システムは「動く」だけでは 足りない - 非機能要件・分散システム・トレードオフの基礎
nwiizo
32
11k
アーキテクチャモダナイゼーションとは何か
nwiizo
19
7.1k
【社内勉強会】新年度からコーディングエージェントを使いこなす - 構造と制約で引き出すClaude Codeの実践知
nwiizo
39
23k
技術的負債の泥沼から組織を救う3つの転換点
nwiizo
9
7.6k
30分でわかるアーキテクチャモダナイゼーション
nwiizo
12
9k
意志を実装するアーキテクチャモダナイゼーション
nwiizo
3
4.9k
おい、テックブログを書け
nwiizo
48
21k
バイブコーディングと継続的デプロイメント
nwiizo
2
1.5k
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
490
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
250
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.1k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
190
Site-Speed That Sticks
csswizardry
13
1.2k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Bash Introduction
62gerente
615
220k
RailsConf 2023
tenderlove
30
1.5k
Embracing the Ebb and Flow
colly
88
5.1k
Transcript
None
None
None
None
None
None
No.1 No.4 No.3 No.2
None
No.2
No.2 • • • • • • • • •
No.2 http://rust-lang-ja.org/rust-by-example/index.html
fn main() { println!("Hello World!"); } No.2 src/main.rs
$cargo run Hello World! No.2 src/main.rs
use std::process::Command; fn main() { Command::new("ls") .arg("-l") .arg("-a") .spawn() .expect("ls
command failed to start"); } No.2
use std::net::{TcpListener, TcpStream}; use std::thread; // traits use std::io::Read; use
std::io::Write; fn handle_client(mut stream: TcpStream) { let mut buf; loop { // clear out the buffer so we don't send garbage buf = [0; 512]; let _ = match stream.read(&mut buf) { Err(e) => panic!("Got an error: {}", e), Ok(m) => { if m == 0 { // we've got an EOF break; } m }, }; match stream.write(&buf) { Err(_) => break, Ok(_) => continue, } } } fn main() { let listener = TcpListener::bind("127.0.0.1:8888").unwrap(); for stream in listener.incoming() { match stream { Err(e) => { println!("failed: {}", e) } Ok(stream) => { thread::spawn(move || { handle_client(stream) }); } } } } No.2
None
None
No.3
No.3
No.3 • • • • https://rust-lang-ja.github.io/the-rust-programming- language-ja/1.6/book/crates-and-modules.html
No.3 • • • •
None