C 에서 Rust 로 main 언어로 사용하기 위한 여정: My journey to be a Rustacean 🦀
- one-stop package & build system
- test built-in support, easy TDD
- memory safe coding
- compiler driven development
- dev community
- documentations
- modern programming concepts
- wide range from embedded to web
- statements and expressions
- statements
- serve mostly to contain and explicitly sequence expression evaluation : does not return, followed by
;
- declaration statements
- expression statements
- serve mostly to contain and explicitly sequence expression evaluation : does not return, followed by
- expressions
- it always produces a value, and it may have effects : returns a value
- evaluates to a value, and has effects during evaluation
- statements
- ownership
- the main purpose of ownership is to manage heap data
- rules
- Each value in Rust has an owner.
- There can only be one owner at a time.
- When the owner goes out of scope, the value will be dropped.
- reference
- like a pointer in that it’s an address we can follow to access the data stored at that address
- rules
- 1 mutable reference or N immutable references.
- always be valid.
- borrowing
- the action of creating a reference
- borrow checker
- compares scopes to determine whether all borrows are valid
- enum
- give you a way of saying a value is one of a possible set of values
- can have associated values
- pattern matching
- patterns : Literals, Destructured arrays, enums, structs, or tuples, variables, wildcards, placeholders
- matching : compare it to some value. If the pattern matches, use the value parts in our code
- generics
- abstract stand-ins for concrete types or other properties
- concrete type (i32, f32, String ...)
- generic types
- Option
- Result<T, E>
- Vec
- HashMap<K, V>
- monomorphization
- turning generic code into specific code by filling in the concrete types that are used when compiled
- abstract stand-ins for concrete types or other properties
- trait
- defines functionality a particular type has and can share with other types (shared behavier, like interface)
- lifetime
- another kind of generic
- ensure that references are valid as long as we need them to be
- functional programming
- style
- using functions as values by passing them in arguments,
returning them from other functions, assigning them to variables for later execution
- using functions as values by passing them in arguments,
- closure
- a function-like construct you can store in a variable
- iterator
- a way of processing a series of elements
- style
- smart pointers
- pointer
- general concept for a variable that contains an address in memory
- smart pointer
- data structures that act like a pointer but also have additional metadata and capabilities
- deref coercion
- converts a reference to a type that implements the Deref trait into a reference to another type
- Interior mutability
- a mutable borrow to an immutable value
- common smart pointers
- Box for allocating values on the heap
- Rc, a reference counting type that enables multiple ownership
- Ref, RefMut, accessed through RefCell,
a type that enforces the borrowing rules at runtime instead ofcompile time
- pointer
- The book
- The book community 번역 버젼 (https://rinthel.github.io/rust-lang-book-ko/)
- 챕터별로 번역 스타일이 다르고 가독성이 떨어짐 (22.05.19)
- The book 한글판 : [러스트 프로그래밍 공식 가이드] (https://www.aladin.co.kr/shop/wproduct.aspx?ItemId=216867525)
- 전반적으로 번역이 좋다. 영어로 그대로 두어도 괜찮은 것들은 두면 좋겠다.
- The book community 번역 버젼 (https://rinthel.github.io/rust-lang-book-ko/)
- Easy Rust : Rust를 배웁시다. (Kor/Eng) by David MacLeod
- Easy Rust Korean / 한국어판 강의
- 정렬된 강의 비디오 리스트 TOC of Easy Rust
- Easy Rust Book
- Easy Rust Korean / 한국어판 강의
muscle memory building(actually it doensnt have memory though)
어느 정도 코딩할 수 있을 정도 지식이 생기면, 코딩 하면서 부족한 부분을 명확히 인지하게 되고 그 부분을 관련 자료 찾아 공부
-
Rustlings : 조금 쉬운 편 (22.05.20) https://github.com/rust-lang/rustlings
-
Exercism : Online learning how to coding platform (코딩 인터뷰용이라기 보단, 교육적 목적 for free)
https://exercism.org/tracks/rust
Solve coding exercises and get mentored to gain true fluency in your chosen programming languages.
Web에서 문제를 풀어볼 수 있지만, WORK LOCALLY 방식으로 IDE의 도움받아서 코딩하는 것이 좋고, Test Case를 통해 힌트를 얻고 test 작성법을 배울 수 있다. -
Coding Quiz(Leetcode 류의 문제) : 연습량 늘리기 /practice/training/
- Actix 로 Back-end 만드는 과정, 최근에 Update 되었고, 책을 쓴 이유 중 하나가 새로 오는 팀원들을 위해 썼다고 한다. 그래서, 초보용 책은 아니지만, 세심하게 배려했다고 서문과 리뷰에 언급되어 있어 안심하고 구매(했지만, 어렵다.)
useful, big idea, start small 만들자 무언가 (생각나는 대로 적어 보고, 점차 구체화 할 것)
- Quant Stock Trading
- Stock Trading SDK + Trader App (한국투자증권 KIS API)
https://github.com/goodsw4all/KIS_OpenAPI_in_Rust
- Stock Trading SDK + Trader App (한국투자증권 KIS API)
- GUI App
- Metronome
- 공공 Data API 를 활용해서 sth?
- Linux Kernel Module
- 기존의 C(or any others)로 된 것을 rewrite
- 번역
- rust by example
https://goodsw4all.github.io/rust-by-example-ko/index.html
- rust by example
- Iterator
https://www.newline.co/@uint/rust-iterators-a-guide - Smart pointers