今日已更新 84 条资讯 | 累计 37333 条内容
关于我们

标签:#Rust

找到 447 篇相关文章

AI 资讯

Build an MCP server in Rust with rmcp: a walk-through 🦀

This tutorial walks through building an MCP server in Rust with rmcp , the official Model Context Protocol Rust SDK. The example is a real one: a devops agent that manages AWS EC2 G5g instances — Graviton2 boxes with NVIDIA T4G GPUs — serving Gemma 4 under vLLM. It launches instances, drives them over SSM, and health-checks the model. There's an existing Python version, so at the end we can put the two side by side. Follow along and you'll have a working, registerable MCP server. 🦀 Why Rust for this? Worth answering properly, because the weak version of the argument is easy to make and easy to demolish — and the real one is better anyway. Start with what it isn't: these tools are I/O bound. Every one is an AWS API call — describe_instances , send_command , polling SSM — so 100–500 ms of network per call. The caller's language contributes nothing measurable there. Anyone selling you a Rust rewrite on raw speed for this workload is selling something. Three claims that don't hold, so nobody has to make them in the comments: Claim Why it fails "462 ms startup is slow" stdio servers spawn once per session , not per call "Rust is faster" the work is network round-trips to AWS "smaller supply chain" 241 crates vs 34 Python packages — it's worse What actually justifies it, for this codebase: 1. It's a fleet, not a server. This monorepo has 16 rigs , each with its own MCP server. That changes the units: All loaded together 🐍 Python 🦀 Rust Resident memory 16 × 83 MB ≈ 1.33 GB 16 × 12 MB ≈ 192 MB Session startup 16 × 462 ms ≈ 7.4 s 16 × 2.5 ms ≈ 40 ms A gigabyte of resident Python to expose sixteen tool lists is a real cost. 2. No shared interpreter. These rigs install system-wide — no virtualenvs, by policy — so all sixteen share one Python. Sixteen servers with independently drifting boto3 and mcp pins in one interpreter is a standing conflict risk. A static binary has no such coupling; each rig pins whatever it likes in its own Cargo.lock . 3. The schema can't drift from th

2026-08-16 原文 →
AI 资讯

Build an MCP server in Rust with rmcp: a walk-through 🦀

This tutorial walks through building an MCP server in Rust with rmcp , the official Model Context Protocol Rust SDK. The example is a real one: a devops agent that manages AWS EC2 G5g instances — Graviton2 boxes with NVIDIA T4G GPUs — serving Gemma 4 under vLLM. It launches instances, drives them over SSM, and health-checks the model. There's an existing Python version, so at the end we can put the two side by side. Follow along and you'll have a working, registerable MCP server. 🦀 Why Rust for this? Worth answering properly, because the weak version of the argument is easy to make and easy to demolish — and the real one is better anyway. Start with what it isn't: these tools are I/O bound. Every one is an AWS API call — describe_instances , send_command , polling SSM — so 100–500 ms of network per call. The caller's language contributes nothing measurable there. Anyone selling you a Rust rewrite on raw speed for this workload is selling something. Three claims that don't hold, so nobody has to make them in the comments: Claim Why it fails "462 ms startup is slow" stdio servers spawn once per session , not per call "Rust is faster" the work is network round-trips to AWS "smaller supply chain" 241 crates vs 34 Python packages — it's worse What actually justifies it, for this codebase: 1. It's a fleet, not a server. This monorepo has 16 rigs , each with its own MCP server. That changes the units: All loaded together 🐍 Python 🦀 Rust Resident memory 16 × 83 MB ≈ 1.33 GB 16 × 12 MB ≈ 192 MB Session startup 16 × 462 ms ≈ 7.4 s 16 × 2.5 ms ≈ 40 ms A gigabyte of resident Python to expose sixteen tool lists is a real cost. 2. No shared interpreter. These rigs install system-wide — no virtualenvs, by policy — so all sixteen share one Python. Sixteen servers with independently drifting boto3 and mcp pins in one interpreter is a standing conflict risk. A static binary has no such coupling; each rig pins whatever it likes in its own Cargo.lock . 3. The schema can't drift from th

2026-08-16 原文 →
AI 资讯

Serving Gemma4 with Rust on vLLM 🦀

This tutorial walks through installing and setting up the Rust toolchain for vLLM on an AWS EC2 G5g instance — Graviton2 (aarch64) with an NVIDIA T4G GPU — and getting vLLM's Rust frontend ( vllm-rs ) built, running, and verified . This paper is a follow-on to the original G5g Gemma 4 build. Everything below was run on the box. 🦀 Wait, vLLM has Rust in it? You betcha. Since PR #40848 (merged 2026-05-21), vLLM vendors a 14-crate Rust workspace : bench chat cmd engine-core-client llm managed-engine metrics mock-engine parser parser/python server text tokenizer tracing Edition 2024, resolver 3. Straight from the vendored rust/Cargo.toml : Crate Version Job axum 0.8.8 the HTTP server tokio 1.47.1 async runtime zeromq 0.6.0 talks to the Python engine rmp-serde / rmpv 1.3.1 msgpack on the wire minijinja 2.22 chat templates tonic / prost 0.14.6 / 0.14.3 gRPC — remember this one It's a drop-in replacement for the Python FastAPI server. Two artifacts get built: 🦀 vllm-rs — the axum frontend binary 🐍 vllm._rust_tool_parser — a PyO3 extension module Rust is a build requirement now That's the headline, and it's reason enough on its own: you cannot build vLLM from source at v0.27.2rc0 without Rust in the picture. setup.py imports it at module scope, line 21, unguarded: from setuptools_rust.build import build_rust No try , no feature flag, no opt-out. Metadata generation doesn't happen without it. And this isn't a quirk of one release. vLLM's Rust surface is 14 crates covering the HTTP frontend, the tool parser, the tokenizer and the benchmark client, and it has been growing since it landed. If you build inference infrastructure from source, a Rust toolchain is becoming table stakes — so it's worth knowing how to drive it properly rather than working around it. Three things do get conflated, though, and they have different scopes: Component Needed to build vLLM? Needed to serve? setuptools_rust (Python pkg) yes, always no cargo / rustc toolchain for working Rust artifacts no prot

2026-08-15 原文 →
开源项目

🔥 jlcodes99 / cockpit-tools - 🚀 通用 AI IDE 账号管理工具:支持 Antigravity / Codex / GitHub Copilot /

GitHub热门项目 | 🚀 通用 AI IDE 账号管理工具:支持 Antigravity / Codex / GitHub Copilot / Windsurf / Kiro / Cursor / Gemini-cli / CodeBuddy,多账号切换、配额监控、自动唤醒与多开实例管理。 🚀 Universal AI IDE account manager for Antigravity / Codex / GitHub Copilot / Windsurf / Kiro / Cursor / Gemini-cli / CodeBuddy, with multi-account switching, quota monitoring, wake-up automation, and multi-insta | Stars: 15,751 | 75 stars today | 语言: Rust

2026-08-14 原文 →
AI 资讯

Why Rust and WebAssembly Are Replacing JavaScript for Heavy AI Workloads in 2026

Why Rust and WebAssembly Are Replacing JavaScript for Heavy AI Workloads in 2026 While JavaScript remains the reigning language for web UI rendering, high-throughput client-side compute—such as local browser AI inference, video encoding, and cryptographic verification —has completely shifted to Rust compiled to WebAssembly (WASM) . In 2026, running 1B+ parameter models directly inside the browser using WebGPU and WASM SIMD has become standard practice. ⚡ Benchmarks: JS vs WASM SIMD execution Execution Time (Lower is Better) ┌────────────────────────────────────────────────────────┐ │ JavaScript (V8 Engine) : █ █ █ █ █ █ █ █ █ █ 1,420 ms │ │ Rust WASM SIMD : █ █ 210 ms │ └────────────────────────────────────────────────────────┘ Building a Rust WASM Compute Module Add the wasm-bindgen dependency in your Cargo.toml : [package] name = "wasm_ai_engine" version = "0.1.0" edition = "2021" [lib] crate-type = [ "cdylib" ] [dependencies] wasm-bindgen = "0.2" Implement high-speed array processing in src/lib.rs : use wasm_bindgen :: prelude :: * ; #[wasm_bindgen] pub fn process_tensor_data ( inputs : & [ f32 ], multiplier : f32 ) -> Vec < f32 > { inputs .iter () .map (| & x | x * multiplier ) .collect () } #[wasm_bindgen] pub fn compute_cosine_similarity ( vec_a : & [ f32 ], vec_b : & [ f32 ]) -> f32 { let dot_product : f32 = vec_a .iter () .zip ( vec_b .iter ()) .map (|( a , b )| a * b ) .sum (); let norm_a : f32 = vec_a .iter () .map (| a | a * a ) .sum :: < f32 > () .sqrt (); let norm_b : f32 = vec_b .iter () .map (| b | b * b ) .sum :: < f32 > () .sqrt (); if norm_a == 0.0 || norm_b == 0.0 { return 0.0 ; } dot_product / ( norm_a * norm_b ) } Compile directly to WebAssembly: wasm-pack build --target web Integrating into Next.js / Frontend Stack import init , { compute_cosine_similarity } from ' ./pkg/wasm_ai_engine.js ' ; async function runVectorSearch () { await init (); const vec1 = new Float32Array ([ 0.12 , 0.45 , 0.98 ]); const vec2 = new Float32Array ([ 0.15 , 0.42 ,

2026-08-13 原文 →
AI 资讯

I Was Tired of Losing Disk Space to node_modules - So I Built ArtifactSweep

Being a developer, we all create many projects for learning, work, and experiments. Over time my machine started filling up — not with source code, but with generated junk : node_modules target dist / build framework caches like .next , .angular , .nuxt and more of the same across every cloned repo Every few months I would hunt folders manually, delete something, free a few GB, then the same problem would come back. Only learning about “clean your disk” tips doesn’t help much. Building something for the problem does. So I ended up building ArtifactSweep — a small open-source tool for this everyday developer issue. The real problem As developers we regenerate these folders all the time: npm install cargo build ng build They are not our source of truth. But they sit on the SSD for months. The painful part is not only size. It is: Finding them across many project roots Knowing how big they are before delete Not deleting the wrong folder by mistake I wanted something that could: Scan a folder tree Show sizes Let me clean with more control Work on my day-to-day machines (Windows, Linux, Mac) Step 1: Start with a CLI I started with the command line first. Why CLI? Fast to build and test Fits terminal-first workflow Easy to script and share The CLI is called sweep . Basic usage: # Safe: only list junk under a path sweep scan . # Preview deletes sweep clean . --dry-run # Delete sweep clean . On one of my project folders alone, it reclaimed nearly 5 GB . That was enough validation: this is not a fake problem. Every active developer hits it. Step 2: Then came the desktop app CLI is great when you already know the path and trust dry-run. But sometimes I wanted to: See a list of folders and sizes Filter by type Confirm before delete Click through without remembering flags So I added a desktop app on top of the same idea (same cleanup job, different UI). Flow is simple: Choose folder Scan Review results (and filters if needed) Clean with confirmation If you like GUIs for this ki

2026-08-13 原文 →
AI 资讯

Astro 7: Rust Compiler, Rust Markdown Pipeline and Vite 8 for Builds Up to 61% Faster

Astro 7 focuses on build performance, utilizing native tooling and a rewritten compiler in Rust. The new version includes faster Markdown processing and stricter HTML rules. Recent updates introduced advanced routing and incremental builds, while issues around legacy file compatibility and dependency counts were raised in feedback. Astro targets content-driven sites with minimal JavaScript. By Daniel Curtis

2026-08-13 原文 →