如何在 Xime 输入法里显示字根、添加自定义键
Xime 输入法 2.5 版本引入 compact 紧凑按键布局,支持在键盘上显示五笔字根、双拼韵母等更多内容,并可通过自定义配置添加分号键等特殊按键,满足小众但实用的自定义键盘需求。
按时间浏览全部文章。
时间机器Xime 输入法 2.5 版本引入 compact 紧凑按键布局,支持在键盘上显示五笔字根、双拼韵母等更多内容,并可通过自定义配置添加分号键等特殊按键,满足小众但实用的自定义键盘需求。
Xime 输入法 v2.5.0 重大更新:新增九键拼音、笔画键盘、手写键盘、悬浮键盘、常用符号键盘布局,支持个人词库管理、文件浏览器、方案清单管理,重构键盘自定义配置结构,同时也带来了一些 breaking 变化。
基于 StrokeTransformer 的手写汉字识别模型设计与 Xime 输入法落地实践。从 CNN 的局限出发,介绍了笔画轨迹序列分类方案,以及模型生命周期管理和两种手写键盘的实现。
基于 StrokeTransformer 的手写汉字识别模型设计与 Xime 输入法落地实践。从 CNN 的局限出发,介绍了笔画轨迹序列分类方案,以及模型生命周期管理和两种手写键盘的实现。
本文介绍如何使用 Rust 在 Windows 上基于 TSF 框架、Named Pipe IPC 和 Rime 引擎开发输入法 Winxime,并实现了候选栏 Direct2D 渲染及独特的五笔字根提示功能。
Xime 输入法从 1.0 到 2.0 的升级:全新 UI 设计、键盘调节功能、语音转文本(在线/本地 ASR)、自研轻量标点预测模型,以及智能联想功能优化。
This article details the plugin architecture design, technical implementation, challenges encountered, and the final decision to only plugin-ize the emoji feature while keeping other complex features built-in for Kime input method
本文详细介绍了Kime输入法的插件化设计思路、技术实现方案、遇到的困难以及最终只对表情功能采用插件化而将其他复杂功能内置的决策原因
This article describes my experiment designing and training a compact Transformer model for mobile input method predictive text functionality. I built a decode-only Transformer with 8192 vocabulary words and approximately 17MB in size after int8 quantization, addressing challenges in data quality, model parameter optimization, and implementing N-gram algorithm fusion for improved predictions.
本文介绍了我设计和训练一个紧凑型Transformer模型用于手机输入法联想词功能的实验。我构建了一个仅含8192词汇量的decode-only Transformer模型,经过int8量化后大小约17MB,并探讨了数据质量对模型收敛的重要性,以及如何将N-gram算法与Transformer模型融合以提升预测效果。
Unable to find an input method that met my needs, I developed my own Android input method based on the Rime engine, supporting Wubi-Pinyin mixed input and radical display functionality.
因找不到满足需求的输入法,基于 rime 引擎开发了自己的 Android 输入法,支持五笔拼音混输和显示字根功能。
Implementing a system to control home ambient lights using Rust embedded development, ESP32 microcontroller, and Xiao AI through MQTT communication with Bemfa Cloud platform.
使用Rust嵌入式开发、ESP32微控制器和巴法云MQTT平台实现通过小爱同学控制家庭氛围灯的系统。
Exploring the limitations of Tauri when developing a transparent, click-through desktop pet application with 3D models, particularly regarding mouse event handling when cursor events are ignored.
探讨在 Tauri 中开发透明、可穿透点击的桌面宠物应用时遇到的限制,特别是在 Linux 平台上处理鼠标事件的问题,以及最终发现此问题在 Linux 上难以解决的技术细节。
This article introduces how to use Rust for ADC analog-to-digital conversion on ESP32-S3 to read data from an XY axis joystick sensor. The article details the ADC functionality of ESP32-S3, pin configuration, code implementation (including X/Y axis analog signal reading and Z axis button detection), and how to use the esp-hal library for hardware programming.
本文介绍了如何在ESP32-S3上使用Rust进行ADC模数转换,以读取XY轴摇杆传感器的数据。文章详细讲解了ESP32-S3的ADC功能、引脚配置、代码实现(包括X/Y轴模拟信号读取和Z轴按键检测),以及如何使用esp-hal库进行硬件编程。
This article introduces how to use Rust and the Ratatui library on ESP32-S3 to build a text-based user interface (TUI) for ST7789 screens, and solves common issues with fonts and display configuration.
本文介绍了如何在 ESP32-S3 上使用 Rust 和 Ratatui 库为 ST7789 屏幕构建基于文本的用户界面(TUI),并解决了字体和显示配置中的常见问题。
Exploring solutions to fix screen flickering issues when redrawing on ST7789 displays using Rust embedded development, including attempts to adjust SPI clock frequency and reduce refresh area.
Guide on displaying images on ST7789 screens using Rust embedded development, including image format conversion techniques from common formats to supported formats like BMP, TGA, and QOI.
探讨在使用Rust嵌入式开发时如何解决ST7789显示屏重绘时的闪烁问题,包括调整SPI时钟频率和减小刷新区域的尝试。
介绍在Rust嵌入式开发中如何在ST7789屏幕上显示图片,包括将常见图片格式转换为BMP、TGA和QOI等支持格式的技术方法,以及解决RGB565/BGR565色彩顺序和屏幕颜色反转等常见问题的实践经验。
This article introduces how to display Chinese characters in resource-constrained embedded environments, especially using the embedded-graphics library. Since the library doesn't support Chinese characters by default, the article details how to use BDF font format and eg-bdf tool to generate and use Chinese font libraries, providing specific code examples and solutions.
本文介绍了如何在资源受限的嵌入式环境中显示中文字符,特别是使用 embedded-graphics 库的方法。由于该库默认不支持中文字符,文章详细说明了如何使用 BDF 字体格式和 eg-bdf 工具来生成和使用中文字库,并提供了具体的代码示例和解决方案。
This article details how to use Rust on ESP32S3 to read DHT11 temperature and humidity sensor data and display it on an ST7789 TFT LCD screen. It covers implementation in both C and Rust languages, with special attention to multi-core task allocation in Rust, SPI bus configuration, screen driver initialization, and avoiding screen display issues. The article also provides complete code examples and analysis of key technical points.
本文详细介绍了如何在 ESP32S3 上使用 Rust 语言实现 DHT11 温湿度传感器数据读取并将数据显示在 ST7789 TFT LCD 屏幕上。涵盖了 C 和 Rust 两种语言的实现方式,特别关注了 Rust 中的多核任务分配、SPI 总线配置、屏幕驱动初始化以及避免屏幕花屏等问题。文章还提供了完整的代码示例和关键技术点解析。
Documentation on how to sign Git commits with GPG, including steps for generating GPG key pairs, associating them with your GitHub account, and verifying signatures.
关于如何使用GPG签名Git提交的文档记录,包括生成GPG密钥对、将其与GitHub账户关联以及验证签名的步骤。
Detailed explanation of implementing DHT11 temperature and humidity sensor reading using Rust programming language, including single-bus communication protocol analysis, timing diagrams, and code implementation steps.
详细介绍如何使用Rust编程语言实现对DHT11温湿度传感器的读取,包括单总线通信协议解析、时序分析和代码实现步骤
In-depth comparison of C and Rust implementations for DHT11 temperature and humidity sensor on ESP32S3 development board, detailing slow response issues encountered with the C version and the impact of CPU task scheduling, providing complete code examples and debugging experience sharing.
深入对比ESP32S3开发板上DHT11温湿度传感器的C语言和Rust实现,详细分析C语言版本遇到的响应缓慢问题及CPU任务调度影响,提供完整的代码示例和调试经验分享。
This article compares the implementation of controlling a WS2812 LED with ESP32-S3 using both C and Rust languages. It covers hardware setup with GPIO 48, toolchain configuration for both languages, and provides complete code examples for each approach. The comparison highlights differences in development experience, library usage, and performance considerations between traditional ESP-IDF C development and modern Rust embedded development.
本文对比了使用C和Rust两种语言在ESP32-S3上控制WS2812 LED的实现方式。涵盖了硬件设置(GPIO 48)、两种语言的工具链配置,以及各自的完整代码示例。对比突出了传统ESP-IDF C开发与现代Rust嵌入式开发在开发体验、库使用和性能考虑方面的差异。
Sharing experiences and insights on implementing Tencent's lightweight translation model hy-mt-1.8b using the Candle framework in Rust, including observations on its simple architecture and GPU execution.
分享使用Rust的Candle框架实现腾讯轻量级翻译模型hy-mt-1.8b的经验和心得,包括对其简单架构的观察以及在GPU上运行的情况。
Documenting issues encountered when running the Yolov10 model on GPU using the Rust Candle framework, specifically CUDA driver errors related to the topk function implementation.
记录使用Rust Candle框架在GPU上运行Yolov10模型时遇到的问题,特别是与topk函数实现相关的CUDA驱动程序错误。
Detailed guide on implementing a circular progress bar component in the Rust GPUI framework, including using canvas API for advanced graphics drawing and supporting both animated loading and progress display modes.
详细介绍如何在Rust GPUI框架中实现圆形进度条组件,包括使用canvas API进行高级图形绘制,以及支持动画加载和进度显示两种模式。
Exploring the lack of 3D operators in the Candle framework and how to simulate 3D convolution using 2D convolutions, particularly for handling video data tasks with time-dimension constraints.
探讨Candle框架中缺少3D算子的问题,以及如何使用2D卷积模拟3D卷积,特别是处理时间维度受限的视频数据任务。
Documenting equivalent operations between PyTorch and Rust Candle, including implementations of scaled dot-product attention (SDPA) and linspace functions with code examples.
记录PyTorch与Rust Candle之间的等价操作,包括缩放点积注意力(SDPA)和linspace函数的实现及代码示例。
This article introduces methods to significantly improve performance by replacing the default memory allocator when deploying Rust projects using musl libc, and provides specific performance comparison test data.
本文介绍了在使用musl libc部署Rust项目时,通过替换默认内存分配器来大幅提升性能的方法,并提供了具体的性能对比测试数据。
Exploring how to capture video streams from a video capture card and play them using Rust, including using v4l2-ctl on Linux and implementing playback with GStreamer.
探讨如何使用Rust捕获视频采集卡的视频流并进行播放,包括在Linux上使用v4l2-ctl以及使用GStreamer实现播放。
Exploring the similarities between GPUI's API and TailwindCSS, focusing on atomic design approach for UI styling, ElementId usage, and the differences between Render and RenderOnce traits.
探讨GPUI的API与TailwindCSS的相似性,重点关注UI样式的原子化设计、ElementId用法,以及Render和RenderOnce trait的区别。
Exploring useful operations with Termux on Android, including enabling file system access, setting up SSH service, and troubleshooting ADB connection issues for file transfer.
探索Android上Termux的一些有用操作,包括启用文件系统访问、设置SSH服务,以及解决ADB连接问题进行文件传输。
Introduction to integrating Python backend in Tauri applications using PyTauri, leveraging Python's AI ecosystem advantages, and detailed explanation of project setup, IPC communication, and packaging process.
介绍如何在 Tauri 应用中使用 PyTauri 集成 Python 后端,充分利用 Python 的 AI 生态优势,并详细说明项目搭建、IPC 通信和打包发布流程。
Porting YOLOv10 to the Candle framework
yolov10 in candle
This article explores the core issues with the Tauri framework, particularly cross-platform consistency problems and its differentiated positioning compared to Electron, while also analyzing potential solutions.
本文深入探讨了 Tauri 框架存在的核心问题,特别是跨平台一致性问题以及与 Electron 的差异化定位,同时也分析了潜在的解决方案。
A detailed introduction to deploying YOLOv10 object detection model in Rust environment using ONNX Runtime, including key steps such as model export, preprocessing, inference, and post-processing.
详细介绍如何在Rust环境中使用ONNX Runtime部署YOLOv10目标检测模型,包括模型导出、预处理、推理和后处理等关键步骤。
This article details how to use the Tauri framework to develop menu bar applications on macOS, including key technical implementations such as creating panel windows, system tray icons, panel positioning, and show/hide controls.
详细介绍如何使用Tauri框架在macOS上开发菜单栏应用,包括创建面板窗口、系统托盘图标、面板定位和显示/隐藏控制等关键技术实现。
This article explores the technical challenges of implementing screenshot functionality in the Tauri framework, including cross-platform compatibility issues and data transmission efficiency problems, and provides corresponding solutions.
In-depth exploration of special handling on macOS platform when developing screenshot applications with Tauri, including fullscreen display issues, clipboard operation anomalies and solutions, as well as key technical details such as keyboard shortcuts and preview function optimization.
探讨在 Tauri 框架中实现截图功能的技术难点,包括跨平台兼容性问题和数据传输效率问题,并提供相应的解决方案。
深入探讨使用 Tauri 开发截图应用时在 macOS 平台上的特殊处理,包括全屏显示问题、剪贴板操作异常及解决方案,以及快捷键和预览功能优化等关键技术细节。
This article introduces the practical experience of developing a cross-platform file search tool using the Tauri framework, explores how to avoid performance issues caused by directly scanning the file system, analyzes the technical principles of the Everything tool on the Windows platform, and shares the implementation of an efficient indexing solution based on the MFT table of the NTFS file system.
本文介绍了使用 Tauri 框架开发跨平台文件搜索工具的实践经验,探讨了如何避免直接扫描文件系统带来的性能问题,分析了 Windows 平台 Everything 工具的技术原理,并分享了基于 NTFS 文件系统 MFT 表的高效索引方案实现。
This article explores several approaches for implementing plugin-based development in Tauri desktop applications, including technologies such as Webview, iframe, and Shadow DOM. It analyzes the pros and cons and applicable scenarios of each approach, and delves into how to build a secure sandbox environment for loading third-party untrusted resources.
本文探讨了在 Tauri 桌面应用中实现插件化开发的几种方案,包括 Webview、iframe 和 Shadow DOM 等技术,分析了各自的优缺点以及适用场景,并深入讲解了如何构建安全的沙盒环境来加载第三方不受信任的资源。
This article shares some practical issues and solutions encountered when developing desktop applications with Tauri, including dynamic window detection, menu bar hiding and custom window control, handling differences across three platforms (Windows/macOS/Linux), and a comparison of development experiences between Tauri and Dioxus.
This article introduces how to properly handle duplicate window detection issues during dynamic window creation when developing desktop applications with Tauri, avoiding program crashes caused by duplicate window labels, and provides corresponding error handling solutions.
本文分享了在使用 Tauri 开发桌面应用时遇到的一些实际问题和解决方案,包括动态窗口检测、菜单栏隐藏与自定义窗口控制、三大平台(Windows/macOS/Linux)的差异处理,以及 Tauri 与 Dioxus 的开发体验对比。
本文介绍了在使用 Tauri 开发桌面应用时如何正确处理动态窗口创建过程中的重复窗口检测问题,避免因窗口标签重复导致的程序崩溃,并提供了相应的错误处理方案。
This article introduces the concept and implementation of the MCP (Model Context Protocol), explains in detail how to develop an MCP service using Rust, demonstrates the implementation process of a crate documentation query tool through actual code examples, and introduces how to configure and use an MCP Server in VS Code.
本文介绍了 MCP(Model Context Protocol)协议的概念和实现方式,详细讲解了如何使用 Rust 开发一个 MCP 服务,通过实际代码示例展示了 crate 文档查询工具的实现过程,并介绍了在 VS Code 中配置和使用 MCP Server 的方法。
This article delves into the technical details of developing unconventional window applications (such as screenshot tools, floating windows, desktop lyrics, etc.) using Tauri v2 and Rust, including multi-window management, system permission requests (especially macOS ScreenRecording permission), and permission-window association configuration.
本文深入探讨了使用 Tauri v2 和 Rust 开发非常规窗口应用(如截图工具、悬浮窗、桌面歌词等)的技术细节,包括多窗口管理、系统权限申请(特别是 macOS 的 ScreenRecording 权限)以及权限与窗口的关联配置。
Examining the suitability of Rust for AI model inference, comparing popular frameworks like tch-rs, ONNX Runtime, and Candle, and discussing their advantages and disadvantages in different deployment scenarios.
探讨Rust是否适合AI模型推理,对比tch-rs、ONNX Runtime和Candle等主流框架,讨论它们在不同部署场景下的优缺点。
Exploring how to implement function calling capabilities with large language models in Rust, demonstrating practical examples using the DashScope API to call Qwen models, including the complete function calling workflow and key implementation code.
本文深入探讨了如何在 Rust 中实现大语言模型的函数调用功能,通过实际代码示例展示了使用 DashScope API 调用通义千问模型的具体实现过程,包括完整的函数调用流程和关键代码实现。
Exploring how to use bit masks (or bit flags) for efficient conditional checks in Rust, particularly useful for managing multiple state flags with high performance and low memory usage.
探讨如何在Rust中使用位掩码(或位标志)进行高效的条件判断,特别适用于需要高性能和低内存占用的多状态标志管理。
Exploring how to use JNI (Java Native Interface) to enable interaction between Java/JVM platform languages and Rust, including type mappings and implementation details.
探索如何使用JNI(Java本地接口)实现Java/JVM平台语言与Rust之间的交互,包括类型映射和实现细节。
Wrapping up the series on building a handwriting input method from scratch, discussing the complete implementation, challenges faced, and lessons learned throughout the project.
总结从零开始构建手写输入法的整个系列,讨论完整的实现过程、遇到的挑战以及项目中的经验教训。
Deploying the trained handwriting recognition model to WebAssembly using Rust, enabling efficient client-side recognition in web browsers.
使用Rust将训练好的手写识别模型部署到WebAssembly,实现在浏览器中的高效客户端识别。
Implementation of handwriting recognition model inference using Rust Candle, focusing on optimizing performance and efficiency for real-time applications.
使用Rust Candle实现手写识别模型推理,专注于优化性能和效率以实现实时应用。
Detailed guide on processing the CASIA-HWDB dataset and training a handwriting recognition model for Chinese characters using PyTorch, including dataset preprocessing and model implementation.
详细介绍处理CASIA-HWDB数据集并使用PyTorch训练汉字手写识别模型的过程,包括数据集预处理和模型实现。
Introduction to building a handwriting input method for Chinese characters from scratch, covering preparation steps, dataset selection, and technical approach using PyTorch for training, Rust Candle for inference, and WASM for deployment.
介绍从零开始构建汉字手写输入法的准备工作,包括数据集选择和技术路线,使用PyTorch进行训练,Rust Candle进行推理,以及WASM进行部署。
This article explains how to use FUSE to access a zip file as if it were a folder.
本文介绍了如何使用 fuse 来实现访问一个压缩包
This article summarizes common security pitfalls in Rust development, including numeric conversions, integer overflows, array boundary access, oversized array handling, misuse of `unsafe`, time-of-check to time-of-use (TOCTOU) attacks, FFI risks, and circular references. By correctly using type-safe methods, limiting resource sizes, reducing the scope of `unsafe`, combining atomic operations, and managing memory, these issues can be effectively avoided.
This article introduces methods for converting HEIF/HEIC format images, which suffer from poor compatibility due to patent issues related to HEVC technology. In Rust, HEIF images can be decoded using `libheif-rs` and converted to other formats via the `image` crate. On the frontend, similar functionality can be achieved with `heic-convert`, focusing on constructing buffer data that meets requirements for format conversion.
本文总结了 Rust 开发中常见的安全性陷阱,包括数值转换、整数溢出、数组边界访问、超大数组处理、滥用 `unsafe`、时间攻击(TOCTOU)、FFI 隐患及循环引用等问题。通过正确使用类型安全方法、限制资源大小、减少 `unsafe` 范围、合并原子操作及管理内存等方式,可有效避免这些问题。
本文介绍了 HEIF/HEIC 格式图片的转换方法,因其基于 HEVC 技术存在专利问题,兼容性较差。在 Rust 中可通过 `libheif-rs` 解码 HEIF 图片并借助 `image` crate 转换为其他格式。前端则可使用 `heic-convert` 实现类似功能,重点在于构造符合要求的 buffer 数据进行格式转换。
This article introduces some uncommon but practical syntax features in Rust, including unions (`union`), slice pattern matching, raw pointer operations, inline assembly (`asm!`), extern blocks, loop return values, the `@` in match patterns, labeled loop control, never type (`!`), `#[repr]` attributes, and diverse macro invocation methods. These features can significantly enhance development efficiency and code flexibility in specific scenarios.
本文介绍了 Rust 中一些不常见但实用的语法特性,包括联合体(`union`)、切片模式匹配、裸指针操作、内联汇编(`asm!`)、extern 块、loop 循环返回值、匹配模式中的 `@`、标签化循环控制、never 类型(`!`)、`#[repr]` 属性及宏的多样化调用方式。这些特性在特定场景下可显著提升开发效率和代码灵活性。
This article introduces how to implement RMBG (Remove Image Background) inference using Rust. By loading an ONNX model, it preprocesses the input image (resize, normalization), completes the model inference to generate a mask image, and uses the mask to remove the background or blend transparency. Finally, it optimizes the mask denormalization algorithm to improve background purity, suitable for use in fields like posters, games, etc.
本文介绍了如何使用 Rust 实现 RMBG(移除图片背景)推理。通过加载 ONNX 模型,对输入图片进行预处理(resize、归一化),完成模型推理后生成掩码图,并基于掩码实现背景去除或透明度混合处理。最后优化了掩码反归一化算法,提升背景纯净度,适用于海报、游戏等领域。
This article summarizes some miscellaneous features in the Rust Candle framework, including custom implementations of `masked_fill`, broadcasting mechanism (`broadcast_add`), matrix multiplication (`matmul` vs. element-wise multiplication), and an alternative implementation of the module container `ModuleList`. By comparing with PyTorch, it analyzes the differences and solutions in tensor operations and model loading in Candle.
本文总结了 Rust Candle 框架中的一些杂项功能,包括自定义实现的 `masked_fill`、广播机制(`broadcast_add`)、矩阵乘法(`matmul` 与逐元素乘法的区别)以及模块容器 `ModuleList` 的替代实现。通过对比 PyTorch,分析了 Candle 在张量操作和模型加载上的差异及解决方案。
This article compares three methods of handling large files in Rust: the standard library, Tokio, and memory mapping (mmap) in terms of memory usage. The standard library, which loads files all at once, consumes the most memory. Tokio significantly reduces memory usage through chunked optimization, while mmap, leveraging memory-mapped technology, uses almost no additional memory, offering the best performance.
本文对比了 Rust 中处理大文件的三种方法:标准库、Tokio 和内存映射(mmap)的内存使用情况。标准库一次性加载文件占用内存最高,Tokio 通过分块优化显著降低内存使用,而 mmap 利用内存映射技术几乎不占用额外内存,表现最优。
This article compares the similarities and differences between Rust Candle and PyTorch in the implementation of neural network layers, covering sequential containers, convolutional layers (1D/2D and transposed convolution), pooling layers (max pooling and average pooling), and common activation functions. It focuses on analyzing the correspondence between the two in terms of functionality, parameter configuration, and usage, and points out that Candle does not yet support some features such as 3D convolution.
This article compares the implementation of common neural network layers in Rust Candle and PyTorch, including normalization layers (BatchNorm, LayerNorm, RMSNorm), recurrent layers (LSTM, GRU), Transformer, linear layers, Dropout layers, embedding layers, and upsampling layers. It summarizes the functional correspondence and differences between the two frameworks and highlights Candle's support for large model inference scenarios.
本文对比了 Rust Candle 框架与 PyTorch 在神经网络层实现上的异同,涵盖顺序容器、卷积层(1D/2D 及转置卷积)、池化层(最大池化与平均池化)及常见激活函数。重点分析了两者在功能实现、参数配置及使用方式上的对应关系,并指出 Candle 暂不支持 3D 卷积等部分功能。
本文对比了 Rust Candle 框架与 PyTorch 中常见神经网络层的实现,包括归一化层(BatchNorm、LayerNorm、RMSNorm)、循环层(LSTM、GRU)、Transformer、线性层、Dropout 层、嵌入层及上采样层。总结了两者的功能对应关系及差异,并指出 Candle 在大模型推理场景下的支持情况。
This article compares the implementation differences between Pytorch and Rust Candle framework for tensor reduction operations, covering common operations such as summation, mean, maximum, minimum, etc.
本文对比了Pytorch和Rust Candle 框架在张量归约运算上的实现差异,涵盖求和、均值、最大值、最小值等常见操作。
This article compares the implementation differences between Pytorch and Rust Candle framework for pointwise tensor operations, covering common operations such as absolute value, trigonometric functions, exponentials, etc.
本文对比了Pytorch和Rust Candle框架在张量逐点运算上的实现差异,涵盖绝对值、三角函数、指数等常见操作。
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.
本文对比了Rust Candle与Pytorch在张量索引、切片、连接、变异等操作上的实现差异,涵盖常见张量操作及其等价方法。
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.
本文介绍了Rust Candle与Pytorch在张量基本操作上的等价实现,包括张量初始化、形状操作、加减乘除运算及加速器支持,适合初学者参考。
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.
本文介绍如何使用Rust和ONNX Runtime进行模型部署,以ResNet50为例,详细说明模型导出、加载、数据前处理、推理及后处理的全流程,并分析其优缺点。
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.
Rust 1.85.0 引入了 RPIT(Return Position Impl Trait)生命周期捕获的新规则。在 Rust 2024 中,所有作用域内的泛型参数(包括生命周期)默认被隐式捕获,无需显式声明。开发者可通过 `use<...>` 语法精确控制捕获的参数,避免意外捕获。这简化了代码并减少了错误,增强了表达力。新规则使 RPIT 的使用更加直观和安全。
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.
不同编程语言中 Web 框架的选择,分析了“大而全”和“小而美”两种类型的框架在国内外开发环境中的优缺点,并结合个人经验给出了选择建议。
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.
本文探讨了 Rust 中如何模拟传统面向对象语言中的函数重载(即同名函数根据参数类型或数量不同自动分派)。虽然 Rust 本身不直接支持函数重载,但通过一些技巧可以实现类似的效果。文章详细介绍了两种方法,并讨论了这些方法的优缺点。
Be cautious, you might encounter them too.
Using Rust + WASM for npm library development is an excellent choice.
小心一些,你或者也会碰到
通过 Rust + WASM 进行 npm 库开发是一个非常不错的选择。
The main advantages of Rust are not just performance and safety. There are other aspects that cannot be ignored.
Rust 并不是性能和安全性的主要优势。还有其他我们不久能忽略的一些东西
Building efficient LLM applications using Qwen and knowledge base with RAG
使用 Qwen 和知识库通过 RAG 构建高效 LLM 应用
MessagePack is an efficient binary serialization format. It supports multi-language data exchange. Compared to JSON, it is more compact and faster in processing.
MessagePack 是一种高效的二进制序列化格式。它支持多语言数据交换。相比JSON,它更紧凑,处理速度更快。
A simple implementation of operator overloading in Rust to achieve tensor addition operations.
简单实现 Rust 中的重载操作符,以实现张量加法运算
An advanced tutorial on converting PyTorch models to Rust Candle
Candle 的进阶教程
Achieve single binary distribution of your application
实现单文件分发你的程序
Rust development tips
Rust candle 模型教程
A guide on converting PyTorch models to Rust Candle models
Rust candle 模型教程
An introduction to using Pingora
Pingora 的使用
How to use declarative macros
声明宏的使用方法
In early versions of Rust, there were two main pointer types: Managed Box and Owned Box.
Rust 早期版本中,有两种主要的指针类型:托管 Box(Managed Box)和所有权 Box(Owned Box)。
Rate limiting is a critical measure to protect systems from overload, especially when dealing with sudden traffic or malicious attacks. The Leaky Bucket and Token Bucket algorithms are two commonly used rate limiting strategies, each with its own characteristics and application scenarios. GCRA (Generic Cell Rate Algorithm) is an optimized version of the Leaky Bucket algorithm.
限制请求速率是保护系统免受过载影响的关键措施之一,尤其是在面对突发流量或恶意攻击时。漏桶算法(Leaky Bucket)和令牌桶算法(Token Bucket)是两种常用的限流策略,它们各自有不同的特点和适用场景。GCRA(Generic Cell Rate Algorithm) 是漏桶算法的优化版本。
如何使用 Rust 通过 FFI 绑定 C 库,以 pdfio 为例,详细说明了从安装 C 库、生成绑定代码到二次封装和测试的整个过程。
One of the unique aspects of axum is that it does not have its own custom middleware system but instead integrates with tower. This means that the tower ecosystem and tower-http middleware work seamlessly with axum.
The 1.5 version of Fish Speech brings several improvements and new features. This article will conduct an in-depth review of this new version and compare it with CosyVoice in detail to help readers understand the strengths and weaknesses of both products.
How to implement the MobileNetV2 neural network using Rust and the Candle framework, including the construction of the model structure and the implementation of the forward pass.
How to use Rust to bind a C library, using pdfio as an example, detailing the entire process from installing the C library, generating binding code, to encapsulation and testing.
Fish Speech 1.5 版本带来了多项改进和新功能,本文将深入评测这一新版本,并将其与 CosyVoice 进行详细对比,帮助读者了解两款产品的优劣。
如何使用 Rust 和 Candle 框架实现 MobileNetV2 神经网络,包括模型结构的搭建和前向传播的实现。
Since lllyasviel announced the release of IC-Light V2 based on Flux in October, it has now evolved into the Vary version.
自 10 月份 lllyasviel 公布将发布基于 Flux 的 IC-Light V2 以来,如今它已进化到了 Vary 版本。
axum 的独特之处在于它没有自己的定制中间件系统,而是与tower集成。这意味着tower的生态系统和 tower-http中间件都与 axum 一起工作。
How to redesign a model to achieve video stream recognition without using any 3D operators and 5D data formats, including model design approach, two-stage training method, and loss function design
如何在不使用任何3d算子和5d数据格式的情况下,重新设计模型来实现视频流的识别,包括模型设计思路、两阶段训练方法和损失函数设计
The Rust community has initiated a standard library verification competition with the primary goal of leveraging the collective power of the community to thoroughly verify the safety of the Rust standard library.
Rust 社区发起了一项标准库验证竞赛,其核心宗旨在于充分借助广大社区的磅礴力量,深度验证 Rust 标准库的安全性。