- عنوان: Programming Rust, Fast, Safe Systems Development, 3rd ed
- نویسنده/انتشارات: Jim Blandy, Jason Orendorff
- حوزه: برنامه نویسی Rust
- سال انتشار: 2026
- تعداد صفحه: 224
- زبان اصلی: انگلیسی
- نوع فایل: pdf
- حجم فایل: 2.83 مگابایت
Rust نویسندگان کتابی مانند این کتاب را با یک چالش مواجه میکند: چیزی که به این زبان شخصیت میبخشد، یک ویژگی خاص و شگفتانگیز نیست که بتوانیم در صفحه اول آن را نشان دهیم، بلکه نحوه طراحی تمام بخشهای آن برای همکاری روان با یکدیگر در خدمت اهدافی است که در فصل قبل مطرح کردیم: برنامهنویسی سیستمهای ایمن و کارآمد. هر بخش از زبان به بهترین شکل در متن بقیه توجیه میشود. بنابراین به جای پرداختن به یک ویژگی زبان در هر زمان، ما گشتی در چند برنامه کوچک اما کامل آماده کردهایم که هر کدام ویژگیهای بیشتری از زبان را در متن معرفی میکنند: به عنوان گرم کردن، ما برنامهای داریم که یک محاسبه ساده روی آرگومانهای خط فرمان خود، با تستهای واحد، انجام میدهد. این نوع هسته Rust را نشان میدهد و ویژگیهای آن را معرفی میکند. در مرحله بعد، یک وب سرور میسازیم. ما از یک کتابخانه شخص ثالث برای مدیریت جزئیات HTTP استفاده خواهیم کرد و مدیریت رشتهها، closureها و مدیریت خطا را معرفی میکنیم. آخرین برنامه ما یک فراکتال زیبا را رسم میکند و محاسبات را برای سرعت بیشتر در چندین رشته توزیع میکند. این شامل مثالی از یک تابع عمومی است، نحوه مدیریت چیزی مانند بافر پیکسلها را نشان میدهد و پشتیبانی Rust از همزمانی را نشان میدهد. وعده Rust برای جلوگیری از رفتار نامشخص با حداقل تأثیر بر عملکرد، بر طراحی هر بخش از سیستم تأثیر میگذارد، از ساختارهای داده استاندارد مانند بردارها و رشتهها گرفته تا نحوه استفاده برنامههای Rust از کتابخانههای شخص ثالث. جزئیات نحوه مدیریت این موضوع در سراسر کتاب پوشش داده شده است. اما فعلاً میخواهیم به شما نشان دهیم که Rust زبانی توانمند و دلپذیر برای استفاده است. اول، البته، باید Rust را روی رایانه خود نصب کنید.
Rust presents the authors of a book like this one with a challenge: what gives the language its character is not some specific, amazing feature that we can show off on the first page, but rather, the way all its parts are designed to work together smoothly in service of the goals we laid out in the last chapter: safe, performant systems programming. Each part of the language is best justified in the context of all the rest. So rather than tackle one language feature at a time, we’ve prepared a tour of a few small but complete programs, each of which introduces some more features of the language, in context: As a warm-up, we have a program that does a simple calculation on its command-line arguments, with unit tests. This shows Rust’s core types and introduces traits. Next, we build a web server. We’ll use a third-party library to handle the details of HTTP and introduce string handling, closures, and error handling. Our last program plots a beautiful fractal, distributing the computation across multiple threads for speed. This includes an example of a generic function, illustrates how to handle something like a buffer of pixels, and shows off Rust’s support for concurrency. Rust’s promise to prevent undefined behavior with minimal impact on performance influences the design of every part of the system, from the standard data structures like vectors and strings to the way Rust programs use third-party libraries. The details of how this is managed are covered throughout the book. But for now, we want to show you that Rust is a capable and pleasant language to use. First, of course, you need to install Rust on your computer.
این کتاب را میتوانید بصورت رایگان از لینک زیر دانلود نمایید.
Download: Programming Rust
نظرات کاربران