Skip to content

JasonkayZK/rust-learn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Learn

A repo to learn rust.

This main branch is a standard template for new rust project!


Learning Resource

Learn Rust with:

Exercises:

Gitbook Url:


Jupyter

The Jupyter branch is shown below (Which helps you run Rust as script!):

Which depend on jupyter kernel:


Create Project

Use Cargo to create a project:

cargo new hello_rust --bin

build:

cd hello_rust && cargo build --release

run:

./target/release/hello_rust
Hello, world!

Or just run program with:

cargo run

Now Finished

Project Date Note Linked Blog
chapter2-guessing-game 2021-06-01 A guessing game
chapter3-variables 2021-06-02 Variable & Type
multiple-main-demo 2021-06-02 A demo to show how to run multiple main
chapter4-function 2021-06-02 Function
chapter5-control-flow 2021-06-02 Control flow(if/loop/while/for)
chapter6-ownership 2021-06-03 Ownership(also string/slice)
chapter7-struct 2021-06-04 Struct
chapter8-enum-and-match 2021-06-07 Enum & Match
chapter9-modules 2021-06-07 Modules(mod/pub/use/super)
chapter10-collections 2021-06-09 Vector & String & Map
chapter11-error-handling 2021-06-09 Error handling (Panic! & Result)
chapter12-generic-trait-lifetime 2021-06-10 Generic & Trait & Lifetime
chapter13-testing 2021-06-12 Testing(Write, Run & Organize)
chapter14-io-project-grep 2021-06-13 A io project: mini-grep written in rust.
chapter15-functional-features 2021-06-14 Functional features(Closure & Iterator) in rust.
chapter16-cargo 2021-06-15 Cargo(Config, Publish, Install & Extend) & Workspace in rust.
chapter17-smart-pointer 2021-09-29 Smart Pointer(Within double-linked-list accomplishment).
chapter18-concurrency 2021-10-03 Concurrency.
chapter19-oop 2021-11-14 Object-Oriented-Programming.
chapter20-match-patterns 2021-11-14 The Match Patterns.
chapter21-advanced-features 2021-11-14 The advanced features:
Unsafe、Lifetime、Trait、Type、Function & Closure
actix-web-demo 2021-10-04 RESTful API accomplished by actix-web framework.
rbatis-demo 2021-10-07 A demo to show how to use ORM framework: rbatis
wasm-hello 2021-10-09 A simple rust-wasm demo.[Use template: wasm-pack-template] 《Rust实现WebAssembly初窥》
feature-phantom 2021-10-19 A demo to show how to use PhantomData beautify your code 《Rust中的PhantomType》
url-mapper-rs 2021-12-04
(2021-12-21 Last Updated)
A simple URL Mapper service built 《Building a Web Application with Rust》
algorithm 2021-12-22 Collect lots of algorithm & data structures(Such as: LinkedList, …)
too-many-lists 2022-01-05 A accomplishment for Learn Rust With Entirely Too Many Linked Lists
ffi-demo 2022-01-17 A FFI(Foreign Function Interface) demo according to:
https://nomicon.purewhite.io/ffi.html
hot-reload 2022-08-10 A demo to show hot-reload.
Reference: https://robert.kra.hn/posts/hot-reloading-rust/
tokio 2022-11-01 A branch to learn tokio
recover 2022-11-17 A branch to show how rust recovered from panic 《Rust从panic中恢复》
build-version 2022-11-17 A branch to use build.rs add commit version for binary executable 《为Cargo编译的可执行文件增加commit版本号》
error 2022-11-18 A branch to show error handle 《Rust中的错误处理》
project-structure 2022-11-19 A branch to show how rust project structure organized 《Rust模块组织结构》
default-and-with 2022-11-19 Use Default or With Trait to initiate item 《Rust中的默认初始化和初始化重载》
cargo 2022-11-23 A branch to learn cargo 《Cargo命令及其扩展》
compare 2022-11-23 A branch to show how PartialEq/Ord, Eq/Ord works 《Rust中的比较》
any 2022-11-25 A branch to show reflection via Any 《Rust反射之Any》
《Rust中的向下转型》
reflection 2022-11-25 A branch to show reflection via proc-macros 《Rust反射之过程宏》
cargo-features 2022-11-28 A branch to show cargo features 《通过一个例子学习Cargo-Features》
future 2022-11-29 A branch to show how to use future and how it works 《Rust中Future执行底层探秘》
grpc 2022-12-03 A branch to show how to use grpc via tonic 《Rust的GRPC实现Tonic》
sqlite 2023-07-11 A branch to show how to use sqlite & migrations in rust. 《在Rust中使用SQLite和Migration》
cr-sqlite 2023-09-07 A branch to show how to test cr-sqlite
sync 2023-09-13 A branch to show how to sync data between servers via tonic
automerge 2023-09-30 A repo to learn how to use autosurgeon.
p2panda-demo 2023-11-12 A demo to show how to use p2panda to create a local-first application.
global-vars 2023-11-27 A branch to show how to define a global variable in Rust. 《Rust中创建全局变量》
overflow 2023-12-13 A branch to show how to handle arithmetic overflow 《在Rust中处理整数溢出》
proj/p2p-demo 2023-12-27 A branch to show how to use libp2p 《Rust中使用libp2p》
proj/p2p-sync 2023-12-31 A branch to show how to use gossip and append-log sync data in p2p network 《使用AppendLog和Gossip在P2P网络中同步状态》

Serial Project

url-mapper-rs

Project Space:

Learning Step:

algorithm

Project Space:

Learning Step:

Not Yet!


More Info

About

A repo to learn rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published