-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathrust.txt
1597 lines (1375 loc) · 54.1 KB
/
rust.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
半小时入门 Rust
https://quickref.me/rust
https://mp.weixin.qq.com/s/_elPKI64bRk1-8lC8V9mMQ
https://github.com/rust-unofficial/awesome-rust
https://course.rs/
https://wiki.mozilla.org/Areweyet
https://www.rust-lang.org/tools/install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
curl https://sh.rustup.rs -sSf | sh
cargo new notes
cargo run
https://mp.weixin.qq.com/s/trozFjh1XaauX9EGGOiWXg
https://www.rust-lang.org/zh-CN/tools/install
https://www.rust-lang.org/zh-CN/learn
https://github.com/wtklbm/rust-library-i18n
https://serokell.io/blog/open-source-rust
安装 Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
curl https://sh.rustup.rs -sSf | sh
source "$HOME/.cargo/env"
rustc --version
rustup update
rustup update stable
rustup self uninstall
rustup target list
rustup target add
$ # for bash
$ RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install stable # for stable
$ # for fish
$ env RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install stable # for stable
$ # for bash
$ RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install nightly # for nightly
$ # for fish
$ env RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install nightly # for nightly
$ # for bash
$ RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install nightly-YYYY-mm-dd
$ # for fish
$ env RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install nightly-YYYY-mm-dd
$ # for bash
$ echo 'export RUSTUP_UPDATE_ROOT=https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup' >> ~/.bash_profile
$ echo 'export RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup' >> ~/.bash_profile
$ # for fish
$ echo 'set -x RUSTUP_UPDATE_ROOT https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup' >> ~/.config/fish/config.fish
$ echo 'set -x RUSTUP_DIST_SERVER https://mirrors.tuna.tsinghua.edu.cn/rustup' >> ~/.config/fish/config.fish
rustup default stable
RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install stable
rustup default nightly
RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup default nightly
export http_proxy="127.0.0.1:1087"
export https_proxy="127.0.0.1:1087"
export http_proxy=""
export https_proxy=""
rustc hello.rs
./hello
https://cargo.budshome.com/index.html
https://doc.rust-lang.org/cargo/getting-started/installation.html
cargo new hello_world --bin
cargo build
cargo build --release
cargo build --example
热重载
cargo install cargo-watch
cargo uninstall cargo-watch
cargo watch -x 'run --example hello_world'
cargo test
cargo run
cargo tree [options]
cargo search [options] [query...]
cargo install cargo-edit
cargo add
cargo edit
cargo rm
cargo upgrade
cargo set-version
cargo cache verify 将尝试在cargo载缓存中找到损坏或修改的 crates.
cargo install cargo-udeps --locked
cargo +nightly udeps #查找未使用的依赖项
忽略依赖项 要忽略某些依赖项,请添加package.metadata.cargo-udeps.ignore到Cargo.toml.
[package.metadata.cargo-udeps.ignore]
normal = ["if_chain"]
#development = []
#build = []
[dependencies]
if_chain = "1.0.0" # Used only in doc-tests, which `cargo-udeps` cannot check.
cargo install cargo-expand
cargo expand
cargo install cargo-tarpaulin
cargo tarpaulin #代码覆盖率报告
cargo install cargo-audit
cargo audit #安全漏洞审核
cargo install --locked cargo-deny && cargo deny init && cargo deny check
cargo deny #项目的依赖关系图
cargo xcodebuild run
https://github.com/sgeisler/cargo-remote
cargo install --path cargo-remote/
brew install rsync
# 在本机编译
cargo build --release
# 用远程编译
cargo remote -- build --release
# 在本机编译
cargo run --release
# 用远程编译
cargo remote -- run --release
# Install the toolchain to build Linux x86_64 binaries
rustup target add x86_64-unknown-linux-gnu
cargo build --release --target=x86_64-unknown-linux-gnu
https://crates.io/
cargo build --target aarch64_be-unknown-linux-gnucargo build --target aarch64-unknown-linux-gnu_ilp32cargo build --target aarch64_be-unknown-linux-gnu_ilp32
https://actix.rs/
http://lib.rs/
12个Rust的Tips
使用 Cow<str> 作为返回类型
使用 Crossbeam channels 取代标准库
使用 Scopeguard 实现类似 Golang 的延迟运算
使用 Cargo-make 打包
自定义和链接 Panic 处理程序
在 VSCode 中使用 Rust Analyzer
用到闭包时使用 impl Trait
在保存时为 VSCode 启用 Clippy
使用 thiserror 和 anyhow 处理惯用错误
使用 dbg!() 替换 println!()
使用 include_str!() 和 include_bytes!() 宏在编译时读取文件
使用 cc crate 与 C/C++ 代码交互
https://github.com/helix-editor/helix
brew tap helix-editor/helix
brew install helix
https://github.com/sharkdp/hyperfine
brew install hyperfine
cargo install hyperfine
hyperfine 'sleep 0.3'
hyperfine --min-runs 5 'sleep 0.2' 'sleep 3.2'
hyperfine --warmup 3 'grep -R TODO *'
hyperfine --prepare 'make clean' --parameter-scan num_threads 1 12 'make -j {num_threads}'
hyperfine --parameter-scan delay 0.3 0.7 -D 0.2 'sleep {delay}'
hyperfine --show-output "cat /tmp/bigfile"
hyperfine --warmup 3 'fd -e jpg -uu' 'find -iname "*.jpg"'
hyperfine --warmup 3 'fd -HI ".*[0-9]\.jpg$"' 'find . -iname "*[0-9].jpg"' 'find . -iregex ".*[0-9]\.jpg$"'
webdav
https://github.com/sigoden/duf
duf --allow-all folder_name
下载
curl http://127.0.0.1:5000/some-file
curl -o some-folder.zip http://127.0.0.1:5000/some-folder?zip
上传
curl --upload-file some-file http://127.0.0.1:5000/some-file
删除
curl -X DELETE http://127.0.0.1:5000/some-file
websocket
https://github.com/websockets-rs/rust-websocket
https://github.com/housleyjk/ws-rs
https://github.com/snapview/tungstenite-rs
https://github.com/snapview/tokio-tungstenite
https://github.com/actix/actix-web
https://github.com/PrivateRookie/ws-tool
web server
https://github.com/actix/actix-web
https://github.com/hyperium/hyper
https://github.com/seanmonstar/warp
https://github.com/flosse/rust-web-framework-comparison
https://github.com/SergioBenitez/Rocket
https://github.com/gotham-rs/gotham
https://github.com/tokio-rs/tokio
https://github.com/iron/iron
https://github.com/http-rs/tide
https://github.com/salvo-rs/salvo
https://github.com/ntex-rs/ntex
https://github.com/tokio-rs/axum
https://github.com/poem-web/poem
https://github.com/thruster-rs/Thruster
https://github.com/trillium-rs/trillium
https://github.com/tiny-http/tiny-http
https://github.com/Xudong-Huang/may
https://github.com/Xudong-Huang/may_minihttp
https://github.com/ntex-rs/ntex
https://www.techempower.com/benchmarks/#section=data-r20&hw=ph&test=fortune
web app wasm WebAssembly
https://github.com/yewstack/yew
https://yew.rs/
https://github.com/seed-rs/seed
https://github.com/ivanceras/sauron
https://github.com/schell/mogwai
https://github.com/Pauan/rust-dominator
https://github.com/sycamore-rs/sycamore
https://github.com/chinedufn/percy
https://github.com/firecracker-microvm/firecracker
https://github.com/serverless/serverless
https://github.com/cloudflare/quiche #QUIC HTTP3
https://github.com/mozilla/neqo
https://github.com/swc-project/swc
https://swc.rs/
https://github.com/napi-rs/napi-rs
https://github.com/Brooooooklyn/rust-to-nodejs-overhead-benchmark
https://github.com/WasmEdge/WasmEdge
https://github.com/DioxusLabs/dioxus
https://github.com/sycamore-rs/sycamore
https://github.com/ardaku/pasts #轻量级 用于嵌入式系统、GUI 应用程序和视频游戏,而不是专注于 Web 服务器
https://github.com/Zaplib/zaplib #用于使用 Rust 和 WebAssembly 加速 Web 应用程序
https://github.com/fermyon/spin
发邮件
https://crates.io/crates/lettre
https://github.com/lettre/lettre
web client
https://github.com/actix/actix-web
https://github.com/seanmonstar/reqwest
https://github.com/hyperium/hyper
https://github.com/apoelstra/rust-jsonrpc/
https://github.com/paritytech/jsonrpsee
https://github.com/paritytech/jsonrpc
https://github.com/actix/actix-web/tree/master/awc
https://github.com/Orange-OpenSource/hurl
jq json
https://github.com/01mf02/jaq
https://github.com/stedolan/jq
Algorithms
https://github.com/douchuan/algorithm
https://github.com/rmw-link/rmw-utf8
https://github.com/google/tarpc
raft 框架
https://github.com/tikv/raft-rs
https://github.com/ritelabs/riteraft
static site
https://github.com/jameslittle230/stork
容器
Bottlerocket,这是一个用 Rust 编写的基于 Linux 的容器操作系统
https://github.com/bottlerocket-os/bottlerocket
protobuf
https://github.com/stepancheg/rust-protobuf/
https://github.com/tokio-rs/prost
buffer bytes
https://github.com/erenon/cueue
用于远程构建的工具。同步项目到远程机器,执行命令,同步回来。
https://github.com/buildfoundation/mainframer
Rust 模板引擎 template
https://github.com/Kogia-sima/sailfish
https://github.com/Keats/tera
https://github.com/nickel-org/rust-mustache
https://github.com/cobalt-org/liquid-rust
https://github.com/sunng87/handlebars-rust
https://github.com/Stebalien/horrorshow-rs
https://github.com/lfairy/maud
https://github.com/djc/askama
https://github.com/dpc/stpl
https://github.com/kaj/ructe
https://github.com/bodil/typed-html
proxy QUIC protocol
https://github.com/EAimTY/tuic
设计模式
https://github.com/rust-unofficial/patterns
web build tool
https://mp.weixin.qq.com/s/LSIi2P6FKnJ0GTodaTUGKw
https://github.com/parcel-bundler/parcel
https://github.com/parcel-bundler/parcel-css
https://parceljs.org/docs/
yarn add --dev parcel
npm install --save-dev parcel
https://parceljs.org/getting-started/webapp/
https://github.com/rome/tools
替代
https://github.com/eslint/eslint
https://github.com/babel/babel
https://github.com/prettier/prettier
https://github.com/facebook/jest
https://github.com/webpack/webpack
https://github.com/denoland/deno
https://github.com/swc-project/swc
https://github.com/vercel/next.js
Notion
https://github.com/AppFlowy-IO/appflowy
https://mp.weixin.qq.com/s/PvcHpculPHDh8QlUPuzldQ
TCP转发工具
https://github.com/yuchunzhou/tcpforward
tcpforward -h
tcpforward --local-ip <本地ip > --local-port <本地端口> --remote-ip <远程ip > --remote-port <远程端口>
分布式的任务调度
https://github.com/BinChengZhao/delicate
多任务调度中间件
https://github.com/gqf2008/xtask
远程桌面
https://github.com/rustdesk/rustdesk
GO代码检查
https://github.com/golangci/golangci-lint/releases
golangci-lint version
golangci-lint run
golangci-lint run dir1 dir2/... dir3/file1.go
golangci-lint run --disable-all -E errcheck
golangci-lint run -p bugs -p error
https://github.com/mgdm/htmlq
cargo install htmlq
htmlq -h
curl --silent https://www.rust-lang.org/ | htmlq '#get-help'
curl --silent https://www.rust-lang.org/ | htmlq --attribute href a
curl --silent https://nixos.org/nixos/about.html | htmlq --text .main
curl --silent https://mgdm.net | htmlq --pretty '#posts'
https://github.com/sharkdp/fd
apt install fd-find
dnf install fd-find
dpkg -i fd_8.2.1_amd64.deb
apt-get install fd-find
apk add fd
pacman -S fd
emerge -av fd
zypper in fd
xbps-install -S fd
brew install fd
scoop install fd
choco install fd
nix-env -i fd
pkg install fd-find
npm install -g fd-find
cargo install fd-find
USAGE:
fd [FLAGS/OPTIONS] [<pattern>] [<path>...]
FLAGS:
-H, --hidden 搜索隐藏的文件和目录
-I, --no-ignore 不要忽略 .(git | fd)ignore 文件匹配
--no-ignore-vcs 不要忽略.gitignore文件的匹配
-s, --case-sensitive 区分大小写的搜索(默认值:智能案例)
-i, --ignore-case 不区分大小写的搜索(默认值:智能案例)
-F, --fixed-strings 将模式视为文字字符串
-a, --absolute-path 显示绝对路径而不是相对路径
-L, --follow 遵循符号链接
-p, --full-path 搜索完整路径(默认值:仅限 file-/dirname)
-0, --print0 用null字符分隔结果
-h, --help 打印帮助信息
-V, --version 打印版本信息
OPTIONS:
-d, --max-depth <depth> 设置最大搜索深度(默认值:无)
-t, --type <filetype>... 按类型过滤:文件(f),目录(d),符号链接(l),
可执行(x),空(e)
-e, --extension <ext>... 按文件扩展名过滤
-x, --exec <cmd> 为每个搜索结果执行命令
-E, --exclude <pattern>... 排除与给定glob模式匹配的条目
--ignore-file <path>... 以.gitignore格式添加自定义忽略文件
-c, --color <when> 何时使用颜色:never,*auto*, always
-j, --threads <num> 设置用于搜索和执行的线程数
-S, --size <size>... 根据文件大小限制结果。
ARGS:
<pattern> the search pattern, a regular expression (optional)
<path>... the root directory for the filesystem search (optional)
find . -name 标准库
fd 标准库
# 转换 所有 jpg 到 png :
fd -e jpg -x convert {} {.}.png
# Unpack all zip files (if no placeholder is given, the path is appended):
fd -e zip -x unzip
# Convert all flac files into opus files:
fd -e flac -x ffmpeg -i {} -c:a libopus {.}.opus
# Count the number of lines in Rust files (the command template can be terminated with ';'):
fd -x wc -l \; -e rs
正则
https://github.com/rulex-rs/rulex
面向行的搜索工具
ripgrep 递归搜索目录中的正则表达式模式,同时尊重您的 gitignore
https://github.com/BurntSushi/ripgrep
brew install ripgrep
cargo install ripgrep
dnf install ripgrep
rg -n -w '[A-Z]+_SUSPEND'
git grep -P -n -w '[A-Z]+_SUSPEND'
ugrep -r --ignore-files --no-hidden -I -w '[A-Z]+_SUSPEND'
ag -w '[A-Z]+_SUSPEND'
LC_ALL=C git grep -E -n -w '[A-Z]+_SUSPEND'
ack -w '[A-Z]+_SUSPEND'
LC_ALL=en_US.UTF-8 git grep -E -n -w '[A-Z]+_SUSPEND'
rg -uuu -tc -n -w '[A-Z]+_SUSPEND'
ugrep -r -n --include='*.c' --include='*.h' -w '[A-Z]+_SUSPEND'
egrep -r -n --include='*.c' --include='*.h' -w '[A-Z]+_SUSPEND'
rg -w 'Sherlock [A-Z]\w+'
ugrep -w 'Sherlock [A-Z]\w+'
LC_ALL=en_US.UTF-8 egrep -w 'Sherlock [A-Z]\w+'
https://github.com/bootandy/dust
brew install dust
Usage: dust
Usage: dust <dir>
Usage: dust <dir> <another_dir> <and_more>
Usage: dust -p (full-path - Show fullpath of the subdirectories)
Usage: dust -s (apparent-size - shows the length of the file as opposed to the amount of disk space it uses)
Usage: dust -n 30 (shows 30 directories instead of the default [default is terminal height])
Usage: dust -d 3 (shows 3 levels of subdirectories)
Usage: dust -r (reverse order of output)
Usage: dust -X ignore (ignore all files and directories with the name 'ignore')
Usage: dust -x (only show directories on the same filesystem)
Usage: dust -b (do not show percentages or draw ASCII bars)
Usage: dust -i (do not show hidden files)
Usage: dust -c (No colors [monochrome])
Usage: dust -f (Count files instead of diskspace)
Usage: dust -t Group by filetype
Usage: dust -e regex Only include files matching this regex (eg dust -e "\.png$" would match png files)
dust -r
dust -d 1
https://github.com/seanmonstar/reqwest:#http request lib
https://github.com/skerkour/kerkour.com
json
https://github.com/serde-rs/serde:#json Serialization
https://github.com/shogan/fstojson-rust #json Serialization
https://github.com/RedisJSON/RedisJSON
redis-server --loadmodule ./target/release/librejson.so
redis-server --loadmodule ./target/release/librejson.dylib
redis
https://github.com/redis-rs/redis-rs
https://github.com/tidwall/redcon.rs
https://github.com/tokio-rs/mini-redis
https://github.com/ekzhang/redis-rope
https://github.com/ducaale/xh
# Send a GET request
xh httpbin.org/json
# Send a POST request with body {"name": "ahmed", "age": 24}
xh httpbin.org/post name=ahmed age:=24
# Send a GET request with querystring id=5&sort=true
xh get httpbin.org/json id==5 sort==true
# Send a GET request and include a header named x-api-key with value 12345
xh get httpbin.org/json x-api-key:12345
# Send a PUT request and pipe the result to less
xh put httpbin.org/put id:=49 age:=25 | less
# Download and save to res.json
xh -d httpbin.org/json -o res.json
Tokio 是一个事件驱动的非阻塞 I/O 平台
https://tokio.rs/tokio/tutorial
https://github.com/tokio-rs/tokio
https://github.com/tokio-rs/axum
https://github.com/ulid/spec
https://github.com/rust-lang/futures-rs
https://github.com/async-rs/async-std
https://github.com/smol-rs/smol
https://github.com/smoltcp-rs/smoltcp
https://github.com/DataDog/glommio
https://github.com/embassy-rs/embassy
https://github.com/bastion-rs/bastion
https://github.com/bytedance/monoio
https://github.com/bytedance/keyhouse
https://github.com/DataDog/glommio
https://github.com/hyperium/hyper:#Rust 的快速且正确的 HTTP/1.1 和 HTTP/2 实现。
https://github.com/hyperium/tonic:基于 HTTP/2 的 gRPC 实现专注于高性能、互操作性和灵活性。
https://github.com/seanmonstar/warp:用于加速速度的超级简单、可组合的 Web 服务器框架。
https://github.com/tower-rs/tower:用于构建强大的网络客户端和服务器的模块化和可重用组件库。
https://github.com/tokio-rs/tracing(以前tokio-trace):用于应用程序级跟踪和异步感知诊断的框架。
https://github.com/tokio-rs/rdbc:用于 MySQL、Postgres 和 SQLite 的 Rust 数据库连接库。
https://github.com/tokio-rs/mio:对 OS I/O API 的低级、跨平台抽象,为 tokio.
https://github.com/tokio-rs/bytes:用于处理字节的实用程序,包括高效的字节缓冲区。
https://github.com/tokio-rs/loom:并发 Rust 代码的测试工具
https://github.com/epilys/rsqlite3:sqlite3
https://github.com/wangfenjin/duckdb-rs
https://github.com/duckdb/duckdb
https://github.com/rusqlite/rusqlite
https://github.com/apache/arrow-rs
https://github.com/sfackler/rust-postgres
https://github.com/losfair/mvsqlite
https://github.com/canonical/dqlite
https://github.com/rqlite/rqlite
https://github.com/phiresky/sqlite-zstd
https://github.com/tokio-rs/console
https://github.com/googleforgames/quilkin
GraphQL
https://github.com/async-graphql/async-graphql
https://async-graphql.github.io/async-graphql/en/index.html
https://github.com/graphql-rust/juniper
音乐制作
https://github.com/MeadowlarkDAW/Meadowlark
密钥
https://github.com/SpectralOps/keyscope
下载
https://github.com/agourlay/dlm
GPU framework
https://github.com/UpsettingBoy/gpgpu-rs
https://github.com/Eraden/amdgpud
GAME
https://github.com/WanderHuang/game-2048-tui
https://github.com/17cupsofcoffee/tetra
https://github.com/ozkriff/zemeroth
https://github.com/doukutsu-rs/doukutsu-rs
https://github.com/cristicbz/rust-doom
https://github.com/citybound/citybound
https://github.com/rsaarelm/magog
https://github.com/swatteau/sokoban-rs
https://github.com/thetawavegame/thetawave-legacy
https://gitlab.com/veloren/veloren
https://github.com/ozkriff/zoc
https://github.com/fishfight/FishFight
https://github.com/fishfight/FishLauncher
https://github.com/gaxxx/jy-rs/
TIME
https://github.com/wandercn/gostd
Rust 的微型框架
https://github.com/xvxx/vial
https://github.com/kolapapa/surge-ping
https://github.com/japaric/xargo
https://github.com/rust-lang/libc 帮助libc库完善了对于 mips-uclibc 的支持;
https://github.com/rust-lang/socket2 支持了绑定interface的功能,并且添加了对mipsel-uclibc的支持;
https://github.com/kolapapa/surge-ping 一个异步Ping的实现,也可以用作traceroute (ICMP版);
https://github.com/rustls/rustls
https://github.com/multimeric/emoji_pix
cargo install emoji_pix
emoji_pix ferris.png --width 30
SHELL
https://github.com/nushell/nushell
https://github.com/adam-mcdaniel/dune
https://github.com/withfig/autocomplete
https://github.com/withfig/fig
https://github.com/matklad/xshell
SHELL提示
https://github.com/starship/starship
一个跨平台的 OpenGL 终端模拟器
https://github.com/alacritty/alacritty
命令行cli
https://github.com/Rigellute/spotify-tui
https://github.com/fdehau/tui-rs
https://github.com/cjbassi/ytop
https://github.com/gyscos/cursive
https://github.com/TaKO8Ki/gobang
https://github.com/crossterm-rs/crossterm
https://github.com/FeistyKit/quickstudy
https://github.com/clap-rs/clap
https://github.com/petridish-dev/petridish
https://github.com/killercup/cargo-edit
https://github.com/mitsuhiko/indicatif
https://github.com/simeg/eureka
https://github.com/pier-cli/pier
https://github.com/ndaba1/cmder
https://github.com/jiashiwen/interactcli-rs
https://github.com/pacak/bpaf
https://github.com/console-rs/indicatif #progress
https://docs.rs/crate/getargs/0.5.0/source/
https://github.com/ad4mx/spinoff
Rust 中的命令行应用
https://suibianxiedianer.github.io/rust-cli-book-zh_CN/README_zh.html
一个 Spotify 守护进程
https://github.com/Spotifyd/spotifyd
TUI文件浏览
https://github.com/mgunyho/tere
xss sqlinjection
https://github.com/arvancloud/libinjection-rs
https://github.com/0x727/ObserverWard_0x727
带有 Windows 和 Linux 的交互式绑定/反向 PTY shell 支持由 Rust 实现
https://github.com/b23r0/Cliws
下载网页 一个用 Rust 编写的快速、简单、递归的内容发现工具
https://github.com/epi052/feroxbuster
https://github.com/phra/rustbuster
可编写脚本的网络身份验证破解程序(以前称为“badtouch”)
https://github.com/kpcyrd/authoscope
tcp 连接劫持者,shijack 的 Rust 重写
https://github.com/kpcyrd/rshijack
安全的多线程数据包嗅探器
https://github.com/kpcyrd/sniffglue
密码管理
https://github.com/cortex/ripasso/
端口扫描
https://github.com/RustScan/RustScan
hex viewer
https://github.com/sharkdp/hexyl
apt install hexyl
apt-get install hexyl
pacman -S hexyl
brew install hexyl
cargo install hexyl
scoop install hexyl
hexyl small.png
hexyl -n 256 $(which hexyl)
csv
https://github.com/BurntSushi/xsv
brew install xsv
xsv headers worldcitiespop.csv
xsv index worldcitiespop.csv
xsv stats worldcitiespop.csv --everything | xsv table
xsv count worldcitiespop.csv
xsv slice worldcitiespop.csv -s 3173948 | xsv table
xsv select Country,AccentCity,Population worldcitiespop.csv \
| xsv sample 10 \
| xsv table
xsv frequency worldcitiespop.csv --limit 5
xsv search -s Population '[0-9]' worldcitiespop.csv \
| xsv select Country,AccentCity,Population \
| xsv sample 10 \
| xsv table
xsv join --no-case Country sample.csv Abbrev countrynames.csv | xsv table
xsv join --no-case Country sample.csv Abbrev countrynames.csv \
| xsv select 'Country[1],AccentCity,Population' \
| xsv table
xsv join --no-case Abbrev countrynames.csv Country worldcitiespop.csv \
| xsv select '!Abbrev,Country[1]' \
> worldcitiespop_countrynames.csv
ORM
https://github.com/diesel-rs/diesel #PostgreSQL MYSQL SQLITE
https://github.com/rbatis/rbatis #PostgreSQL MYSQL SQLITE Mssql/Sqlserver MariaDB TiDB CockroachDB
https://github.com/ivanceras/rustorm
https://github.com/SeaQL/sea-orm
https://github.com/SeaQL/sea-orm/releases/tag/0.2.2
https://github.com/launchbadge/sqlx
https://github.com/roy-ganz/toql
https://crates.io/crates/sea-orm
database
https://gitlab.com/tglman/persy
https://github.com/tikv/tikv
https://github.com/datafuselabs/databend #云数据仓库
https://databend.rs/doc/deploy/deploying-databend
https://github.com/indradb/indradb
https://github.com/MaterializeInc/materialize
https://github.com/mit-pdos/noria
https://github.com/PumpkinDB/PumpkinDB
https://github.com/seppo0010/rsedis
https://github.com/skytable/skytable
https://github.com/spacejam/sled
https://crates.io/crates/vsdb
https://github.com/ccmlm/vsdb
https://github.com/vorot93/libmdbx-rs
https://github.com/symmetree-labs/infinitree
https://github.com/mrxiaozhuox/dorea/
https://github.com/cberner/redb
https://github.com/LMDB/lmdb
https://github.com/pancake-db/pancake-db
文档数据库
https://github.com/surrealdb/surrealdb
curl -sSf https://install.surrealdb.com | sh
docker run --rm -p 8000:8000 surrealdb/surrealdb:latest start
IndexedDB
https://github.com/devashishdxt/rexie
cache
https://github.com/memc-rs/memc-rs
RisingWave:云中的下一代流式数据库。
https://github.com/singularity-data/risingwave
psql -h localhost -p 4566 -d dev -U root
https://github.com/neondatabase/neon #Neon 是 AWS Aurora Postgres 的无服务器开源替代方案
Pisanix 是一套以数据库为中心的治理框架
https://github.com/database-mesh/pisanix
时序数据库
https://github.com/CeresDB/ceresdb
https://github.com/influxdata/influxdb_iox
https://github.com/tikv/tikv
事件处理
https://github.com/tremor-rs/tremor-runtime
Rust 的 no_std + serde 兼容消息库
https://github.com/jamesmunns/postcard
云环境运行本地应用
https://github.com/metalbear-co/mirrord
模版引擎
https://github.com/Keats/tera
https://github.com/mitsuhiko/minijinja
协作音乐创作
https://github.com/ekzhang/composing.studio
https://composing.studio/productive-animal-5688
音乐播放器
https://github.com/tramhao/termusic
二维码
https://github.com/sayanarijit/qrcode.show
端口转发器
https://github.com/aramperes/onetun
https://github.com/myrfy001/rust_golang_ffi_demo/tree/example_1
https://github.com/myrfy001/rust_golang_ffi_demo/tree/example_2
Golang在编译时可以通过添加-buildmode=c-shared来将一个go写的项目编译成符合CFFI的库文件
首先,这个文件夹结构是通过cargo new --lib rust命令建立的初始架构,然后在src目录下自行新建了ffi.rs和my_app.rs两个文件。
先来查看一下Cargo.toml文件,其中以下的两行是我们自己修改加入的:
[lib]
crate-type = ["cdylib"]
参数解析
https://github.com/Owez/argi
lnx: 一个基于 tantivy 的搜索引擎
它是 MeiliSearch 和 ElasticSearch 的竞品。其基于 tokio-rs,hyper 和 tantivy 进行开发。提供 REST 接口。现已发布 v0.6 版。持续关注。
https://github.com/lnx-search/lnx
https://github.com/valeriansaliou/sonic
https://github.com/pauwels-labs/redact-client
bittorrent client
https://github.com/ikatson/rqbit
自动测试工具
https://github.com/zhiburt/expectrl
不平衡的争吵:为 LD49 制作的自走棋
https://github.com/yopox/LD49
Boa 是一个用 Rust 编写的可嵌入和实验性的 Javascript 引擎
https://github.com/boa-dev/boa
Gameboy 模拟器
https://github.com/jawline/Mimic
fn(Code) -> Docs
https://github.com/anixe/doku
机器人和工具的实时用户界面
https://github.com/rillrate-open/rillrate
https://github.com/rillrate-open/meio
无痛压缩解压
https://github.com/ouch-org/ouch
无服务器数据仓库
https://github.com/datafuselabs/databend
Rust实现的RTPS和DDS。
https://gitee.com/mrunix/lix-dds
https://github.com/rtic-rs/cortex-m-rtic
https://github.com/stm32-rs/stm32f4xx-hal
https://github.com/japaric/heapless
算法
https://github.com/matklad/lock-bench
https://github.com/tidwall/rtree.rs
CAD
https://github.com/hannobraun/Fornjot
氦光网关
https://github.com/helium/gateway-rs
一个简单的批处理文件分类器
https://github.com/Eolien55/FileClassed
通过 TCP、(相互)TLS 或 DNS(权威服务器或直接连接)隧道传输 TCP 或 UDP 流量,在 Rust 中实现
https://github.com/dlemel8/tunneler
分组密码算法集合
https://github.com/RustCrypto/block-ciphers
气象站
https://github.com/codi-hacks/weather-station
Rust 最先进的 Merkle 树库
https://github.com/antouhou/rs-merkle
SixtyFPS 是一个工具包,可以为任何显示器高效开发流畅的图形用户界面:嵌入式设备和桌面应用程序。我们支持多种编程语言,例如 Rust、C++ 或 JavaScript
https://github.com/sixtyfpsui/sixtyfps
命令行表格table
https://github.com/zhiburt/tabled
Linux kernel
https://github.com/nuta/kerla
嵌入式设备
https://github.com/gchp/rustbox
图形 svg 图像处理
https://github.com/ivanceras/svgbob
https://github.com/RazrFalcon/resvg
https://github.com/turnage/valora
https://github.com/Twinklebear/tray_rust
https://github.com/imager-io/imager
https://github.com/colbyn/imager-bench-2019-11-2
https://imager.io/
https://github.com/imager-io/imager/releases/download/auto-release%2Fimager%2F0.3.4/imager-v0.3.4-apple.tar.gz
imager -i input/image.jpeg -o output/image.jpeg -f jpeg
imager -i input/image.jpeg -O output/dir/ -f jpeg webp
纯Rust OPC UA库
https://github.com/locka99/opcua
基于tokio的modbus库
https://github.com/slowtec/tokio-modbus
https://github.com/alttch/rmodbus
可视化
https://github.com/avito-tech/bioyino
https://crates.io/crates/opentelemetry
https://github.com/hubblo-org/scaphandre #功耗监控代理
https://github.com/vectordotdev/vector #高性能、日志、指标和事件路由器
https://github.com/infinyon/fluvio
QUIC IETF 指定的下一代 TCP 继承者
https://github.com/quinn-rs/quinn
Rudra是一个静态分析器,用于检测Rust程序中常见的未定义行为
https://github.com/sslab-gatech/Rudra
便携式 SIMD 模块
https://doc.rust-lang.org/nightly/std/simd/index.html
https://doc.rust-lang.org/nightly/core/index.html
mysql binlog 解析工具
https://github.com/PrivateRookie/boxercrab
中小企业私有云解决方案
https://github.com/rustcc/TTstack
币安API客户端
https://github.com/PrivateRookie/bian-rs
一个微小的硬件加速像素帧缓冲区
https://github.com/parasyte/pixels
TypeScript and JavaScript code formatter
https://github.com/devongovett/dprint-node
ECS library
https://github.com/takahirox/ecs-rust
W806 Rust支持库(外设访问层)
https://github.com/luojia65/w806-pac
ios-app
https://github.com/wooden-worm/ios-app-rs
直播服务器 流媒体 rtmp/httpflv/hls/relay
https://github.com/harlanc/xiu
RTSP/RTP/RTMP/FLV/HLS/MPEG-TS/MPEG-PS/MPEG-DASH/MP4/fMP4/MKV/WebM
https://github.com/ireader/media-server
版本比较 小于、大于或等于
https://github.com/alilleybrinker/semver-explain
$ semver-explain "^1.4.0"
>=1.4.0, <2.0.0
$ semver-explain "~0.5.3"
>=0.5.3, <0.6.0
$ semver-explain "5.6.*"
>=5.6.0, <5.7.0
二进制文件版本控制系统 400 GiB -> 100 MiB,访问时间为 1 秒†
https://github.com/elfshaker/elfshaker
wget "https://github.com/elfshaker/elfshaker/releases/download/v0.9.0/elfshaker_v0.9.0_$(uname -m)-unknown-linux-musl.tar.gz"
mkdir -p ~/.local/opt && mkdir -p ~/.local/bin && tar -xf "elfshaker_v0.9.0_$(uname -m)-unknown-linux-musl.tar.gz" -C ~/.local/opt && ln -s ~/.local/opt/elfshaker/elfshaker ~/.local/bin/elfshaker
rustup install 1.52.1
cargo +1.52.1 build --release --bin elfshaker
./target/release/elfshaker --help
制作 elfshaker store
打包成一个包文件elfshaker pack
elfshaker store <snapshot> [--files-from <file>] [--files0-from <file>]
elfshaker store my-snapshot
elfshaker extract [<pack>:]<snapshot> [--reset] [--verify]
elfshaker extract my-pack:my-snapshot --verify
elfshaker pack <pack> [--frames N]
elfshaker my-pack --frames 8
elfshaker list
elfshaker list <pack>
elfshaker list [<pack>:]<snapshot>
elfshaker show [<pack>:]<snapshot> <path>...
elfshaker show my-pack:my-snapshot my-file some-dir/my-file-2
docker
https://github.com/mrjackwills/oxker
健康检查
https://github.com/tjmaynes/health-check-rust
rustup toolchain install stable
cargo install --path .
DATABASE_URL=postgres://root:postgres@localhost:5432?sslmode=disable \
cargo run
docker compose up
sendemail
https://github.com/quambene/pigeon-rs
pigeon send-bulk \
--receiver-query "select email from user where newsletter_confirmed = true" \
--message-file "message.yaml" \
--display \
--assume-yes
pigeon send [email protected] [email protected] --subject "Test subject" --content "This is a test email."
pigeon send [email protected] [email protected] --message-file "message.yaml"
Rustsbi-nezha平台支持包
https://github.com/orangecms/rustsbi-nezha/tree/rustsbi-nezha
backdoor
https://kerkour.com/rust-crate-backdoor/
https://github.com/skerkour/black-hat-rust/tree/main/extra/backdoors
https://github.com/skerkour/black-hat-rust
https://github.com/skerkour/kerkour.com/tree/main/2021/rust_fast_port_scanner
https://github.com/skerkour/kerkour.com
系统OS
https://github.com/vinc/moros
https://github.com/Rust-for-Linux/linux
https://github.com/LibertyOS-Development/kernel
命令行翻译 baidu tencent niutrans
https://github.com/zjp-CN/bilingual
network
https://arewegameyet.rs/ecosystem/networking/
Sniffnet v0.4.0 发布 - 多线程跨平台的网络分析器
https://github.com/GyulyVGC/sniffnet
https://hurryabit.github.io/blog/stack-safety-for-free/
https://github.com/sharkdp/bat
bat README.md
bat src/*.rs
curl -s https://sh.rustup.rs | bat
yaml2json .travis.yml | json_pp | bat -l json
bat -A /etc/hosts
dnf install bat
brew install bat
替代ls
https://github.com/ogham/exa
dnf install exa
brew install exa
cargo install exa
依赖注入
https://www.bumbar.blog/
bumbar.blog/tech/dependency-injection-with-rust/
一个 Rust proc_macro_attribute 来概括通用函数的转换
https://github.com/llogiq/momo
MirChecker:一个简单的 Rust 静态分析工具
https://github.com/lizhuohua/rust-mir-checker
lox tree-walk 解释器
https://github.com/veera-sivarajan/rena
另一个 Rust 解析器库。一个轻量级、无依赖、解析器组合器启发了一组实用方法来帮助解析字符串和切片
https://github.com/jsdw/yap
操作系统OS
https://github.com/0x59616e/SteinsOS
https://github.com/nebulet/nebulet
https://gitlab.redox-os.org/redox-os/redox
https://github.com/thepowersgang/rust_os
https://github.com/tock/tock
https://github.com/oxidecomputer/hubris
https://github.com/theseus-os/Theseus
https://github.com/google/OpenSK
k8s
https://github.com/project-akri/akri
https://github.com/krustlet/krustlet
文本编辑器
https://github.com/federico-terzi/espanso
https://github.com/zee-editor/zee
https://rust-audio.discourse.group/
https://github.com/RustyDAW/rusty-daw-audio-graph
https://github.com/RustyDAW/rusty-daw-io