Code Monkey home page Code Monkey logo

rust-bible's Introduction

rust学习笔记

基于rust edition = "2021" 
需要安装rust v1.58.0 以上版本

rust从入门到实战--7大块

  • part1 rust基础,thread concurrent编程初体验
  • part2 serde json序列化处理,yaml文件读取,log日志库基础操作
  • part3 redis,mysql,kafka和pulsar mq基本使用
  • part4 rust异步编程基础--tokio和async-std两种不同的异步操作库使用
  • part5 axum,actix-web,tide框架使用
  • part6 rust 依赖注入和clap命令终端使用
  • part7 rust实战(rust web/job/grpc)综合使用
  • part8 rust ffi调用

rust安装

rust 1.70.x以上版本的crates发布

cargo publish --registry crates-io

设置rust国内镜像

https://mirrors.tuna.tsinghua.edu.cn/help/rustup/

国内提高访问速度,建议设置环境变量 
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
export PATH="$HOME/.cargo/bin:$PATH"

在用户目录.cargo文件夹或在与Cargo.toml同级目录.cargo文件夹下创建config文件
$cd ~/.cargo/
$touch config
添加如下内容:
# 指定镜像
#replace-with = 'sjtu'
replace-with = 'ustc'

# 源码地址
[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"

# 清华大学
[source.tuna]
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"

# **科学技术大学
[source.ustc]
registry = "https://mirrors.ustc.edu.cn/crates.io-index"
#registry = "git://mirrors.ustc.edu.cn/crates.io-index"

# 上海交通大学
[source.sjtu]
registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index"

# rustcc社区
[source.rustcc]
registry = "git://crates.rustcc.cn/crates.io-index"

[source.aliyun]
registry = "https://code.aliyun.com/rustcc/crates.io-index"
[net]
git-fetch-with-cli=true
[http]
check-revoke = false

docker环境搭建参考

rust编辑器选择

可以使用vscode,clion都可以

vscode配置

需要安装好 rust-analyzer 插件,然后配置setting.json

{
    "files.eol": "\n",
    "editor.formatOnSave": true,
    "editor.fontSize": 13,
    "workbench.colorTheme": "Monokai",
    "rust.all_features": true,
    "editor.formatOnPaste": true,
    "editor.multiCursorModifier": "ctrlCmd",
    "editor.snippetSuggestions": "top",
    "[rust]": {
        "editor.defaultFormatter": "rust-lang.rust-analyzer"
    }
}

rust语言程序设计

rust package发布方法

https://zhuanlan.zhihu.com/p/477390034

rust crates官网

https://crates.io/ 可以搜到很多有用的第三方包,比如axum,actix-web,tide,serde等等

rust std库

rust-bible's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.