Tag: Rust
All the articles with the tag "Rust".
-
Equivalent Operations of Indexing, Slicing, Concatenation, and Mutation for Tensors in Rust Candle Framework and Pytorch
Published date:This article compares the implementation differences between Rust Candle and Pytorch in tensor indexing, slicing, concatenation, mutation, and other operations, covering common tensor operations and their equivalent methods.
-
Basic Equivalent Operations of Tensors in Rust AI Inference Framework Candle and Pytorch
Published date:This article introduces the equivalent implementations of basic tensor operations between Rust Candle and Pytorch, including tensor initialization, shape manipulation, arithmetic operations (addition, subtraction, multiplication, division), and accelerator support. It is suitable for beginners to refer to.
-
A New Choice for Efficient Inference in Rust: Model Deployment Practice Based on ONNX Runtime
Published date:This article introduces how to deploy models using Rust and ONNX Runtime, taking ResNet50 as an example, detailing the entire process of model export, loading, data preprocessing, inference, and post-processing, while analyzing its advantages and disadvantages.
-
What Are the RPIT Lifetime Capture Rules Introduced in Rust 1.85.0?
Published date:Rust 1.85.0 introduces new rules for RPIT (Return Position Impl Trait) lifetime capture. In Rust 2024, all generic parameters (including lifetimes) within scope are implicitly captured by default, without explicit declaration. Developers can use the `use<...>` syntax to precisely control which parameters are captured, avoiding unintended captures. This simplifies code and reduces errors, enhancing expressiveness. The new rules make RPIT usage more intuitive and safer.
-
Do You Prefer Comprehensive Frameworks or Elegant Libraries?
Published date:Choosing Web frameworks in different programming languages, analyzing the pros and cons of 'comprehensive' and 'elegant' frameworks in domestic and international development environments, and providing recommendations based on personal experience.
-
Can Rust Also Play Function Overloading?
Published date:This article explores how to simulate function overloading in Rust, where functions with the same name can be automatically dispatched based on parameter types or counts. Although Rust does not directly support function overloading, several techniques can achieve similar effects. The article details two methods and discusses their pros and cons.
-
Developing Browser-Compatible npm Libraries with Rust + WASM
Published date:Using Rust + WASM for npm library development is an excellent choice.
-
The Charm of Rust: More Than Just Performance and Safety
Published date:The main advantages of Rust are not just performance and safety. There are other aspects that cannot be ignored.
-
Hands-On Guide: Building Efficient LLM Applications in Rust Using Qwen and Knowledge Base with RAG
Published date:Building efficient LLM applications using Qwen and knowledge base with RAG
-
Hands-On Guide: How to Use MessagePack to Optimize Data Transmission in HTTP Interfaces with Rust
Published date:MessagePack is an efficient binary serialization format. It supports multi-language data exchange. Compared to JSON, it is more compact and faster in processing.
-
Advanced Rust: How to Override Operators Elegantly in Rust
Published date:A simple implementation of operator overloading in Rust to achieve tensor addition operations.
-
Advanced Rust AI (Part 2) - Converting PyTorch Models to Rust Candle
Published date:An advanced tutorial on converting PyTorch models to Rust Candle