Building a Browser-Based RPG Map Editor with Rust, WebAssembly, WebGL2, and React
via DEV Community: rust (author: TheXper)
via DEV Community: rust (author: TheXper)
Telegraph
Building a Browser-Based RPG Map Editor with Rust, WebAssemb…
I've been building RPGMapEditor.com — a browser-based fantasy map editor for dungeon masters, worldbuilders, and tabletop RPG players. The stack is: Rust + WebAssembly for the editor core, WebGL2 for rendering, React + TypeScript for UI, Rocket for the backend…
Get The Best Assignment Writing Services Today& Top Your Class
https://www.writersupport.co.uk/writing-help/assignment-service/
A majority of students are assigned with plenty of assignment writing task but due to lack of sufficient time and skills, they end up with a failure assignment. Writing a perfect and flawless assignment is not an easy task and only an expert assignment writing service company. If you are also suffering from lower grades due to lack of skills and time then hire Writer Support UK. We know that students have no time to enjoy owing to assignments. Therefore, hire us because we are a premium assignment writing service UK with years of experience in the industry. We offer world-class assignment help from the expert and professional. You can count on us and buy assignment online from our expert writers.
Guaranteed Best Deal On First Order!
Cheap Assignment Writing Service to Score Top Grades
Students look for cheap assignment writing service, but not all assignment writing service UK offers cheap assignment service UK together with quality paper. Writer Support UK offers the best assignment writing service UK. We have hired qualified and experienced assignment writers who can deliver a quality assignment paper at a cheap and reasonable price. When you buy assignment online from us, we ensure to deliver the best assignment service. We believe in writing assignment from scratch rather than copying and pasting it from other sources. We also write fully referenced, cited, non-plagiarised assignment papers.
Benefits of Hiring a Premium Assignment Writing Service UK
Cheap Assignment:
We offer you a cheap assignment writing help UK so that you can easily afford assignment writing service from expert and professional team of writers. No matter how short the deadline or how tricky the topic, we will not charge you unreasonably high price like other assignment writing companies.
Help by Expert:
Only an expert assignment writer can write a quality and flawless assignment paper. For this purpose, we have hired a skilled, proficient and vetted team of writers. A majority of them hold Masters and PhD degree. So, if you have an assignment for master level, you can buy assignment help UK.
On-Time Delivery:
We ensure to make your assignment available before the deadline so that you are never late for the assignment submission. We are able to achieve it with the help of our experts who are good at finalizing the assignment right before the deadline so as to make it ready to be submitted on the time.
via DEV Community: rust (author: Writer Support Uk)
https://www.writersupport.co.uk/writing-help/assignment-service/
A majority of students are assigned with plenty of assignment writing task but due to lack of sufficient time and skills, they end up with a failure assignment. Writing a perfect and flawless assignment is not an easy task and only an expert assignment writing service company. If you are also suffering from lower grades due to lack of skills and time then hire Writer Support UK. We know that students have no time to enjoy owing to assignments. Therefore, hire us because we are a premium assignment writing service UK with years of experience in the industry. We offer world-class assignment help from the expert and professional. You can count on us and buy assignment online from our expert writers.
Guaranteed Best Deal On First Order!
Cheap Assignment Writing Service to Score Top Grades
Students look for cheap assignment writing service, but not all assignment writing service UK offers cheap assignment service UK together with quality paper. Writer Support UK offers the best assignment writing service UK. We have hired qualified and experienced assignment writers who can deliver a quality assignment paper at a cheap and reasonable price. When you buy assignment online from us, we ensure to deliver the best assignment service. We believe in writing assignment from scratch rather than copying and pasting it from other sources. We also write fully referenced, cited, non-plagiarised assignment papers.
Benefits of Hiring a Premium Assignment Writing Service UK
Cheap Assignment:
We offer you a cheap assignment writing help UK so that you can easily afford assignment writing service from expert and professional team of writers. No matter how short the deadline or how tricky the topic, we will not charge you unreasonably high price like other assignment writing companies.
Help by Expert:
Only an expert assignment writer can write a quality and flawless assignment paper. For this purpose, we have hired a skilled, proficient and vetted team of writers. A majority of them hold Masters and PhD degree. So, if you have an assignment for master level, you can buy assignment help UK.
On-Time Delivery:
We ensure to make your assignment available before the deadline so that you are never late for the assignment submission. We are able to achieve it with the help of our experts who are good at finalizing the assignment right before the deadline so as to make it ready to be submitted on the time.
via DEV Community: rust (author: Writer Support Uk)
Why Students Choose Our Homework Help Service
https://www.assignmentservice.co.uk/services/homework/
🎓 Subject-Specific Experts
Your homework is handled by writers who understand your subject deeply.
✍️ Custom-Written Solutions
Every homework task is written from scratch based on your instructions.
⏰ Fast Turnaround Time
We handle urgent homework deadlines without compromising quality.
📚 Accurate & Well-Researched Answers
We ensure your work is supported with proper logic, research, and academic structure.
🔒 100% Confidential Service
Your personal details and orders remain private and secure.
♻️ Free Revisions
We refine your homework until it meets your requirements.
How Our Homework Writing Service Works
Step 1: Submit Your Homework Details
Share your instructions, deadline, subject, and requirements.
Step 2: Get Matched with an Expert
We assign a qualified academic writer in your subject area.
Step 3: Research & Completion
Your homework is carefully researched and completed according to academic standards.
Step 4: Quality Checking
We proofread, check structure, and ensure originality.
Step 5: On-Time Delivery
You receive your completed homework before the deadline.
via DEV Community: rust (author: Assignment Service Uk)
https://www.assignmentservice.co.uk/services/homework/
🎓 Subject-Specific Experts
Your homework is handled by writers who understand your subject deeply.
✍️ Custom-Written Solutions
Every homework task is written from scratch based on your instructions.
⏰ Fast Turnaround Time
We handle urgent homework deadlines without compromising quality.
📚 Accurate & Well-Researched Answers
We ensure your work is supported with proper logic, research, and academic structure.
🔒 100% Confidential Service
Your personal details and orders remain private and secure.
♻️ Free Revisions
We refine your homework until it meets your requirements.
How Our Homework Writing Service Works
Step 1: Submit Your Homework Details
Share your instructions, deadline, subject, and requirements.
Step 2: Get Matched with an Expert
We assign a qualified academic writer in your subject area.
Step 3: Research & Completion
Your homework is carefully researched and completed according to academic standards.
Step 4: Quality Checking
We proofread, check structure, and ensure originality.
Step 5: On-Time Delivery
You receive your completed homework before the deadline.
via DEV Community: rust (author: Assignment Service Uk)
Web Developer Travis McCracken on The Power of Make and Bash
via DEV Community: rust (author: Travis McCracken Web Developer)
via DEV Community: rust (author: Travis McCracken Web Developer)
Telegraph
Web Developer Travis McCracken on The Power of Make and Bash
Unlocking Backend Power with Rust and Go: Insights from Web Developer Travis McCracken Hello, fellow developers and tech enthusiasts! I’m Web Developer Travis McCracken, and today I want to share my thoughts on the exciting world of backend development, especially…
Localizing a Tauri App for Japanese and English — What Actually Works
All tests run on an 8-year-old MacBook Air.
All results from shipping 7 Mac apps as a solo developer. No sponsored opinion.
All my apps ship in Japanese and English. Not separate codebases — one app, two languages, runtime switching.
Here's the implementation that works in production.
Why bother with dual language
Japanese users convert better on Japanese UI with JPY pricing. English users are a global market. Both are worth serving. One codebase is the only viable approach for a solo developer.
The i18n library
I use react-i18next in the React frontend:
bashnpm install i18next react-i18next
typescript// i18n.ts
import i18n from 'i18next'
import { initReactI18next } from 'react-i18next'
i18n.use(initReactI18next).init({
resources: {
en: { translation: enTranslations },
ja: { translation: jaTranslations },
},
lng: 'en',
fallbackLng: 'en',
})
export default i18n
Translation file structure
typescript// en.json
{
"sync": {
"start": "Start Sync",
"stop": "Stop Sync",
"status": {
"idle": "Ready",
"running": "Syncing...",
"complete": "Sync complete",
"error": "Sync failed"
}
},
"device": {
"connect": "Connect Device",
"disconnect": "Disconnect",
"notFound": "No device found"
}
}
// ja.json
{
"sync": {
"start": "同期開始",
"stop": "同期停止",
"status": {
"idle": "待機中",
"running": "同期中...",
"complete": "同期完了",
"error": "同期エラー"
}
},
"device": {
"connect": "デバイスを接続",
"disconnect": "切断",
"notFound": "デバイスが見つかりません"
}
}
Detecting system language
Get the system locale from Rust and pass to the frontend on launch:
rust#[tauri::command]
fn get_system_locale() -> String {
std::env::var("LANG")
.unwrap_or_default()
.split('.')
.next()
.unwrap_or("en")
.to_string()
}
typescriptconst locale = await invoke('get_system_locale')
const lang = locale.startsWith('ja') ? 'ja' : 'en'
i18n.changeLanguage(lang)
Localizing Gemini prompts
AI prompts need localization too. Japanese users get Japanese responses:
rustpub fn build_prompt(input: &str, lang: &str) -> String {
match lang {
"ja" => format!(
"以下のエラーを日本語で説明し、修正方法を提案してください。\nエラー: {}",
input
),
_ => format!(
"Explain this error and suggest a fix.\nError: {}",
input
),
}
}
A Japanese user who gets an English AI response will be confused. Localize the prompts.
The separate Gumroad listings
One app binary, two Gumroad listings — JP and EN with different prices and descriptions. The JP listing uses JPY pricing. The EN listing uses USD.
Users self-select. The binary is identical. The storefront is localized.
The verdict
react-i18next + system locale detection + localized AI prompts covers the full localization stack. The overhead is low. The market expansion is real.
If this was useful, a ❤️ helps more than you'd think — thanks!
Hiyoko PDF Vault → https://hiyokoko.gumroad.com/l/HiyokoPDFVault
X → @hiyoyok
via DEV Community: rust (author: hiyoyo)
All tests run on an 8-year-old MacBook Air.
All results from shipping 7 Mac apps as a solo developer. No sponsored opinion.
All my apps ship in Japanese and English. Not separate codebases — one app, two languages, runtime switching.
Here's the implementation that works in production.
Why bother with dual language
Japanese users convert better on Japanese UI with JPY pricing. English users are a global market. Both are worth serving. One codebase is the only viable approach for a solo developer.
The i18n library
I use react-i18next in the React frontend:
bashnpm install i18next react-i18next
typescript// i18n.ts
import i18n from 'i18next'
import { initReactI18next } from 'react-i18next'
i18n.use(initReactI18next).init({
resources: {
en: { translation: enTranslations },
ja: { translation: jaTranslations },
},
lng: 'en',
fallbackLng: 'en',
})
export default i18n
Translation file structure
typescript// en.json
{
"sync": {
"start": "Start Sync",
"stop": "Stop Sync",
"status": {
"idle": "Ready",
"running": "Syncing...",
"complete": "Sync complete",
"error": "Sync failed"
}
},
"device": {
"connect": "Connect Device",
"disconnect": "Disconnect",
"notFound": "No device found"
}
}
// ja.json
{
"sync": {
"start": "同期開始",
"stop": "同期停止",
"status": {
"idle": "待機中",
"running": "同期中...",
"complete": "同期完了",
"error": "同期エラー"
}
},
"device": {
"connect": "デバイスを接続",
"disconnect": "切断",
"notFound": "デバイスが見つかりません"
}
}
Detecting system language
Get the system locale from Rust and pass to the frontend on launch:
rust#[tauri::command]
fn get_system_locale() -> String {
std::env::var("LANG")
.unwrap_or_default()
.split('.')
.next()
.unwrap_or("en")
.to_string()
}
typescriptconst locale = await invoke('get_system_locale')
const lang = locale.startsWith('ja') ? 'ja' : 'en'
i18n.changeLanguage(lang)
Localizing Gemini prompts
AI prompts need localization too. Japanese users get Japanese responses:
rustpub fn build_prompt(input: &str, lang: &str) -> String {
match lang {
"ja" => format!(
"以下のエラーを日本語で説明し、修正方法を提案してください。\nエラー: {}",
input
),
_ => format!(
"Explain this error and suggest a fix.\nError: {}",
input
),
}
}
A Japanese user who gets an English AI response will be confused. Localize the prompts.
The separate Gumroad listings
One app binary, two Gumroad listings — JP and EN with different prices and descriptions. The JP listing uses JPY pricing. The EN listing uses USD.
Users self-select. The binary is identical. The storefront is localized.
The verdict
react-i18next + system locale detection + localized AI prompts covers the full localization stack. The overhead is low. The market expansion is real.
If this was useful, a ❤️ helps more than you'd think — thanks!
Hiyoko PDF Vault → https://hiyokoko.gumroad.com/l/HiyokoPDFVault
X → @hiyoyok
via DEV Community: rust (author: hiyoyo)
I don't want to be a programmer, I want to remind developers that they are failing us and they must take action
use Claude for project planning (it's expensive), use DeepSeek or a cheap Chinese model for coding, use Gemini for review. Errors here, errors there, GitBrain add-ons or VS Code add-ons depending on what you use. A problem in the code? Go to the browser to fix it. Then I need to pay for some subscription from my phone.
This is the curse of wasted time and scattered focus.
I'm not a Rust programmer, but it's the fastest language.
So I built an interface that integrates chat with 30+ AI providers simultaneously, payments, seven memory layers, and a simple but effective embedded IDE — Monica IDE — plus Microsoft Phi Nano.
A browser with advanced privacy tech. Orchestration between models and payments. A unique user experience for each person.
That's my idea. I don't know how to complete it, polish it, or test it on Windows or Mac — I only work on Linux. These are my financial limits. I need your help and advice.
github
via DEV Community: rust (author: aly ghaly)
use Claude for project planning (it's expensive), use DeepSeek or a cheap Chinese model for coding, use Gemini for review. Errors here, errors there, GitBrain add-ons or VS Code add-ons depending on what you use. A problem in the code? Go to the browser to fix it. Then I need to pay for some subscription from my phone.
This is the curse of wasted time and scattered focus.
I'm not a Rust programmer, but it's the fastest language.
So I built an interface that integrates chat with 30+ AI providers simultaneously, payments, seven memory layers, and a simple but effective embedded IDE — Monica IDE — plus Microsoft Phi Nano.
A browser with advanced privacy tech. Orchestration between models and payments. A unique user experience for each person.
That's my idea. I don't know how to complete it, polish it, or test it on Windows or Mac — I only work on Linux. These are my financial limits. I need your help and advice.
github
via DEV Community: rust (author: aly ghaly)
I built a local-first hybrid vector database in Rust from scratch
A few months ago I started building vecdb — a vector database that
runs entirely on your own machine. No cloud, no API keys, no subscription.
The problem
Most vector databases make you choose — semantic search OR keyword search.
Semantic search finds meaning but misses exact keywords. Keyword search
finds exact matches but misses meaning.
vecdb combines both in a two-stage pipeline:
1. HNSW dense index retrieves candidates by meaning
2. BM25 sparse index re-scores by keyword relevance
3. A fusion function combines both scores
What it can do
● Hybrid HNSW + BM25 retrieval
● SQL-like query language with VECTOR_SIM predicate
● Python and TypeScript SDKs
● Single binary, Docker support
● 187 tests
● MIT license
Example query
SELECT * FROM documents
WHERE VECTOR_SIM(vec, [0.1, 0.2, 0.3]) > 0.75
AND payload->>'region' = 'US'
LIMIT 10;
Try it
GitHub: https://github.com/zaydmulani09/vecdb
Would love feedback from the community — especially on the
architecture and what to tackle in v0.2.0.
via DEV Community: rust (author: Zayd Mulani)
A few months ago I started building vecdb — a vector database that
runs entirely on your own machine. No cloud, no API keys, no subscription.
The problem
Most vector databases make you choose — semantic search OR keyword search.
Semantic search finds meaning but misses exact keywords. Keyword search
finds exact matches but misses meaning.
vecdb combines both in a two-stage pipeline:
1. HNSW dense index retrieves candidates by meaning
2. BM25 sparse index re-scores by keyword relevance
3. A fusion function combines both scores
What it can do
● Hybrid HNSW + BM25 retrieval
● SQL-like query language with VECTOR_SIM predicate
● Python and TypeScript SDKs
● Single binary, Docker support
● 187 tests
● MIT license
Example query
SELECT * FROM documents
WHERE VECTOR_SIM(vec, [0.1, 0.2, 0.3]) > 0.75
AND payload->>'region' = 'US'
LIMIT 10;
Try it
GitHub: https://github.com/zaydmulani09/vecdb
Would love feedback from the community — especially on the
architecture and what to tackle in v0.2.0.
via DEV Community: rust (author: Zayd Mulani)
ให้ AI พูดภาษาไทยได้ด้วย Garudust Agent + iApp TTS
ถ้าคุณใช้ Garudust Agent อยู่แล้ว การเพิ่มความสามารถให้ AI พูดภาษาไทยออกมาเป็นเสียง ทำได้ในไม่กี่ขั้นตอน — ไม่ต้องแก้โค้ดใด ๆ เพราะ Garudust มีระบบ script tool ที่ pluggable อยู่แล้ว
TTS คืออะไร และทำไมต้อง iApp
TTS (Text-to-Speech) คือการแปลงข้อความเป็นเสียงพูด เหมาะกับ use case เช่น
● ตอบกลับผู้ใช้ด้วยเสียงแทนข้อความบน LINE / Telegram
● สร้างไฟล์เสียงสำหรับ podcast / narration อัตโนมัติ
● Accessibility — ผู้ใช้ที่อ่านหน้าจอยาก
iApp Technology เป็นบริษัทไทยที่มี TTS API รองรับภาษาไทยโดยเฉพาะ เสียงฟังเป็นธรรมชาติ รองรับสูงสุด 10,000 ตัวอักษรต่อ request คิดค่าใช้จ่าย 1 IC ต่อ 400 ตัวอักษร สมัครได้ที่ iapp.co.th
ขั้นตอนที่ 1 — ติดตั้ง tts tool จาก Hub
Garudust มี Hub รวม script tool ให้ install ได้ทันที
ระบบจะดึง
ขั้นตอนที่ 2 — เพิ่ม Provider Profile ใน config.yaml
Garudust ใช้ระบบ provider profile จัดการ API endpoint และ key — ไม่ต้อง hardcode ใน script
เปิด
ขั้นตอนที่ 3 — เพิ่ม API Key ใน .env
รับ key ได้จาก iapp.co.th/dashboard
ทดสอบผ่าน CLI
ผลลัพธ์:
เปิดฟัง:
เบื้องหลัง — run.py ทำงานยังไง
iApp TTS API คืน raw PCM มาโดยไม่มี WAV header ดังนั้น
ผลที่ได้คือ RIFF WAV 16-bit mono 24kHz — เปิดได้กับทุก audio player
เปลี่ยน Provider ได้ทันทีโดยไม่แตะโค้ด
นี่คือจุดแข็งของ Garudust provider profile — ถ้าอยากลอง provider อื่นเช่น AIS หรือ local model แค่เพิ่ม profile และเปลี่ยน
ขั้นต่อไปที่ทำได้
● LINE voice message — เพิ่ม
● Auto TTS reply — สั่งให้ agent เรียก
● Speaker selection — iApp มีหลายเสียง ตั้ง
สรุป
Garudust Agent เป็น open source ที่ github.com/garudust-org/garudust-agent — ติดตามหรือ contribute ได้เลย 🦅
via DEV Community: rust (author: Garudust)
ถ้าคุณใช้ Garudust Agent อยู่แล้ว การเพิ่มความสามารถให้ AI พูดภาษาไทยออกมาเป็นเสียง ทำได้ในไม่กี่ขั้นตอน — ไม่ต้องแก้โค้ดใด ๆ เพราะ Garudust มีระบบ script tool ที่ pluggable อยู่แล้ว
TTS คืออะไร และทำไมต้อง iApp
TTS (Text-to-Speech) คือการแปลงข้อความเป็นเสียงพูด เหมาะกับ use case เช่น
● ตอบกลับผู้ใช้ด้วยเสียงแทนข้อความบน LINE / Telegram
● สร้างไฟล์เสียงสำหรับ podcast / narration อัตโนมัติ
● Accessibility — ผู้ใช้ที่อ่านหน้าจอยาก
iApp Technology เป็นบริษัทไทยที่มี TTS API รองรับภาษาไทยโดยเฉพาะ เสียงฟังเป็นธรรมชาติ รองรับสูงสุด 10,000 ตัวอักษรต่อ request คิดค่าใช้จ่าย 1 IC ต่อ 400 ตัวอักษร สมัครได้ที่ iapp.co.th
ขั้นตอนที่ 1 — ติดตั้ง tts tool จาก Hub
Garudust มี Hub รวม script tool ให้ install ได้ทันที
garudust tool install tts
ระบบจะดึง
tool.yaml และ run.py มาไว้ที่ ~/.garudust/tools/tts/ และ register ใน registry อัตโนมัติขั้นตอนที่ 2 — เพิ่ม Provider Profile ใน config.yaml
Garudust ใช้ระบบ provider profile จัดการ API endpoint และ key — ไม่ต้อง hardcode ใน script
เปิด
~/.garudust/config.yaml แล้วเพิ่ม:providers:
# ... providers ที่มีอยู่แล้ว ...
tts-iapp:
url: https://api.iapp.co.th/v3/store/audio/tts
key: ${IAPP_API_KEY}
tools:
tts:
model: tts-iapp # ชี้ไปที่ profile ข้างบน
Garudust จะ injectGARUDUST_BASE_URLและGARUDUST_API_KEYเข้า script อัตโนมัติตอน runtime
ขั้นตอนที่ 3 — เพิ่ม API Key ใน .env
# ~/.garudust/.env
IAPP_API_KEY=iapp_live_xxxxxxxxxxxxxxxx
รับ key ได้จาก iapp.co.th/dashboard
ทดสอบผ่าน CLI
garudust "ใช้ tts tool แปลงข้อความว่า สวัสดีครับ ผมคือ Garudust ผู้ช่วย AI ของคุณ แล้วบอก path ไฟล์ที่ได้"
ผลลัพธ์:
สร้างไฟล์เสียงสำเร็จ
เสียงอยู่ที่: /tmp/tts_88b5bba372dd41a7acc7e37ea75df89b.wav
เปิดฟัง:
open /tmp/tts_88b5bba372dd41a7acc7e37ea75df89b.wav
เบื้องหลัง — run.py ทำงานยังไง
iApp TTS API คืน raw PCM มาโดยไม่มี WAV header ดังนั้น
run.py จัดการ wrap header ให้เอง:def pcm_to_wav(pcm: bytes, sample_rate: int = 24000, channels: int = 1, bits: int = 16) -> bytes:
byte_rate = sample_rate * channels * bits // 8
block_align = channels * bits // 8
data_size = len(pcm)
header = struct.pack(
"<4sI4s4sIHHIIHH4sI",
b"RIFF", 36 + data_size, b"WAVE",
b"fmt ", 16,
1, channels, sample_rate, byte_rate, block_align, bits,
b"data", data_size,
)
return header + pcm
ผลที่ได้คือ RIFF WAV 16-bit mono 24kHz — เปิดได้กับทุก audio player
เปลี่ยน Provider ได้ทันทีโดยไม่แตะโค้ด
นี่คือจุดแข็งของ Garudust provider profile — ถ้าอยากลอง provider อื่นเช่น AIS หรือ local model แค่เพิ่ม profile และเปลี่ยน
tools.tts.model บรรทัดเดียว:providers:
tts-ais:
url: https://your-ais-tts-endpoint/api/tts
key: ${AIS_TTS_API_KEY}
tools:
tts:
model: tts-ais # เปลี่ยนแค่นี้
run.py ไม่ต้องแตะเลย เพราะอ่าน GARUDUST_BASE_URL และ GARUDUST_API_KEY จาก profile เสมอขั้นต่อไปที่ทำได้
● LINE voice message — เพิ่ม
OutboundMessage::Audio ใน Garudust core แล้วส่งไฟล์ WAV เป็น voice message บน LINE ได้เลย● Auto TTS reply — สั่งให้ agent เรียก
tts ทุกครั้งที่ตอบ โดย inject ใน system prompt● Speaker selection — iApp มีหลายเสียง ตั้ง
TTS_SPEAKER_ID ใน .env เพื่อเลือกเสียงที่ชอบสรุป
Garudust Agent เป็น open source ที่ github.com/garudust-org/garudust-agent — ติดตามหรือ contribute ได้เลย 🦅
via DEV Community: rust (author: Garudust)
Rust for Web3 Hackers: Welcome to the Cyber-Mecha Repair Dock 🤖🔧
via DEV Community: rust (author: Sudip)
via DEV Community: rust (author: Sudip)
Telegraph
Rust for Web3 Hackers: Welcome to the Cyber-Mecha Repair Doc…
If you’re stepping into Web3 security, Solana development, or exploit research, there’s one language you’ll keep hearing everywhere: Rust 🦀 Rust has become the backbone of modern blockchain infrastructure. Most Solana smart contracts (Programs) are written…
Advanced Rust Concepts: Iterators, Closures, Generics & More (Part 2)
via DEV Community: rust (author: mihir mohapatra)
via DEV Community: rust (author: mihir mohapatra)
Telegraph
Advanced Rust Concepts: Iterators, Closures, Generics & More…
This is Part 2 of the Core Rust Concepts series. If you haven't read Part 1, start there — it covers Ownership, Borrowing, Lifetimes, Traits, Result/Option, and Pattern Matching. Table of Contents Closures Iterators & Iterator Adaptors Generics Enums & the…
The AI Economy Needs Its Own Infrastructure. That Is What I Am Building.
via DEV Community: rust (author: NOVAInetwork)
via DEV Community: rust (author: NOVAInetwork)
Telegraph
The AI Economy Needs Its Own Infrastructure. That Is What I …
**Six months ago I started writing a blockchain fromscratch in Rust. I was 18. I had no team, nofunding, and no real reason anyone should care. Today the codebase has 1,400+ tests, a 4-validatortestnet with 19M+ committed blocks, real Groth16ZK verification…
Rust for Solana #2: Giving Hands & Feet to Your Pointers (And Stopping the "Lafda") 🛠️🏃♂️
via DEV Community: rust (author: Sudip)
via DEV Community: rust (author: Sudip)
Telegraph
Rust for Solana #2: Giving Hands & Feet to Your Pointers (An…
In our last post, we stepped into the Cyber-Mecha Repair Dock (Pune Sector 2026) and dismantled why Solana Programs are completely stateless microchips that process external data containers (Accounts). We talked about the security guards: Immutable References…
Rust's Borrow Checker: Translating Intent into Memory Safety
When people start learning Rust, they usually run into the same obstacle: the borrow checker.
I’ve been there, and everyone has. But the truth is this: The borrow checker isn’t against you; it simply translates what you meant into what the computer needs. Once you understand that, Rust's borrow checker makes a lot more sense.
Let me show you the moment this made sense for me.
The Classic Problem
Here’s a tiny piece of code that looks harmless:
Rust says no. And at first, it's frustrating; it seems like the compiler is being pedantic. But there's a method to this.
Rust’s Two Rules
Rust has two simple rules:
1. You can have one mutable reference
2. OR any number of immutable references
The catch: You can never have both at the same time.
Why? Because if something is being changed, Rust doesn’t want other parts of your code reading a half‑changed value. And that's all there is to it.
The “Two Doors” Analogy
Imagine your data is a room.
● An immutable reference is like giving someone a window into the room.
They can look, but not touch.
● A mutable reference is like giving someone the key to the room.
They can move furniture around.
Rust’s rule is simple: You can’t have the window open while someone is rearranging the furniture.
Fixing the Code the Right Way
Here’s our earlier example, but fixed:
Or, if you really need both at once, you can clone. Cloning is not a crime, especially for beginners:
A Trick That Helps Every Beginner
If you're just starting out, follow this habit: If you’re mutating something, finish all your mutations before you borrow it. This one habit eliminates most borrow checker errors you'll see.
Why Rust Does This (And Why It’s a Good Thing)
Languages like Python, Java, and JavaScript let you mutate data while other parts of your code are reading it. Most of the time, it’s totally harmless. But sometimes, it causes:
● sneaky race conditions (which usually only occur during production)
● strange bugs
● inconsistent state
● security issues
● data corruption
Rust prevents all of that, because it's designed to.
If You’re Learning Rust, Here’s My Advice
Don’t fight the borrow checker. Instead:
● Borrow when you only need to read
● Mutate before you borrow
● Clone when you need independence
● Trust the compiler’s hints
● Keep your functions small
● Return owned data when in doubt
Rust rewards those who take the time to understand the mechanics. The borrow checker is just the first step in that shift in perspective.
Want More Beginner‑Friendly Rust Posts?
I’m working on a series covering:
● ownership
● borrowing
● lifetimes
● slices
● structs
● enums
● pattern matching
● error handling
● async basics
If you want me to cover something specific, or if there's a specific concept that hasn't clicked yet, drop it in the comments! I’ll turn the most requested topic into another post.
via DEV Community: rust (author: MournfulCord)
When people start learning Rust, they usually run into the same obstacle: the borrow checker.
I’ve been there, and everyone has. But the truth is this: The borrow checker isn’t against you; it simply translates what you meant into what the computer needs. Once you understand that, Rust's borrow checker makes a lot more sense.
Let me show you the moment this made sense for me.
The Classic Problem
Here’s a tiny piece of code that looks harmless:
let mut name = String::from("Alice");
let r = &name;
name.push('!'); // this is an error.
println!("{}", r);
Rust says no. And at first, it's frustrating; it seems like the compiler is being pedantic. But there's a method to this.
Rust’s Two Rules
Rust has two simple rules:
1. You can have one mutable reference
2. OR any number of immutable references
The catch: You can never have both at the same time.
Why? Because if something is being changed, Rust doesn’t want other parts of your code reading a half‑changed value. And that's all there is to it.
The “Two Doors” Analogy
Imagine your data is a room.
● An immutable reference is like giving someone a window into the room.
They can look, but not touch.
● A mutable reference is like giving someone the key to the room.
They can move furniture around.
Rust’s rule is simple: You can’t have the window open while someone is rearranging the furniture.
Fixing the Code the Right Way
Here’s our earlier example, but fixed:
let mut name = String::from("Alice");
name.push('!'); // do the mutation first
let r = &name; // then borrow immutably
println!("{}", r);
Or, if you really need both at once, you can clone. Cloning is not a crime, especially for beginners:
let mut name = String::from("Alice");
let r = name.clone();
name.push('!');
println!("original: {}", name);
println!("copy: {}", r);
A Trick That Helps Every Beginner
If you're just starting out, follow this habit: If you’re mutating something, finish all your mutations before you borrow it. This one habit eliminates most borrow checker errors you'll see.
Why Rust Does This (And Why It’s a Good Thing)
Languages like Python, Java, and JavaScript let you mutate data while other parts of your code are reading it. Most of the time, it’s totally harmless. But sometimes, it causes:
● sneaky race conditions (which usually only occur during production)
● strange bugs
● inconsistent state
● security issues
● data corruption
Rust prevents all of that, because it's designed to.
If You’re Learning Rust, Here’s My Advice
Don’t fight the borrow checker. Instead:
● Borrow when you only need to read
● Mutate before you borrow
● Clone when you need independence
● Trust the compiler’s hints
● Keep your functions small
● Return owned data when in doubt
Rust rewards those who take the time to understand the mechanics. The borrow checker is just the first step in that shift in perspective.
Want More Beginner‑Friendly Rust Posts?
I’m working on a series covering:
● ownership
● borrowing
● lifetimes
● slices
● structs
● enums
● pattern matching
● error handling
● async basics
If you want me to cover something specific, or if there's a specific concept that hasn't clicked yet, drop it in the comments! I’ll turn the most requested topic into another post.
via DEV Community: rust (author: MournfulCord)
How one bad prompt burned $40 of my Claude budget in 18 minutes
via DEV Community: rust (author: Mukunda Rao Katta)
via DEV Community: rust (author: Mukunda Rao Katta)
Telegraph
How one bad prompt burned $40 of my Claude budget in 18 minu…
I was running a multi-agent setup over a weekend. Three workers in parallel, each calling Claude, each with their own retry logic. I woke up on Sunday to a bill alert. Forty bucks. Eighteen minutes. One worker had gotten into a retry loop on a malformed tool…
Web Developer Travis McCracken on Using Async Rust Safely
via DEV Community: rust (author: Travis McCracken Web Developer)
via DEV Community: rust (author: Travis McCracken Web Developer)
Telegraph
Web Developer Travis McCracken on Using Async Rust Safely
Exploring Backend Development with Rust and Go: Insights from Web Developer Travis McCracken As a passionate Web Developer specializing in backend technologies, I’ve spent countless hours exploring the most efficient and reliable ways to build scalable APIs.…
AppleScript Injection and Directory Traversal — Security Bugs I Fixed in My Own Apps
All tests run on an 8-year-old MacBook Air.
All results from shipping 7 Mac apps as a solo developer. No sponsored opinion.
Security review of my own apps found real vulnerabilities. Not theoretical — actual bugs that could affect users.
Here's what I found and how I fixed them.
AppleScript injection via ADB output
HiyokoAutoSync uses ADB to get device information. ADB output is user-controlled — an attacker with physical access to the device can craft device names containing special characters.
If that output is passed to a shell command without sanitization:
rust// Vulnerable
let cmd = format!("osascript -e 'display notification \"{}\"'", device_name);
Command::new("sh").arg("-c").arg(&cmd).spawn();
A device named "; rm -rf ~/Documents; echo " executes arbitrary commands.
Fix: never interpolate external input into shell strings. Use argument arrays:
rust// Safe
Command::new("osascript")
.args(["-e", &format!("display notification \"{}\"",
device_name.replace('"', "\\""))])
.spawn();
Better: avoid shell interpretation entirely. Pass arguments as separate strings, not a single shell command.
Directory traversal in file sync
Sync operations use paths from ADB. A malicious Android app could expose a path like ../../.ssh/id_rsa via MTP.
rust// Vulnerable
let dest = mac_base_dir.join(&android_path); // android_path = "../../.ssh/id_rsa"
// dest is now outside mac_base_dir
Fix: validate that the resolved path stays within the intended directory:
rustfn safe_join(base: &Path, relative: &Path) -> Result {
let joined = base.join(relative);
let canonical = joined.canonicalize()
.unwrap_or(joined.clone());
}
Symlink attacks
A symlink in the source directory pointing outside the destination could allow writes to arbitrary locations.
rustfn is_safe_path(path: &Path) -> bool {
// Reject symlinks in sync operations
match path.symlink_metadata() {
Ok(meta) => !meta.file_type().is_symlink(),
Err(_) => false,
}
}
Skip symlinks during sync. Document this in the app — users who need symlink handling can request it explicitly.
The lesson
Security review of your own code finds real bugs. Do it before shipping, not after. The attack surface for a desktop app is smaller than a web app, but it's not zero — especially when external data (ADB output, file paths) influences file system operations.
If this was useful, a ❤️ helps more than you'd think — thanks!
Hiyoko PDF Vault → https://hiyokoko.gumroad.com/l/HiyokoPDFVault
X → @hiyoyok
via DEV Community: rust (author: hiyoyo)
All tests run on an 8-year-old MacBook Air.
All results from shipping 7 Mac apps as a solo developer. No sponsored opinion.
Security review of my own apps found real vulnerabilities. Not theoretical — actual bugs that could affect users.
Here's what I found and how I fixed them.
AppleScript injection via ADB output
HiyokoAutoSync uses ADB to get device information. ADB output is user-controlled — an attacker with physical access to the device can craft device names containing special characters.
If that output is passed to a shell command without sanitization:
rust// Vulnerable
let cmd = format!("osascript -e 'display notification \"{}\"'", device_name);
Command::new("sh").arg("-c").arg(&cmd).spawn();
A device named "; rm -rf ~/Documents; echo " executes arbitrary commands.
Fix: never interpolate external input into shell strings. Use argument arrays:
rust// Safe
Command::new("osascript")
.args(["-e", &format!("display notification \"{}\"",
device_name.replace('"', "\\""))])
.spawn();
Better: avoid shell interpretation entirely. Pass arguments as separate strings, not a single shell command.
Directory traversal in file sync
Sync operations use paths from ADB. A malicious Android app could expose a path like ../../.ssh/id_rsa via MTP.
rust// Vulnerable
let dest = mac_base_dir.join(&android_path); // android_path = "../../.ssh/id_rsa"
// dest is now outside mac_base_dir
Fix: validate that the resolved path stays within the intended directory:
rustfn safe_join(base: &Path, relative: &Path) -> Result {
let joined = base.join(relative);
let canonical = joined.canonicalize()
.unwrap_or(joined.clone());
if !canonical.starts_with(base) {
return Err(AppError::Security(
"Path traversal attempt detected".into()
));
}
Ok(joined)
}
Symlink attacks
A symlink in the source directory pointing outside the destination could allow writes to arbitrary locations.
rustfn is_safe_path(path: &Path) -> bool {
// Reject symlinks in sync operations
match path.symlink_metadata() {
Ok(meta) => !meta.file_type().is_symlink(),
Err(_) => false,
}
}
Skip symlinks during sync. Document this in the app — users who need symlink handling can request it explicitly.
The lesson
Security review of your own code finds real bugs. Do it before shipping, not after. The attack surface for a desktop app is smaller than a web app, but it's not zero — especially when external data (ADB output, file paths) influences file system operations.
If this was useful, a ❤️ helps more than you'd think — thanks!
Hiyoko PDF Vault → https://hiyokoko.gumroad.com/l/HiyokoPDFVault
X → @hiyoyok
via DEV Community: rust (author: hiyoyo)