Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Rustでパケットと戯れる
Search
nwiizo
December 22, 2017
420
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rustでパケットと戯れる
nwiizo
December 22, 2017
Transcript
22 slides
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
More Decks by nwiizo
See All by nwiizo
おい、エージェントを使って終わらせろ
nwiizo
3
1.2k
AI時代の「技術的負債」の変質ー概念の終焉と再解釈、エージェントと共に向かう先
nwiizo
2
4.5k
AIで実装は速くなった。なのにプロダクトは速くならない。職能の壁を越えて価値のフローを設計する
nwiizo
10
9.4k
35分でわかるEffective Platform Engineering
nwiizo
6
1.3k
20分でわかるセキュアAPI
nwiizo
3
570
型は壁、Rustでもバグを直すな、表現できなくせよ
nwiizo
16
2.8k
システムは「動く」だけでは足りない 実装編 - 非機能要件・分散システム・トレードオフをコードで見る
nwiizo
5
820
システムは「動く」だけでは 足りない - 非機能要件・分散システム・トレードオフの基礎
nwiizo
34
12k
アーキテクチャモダナイゼーションとは何か
nwiizo
18
9k
Featured
See All Featured
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
640
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
400
Side Projects
sachag
456
43k
My Coaching Mixtape
mlcsv
0
390
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Building AI with AI
inesmontani
PRO
1
1.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3.1k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
570
Done Done
chrislema
187
17k