β˜€οΈ
Dev7Days
  • πŸ˜„Welcome
  • Local Setup
    • βš™οΈSetup Terminal
    • βš™οΈSetup IDE
    • βš™οΈSetup Neovim
  • Rust
    • πŸ¦€Cargo
  • Java
    • πŸƒSpring Boot
      • Spring Boot Annotaion
      • Spring Boot Learning
    • πŸƒJDK vs JRE vs JVM
    • πŸƒWhat is JDBC ?
    • πŸƒWhat is Data Source in Java ?
    • πŸƒCheck vs Unchecked Exception
    • πŸƒWhat is Servlet in Java ?
    • πŸƒFilter vs Interceptor
    • πŸƒMockito
    • πŸƒMaven CLI
    • πŸƒMaven Archetype
  • Go
    • πŸ”ΉGo Routine and Channel
    • πŸ”ΉGo CLI
  • Ruby and Rails
    • ♦️Ruby Syntax
    • ♦️Rails Framework
    • ♦️Rails Structure
  • Fundamental
    • πŸ“šGit Command
    • πŸ“šInterpreter vs Compiler
    • πŸ“šDTO vs DAO
    • πŸ“šHttp Status
    • πŸ“šWhat is Batch Process ?
    • πŸ“šHttps
    • πŸ“šLocal Storage vs Session Storage vs Cookies
    • πŸ“šAuthentication & Authorization
    • πŸ“šDatabase Index
    • πŸ“šWhat is GRPC ?
    • πŸ“šWhat is Microservice ?
  • Database
    • πŸ—ƒοΈWhat is Transaction ?
    • πŸ—ƒοΈACID
  • Postgres
    • 🐘SELECT
    • 🐘Column Alias
    • 🐘Order By
    • 🐘SELECT DISTINCT
  • Elastic Search
    • πŸ”What is Elastic Search ?
    • πŸ”Node and Cluster
  • Kubernetes
    • ☸️What is Kubernetes ?
    • ☸️Kubernetes Architecture
      • Node
      • ETCD
      • Kube API Server
      • Controller Manager
      • Kube Scheduler
      • Kubelet
      • Kube Proxy
  • ☸️Pod
  • ☸️ReplicaSet
  • ☸️Deployment
  • ☸️Service
  • ☸️Config Map
  • ☸️Namespaces
  • ☸️Kube Apply Command
  • ☸️Scheduling
    • Manual Scheduling
    • Labels and Selectors
    • Taints and Tolerations
    • Node Selector
    • Node Affinity
    • Resource Requirements and Limits
    • DaemonSets
    • Static Pods
    • MultipleSchedulers
  • ☸️Monitoring
  • AWS
    • πŸ”ΈHow can users access AWS ?
    • πŸ”ΈIAM
    • πŸ”ΈEC2
      • User Data
      • Instance Types
      • Security Group
      • Purchasing Options
      • Placement Groups
      • Elastic Network Interface (ENI)
      • EC2 Hibernate
      • EC2 Storage
    • πŸ”ΈELB & ASG
      • Health Checks
      • Target Group
      • ELB Types
      • Sticky Sessions
      • Cross Zone Load Balancing
      • Load Balancer - SSL and SNI
      • Deregistration Delay
      • ASG
    • πŸ”ΈRDS & Aurora DB
      • RDS
        • Storage Auto Scaling
        • Read Replica
        • Multi AZ
        • RDS Custom
        • Backup
        • RDS Proxy
      • AWS Aurora
        • Read Replica
        • Endpoint and Auto Scaling
        • Aurora Serverless
        • Global Database
        • Machine Learning
        • Backup
        • Database Cloning
      • RDS & Aurora Restore options
      • RDS & Aurora Security
    • πŸ”ΈElastic Cache
    • πŸ”ΈRoute 53
      • Records
      • Hosted Zones
      • Health Check
      • Routing Policies
  • Backend Security
    • 🎩SQL Injection
    • 🎩Cross site script (XSS)
    • 🎩Cross site request forgery (CSRF)
    • 🎩Man in the Middle (MITM)
    • 🎩Insecure Direct Object Reference (IDOR)
    • 🎩Distributed denial of service (DDOS)
  • Medium
    • πŸ‘¨β€πŸ’»Gamer to Coder
    • 🐳Docker
      • Docker #1
      • Docker #2
    • πŸ’ŠDI and IOC
    • ☸️Kubernetes
  • Book
    • πŸ“šSystem Design Interview - An Insider's Guide (Volume 1
Powered by GitBook
On this page
  1. Rust

Cargo

Describe about Cargo

Cargo is the package manager of Rust programming like mavenor npm.

Command:

  1. cargo init = Create Cargo.toml like a package.json of Rust

  2. cargo new <project_name> = Create the boilerplate of project including Cargo.toml and src folder that contain main.rs

  3. cargo build = Compile the project and create executable file in target/debug/executeable but for release you can use command cargo build --release it will create in target/release/executeable

  4. cargo run = It will compile and run the executable file.

  5. cargo update = It will update the dependencies and ignore Cargo.lock file.

  6. cargo check = It is to check for project can compile or not , use this command instead build to prevent step to create executable file and to ensure the code can compile.

File Structure

// Project structure after run cargo new abc
β”œβ”€β”€ Cargo.lock
β”œβ”€β”€ Cargo.toml
β”œβ”€β”€ src
β”‚Β Β  └── main.rs

Cargo.toml -> It will store the detail of the project like package.json

Cargo.lock-> It will store detail of dependencies that use in this project and version of it. In case that you clone this project in the future and your old dependencies is too old but new version will break the code when you use cargo to build it will always use the version of Cargo.lock instead to prevent this problem and you can update it manually for new version.

src/main.rs -> Main class of Rust to run the application

PreviousSetup NeovimNextSpring Boot

Last updated 5 months ago

πŸ¦€