Odak modu

Rust Fundamentals

Crates and Modules:Workspaces

There are two basic types of projects in Rust. Libraries and binary (like executables.exe)

Libraries are self-contained blocks of code intended for use by other applications. The purpose of a library is to benefit other developers in repetitive processes and speed up the development process. For a library project type, the program's starting point is the src/lib.rs file.

In Rust the project structure like that:

  • Workspace: 1-n packages
  • Package: 0-1 library and/or 0-n binary, but at least 1 crate
  • Crate: 0-n modules
  • Module: 1-n source files
  • Source File: 0-n functions

The simplest project we have created with Cargo means 1 crate on its own.

left-disk

Yazılım Kariyerinde İlerlemeni Hızlandıracak Programlar

Patika+ programlarımız ile 4-8 aylık yoğun yazılım kamplarına katıl, temel bilgilerden başlayarak kapsamlı bilgiler edin, yazılım kariyerine başla!

right-cube

Yorumlar

Yorum yapabilmek için derse kayıt olmalısın!