Nicheloom

Market intelligence for builders — see what's gaining traction before it's crowded.

Rust-split

save your tokens on large Rust source files

Details

External ID
49671509
Source
HN
Company
—
Product
—
Website domain
—
Launched
Sept. 12, 2026
Cohort
—
Upvotes
5
Upvotes percentile
0.12998405103668262
Tags
—
Fetched at
Sept. 16, 2026, 5:01 p.m.
Updated at
Sept. 16, 2026, 5:01 p.m.

Description

A common failure mode for AI SW development is that agents tend to build large "God" files.This is bad on your token burn. A) because the larger your source file the more churn the LLM takes to find and emit edits, which are more likely to fail, and B) the real kicker - the agent's process is to move one item at a time, which is an O(n^2) algorithm, but especially bad because it inevitably breaks and the code mushes up and sadness ensues (burning time and tokens).So, I have had lots of success with rust-split and a few skill notes. rust-split uses the AST (syn) to find the correct boundaries. Two passes: explode cuts the file into top-level items with their comments and #[attrs] attached - lossless, cat the chunks together and you get the original back byte for byte, so you can check it before trusting it - then split writes the module layout under a LOC ceiling. What's left for the LLM is basically fixing imports, which doesn't burn anywhere near as many tokens. It's not perfect with the transition but fixing small import issues LLMs can do efficiently.rust-split is released as a GitHub attested release or a crates.io install:https://github.com/owebeeone/rust-split cargo install rust-split Be sure to add the skill file (https://github.com/owebeeone/rust-split/blob/main/skills/rus...) and set your project's line thresholds. I chose a soft limit of 1000 LOC to trigger the decision to split (I've found that at 2000 LOC agents lose it, so give yourself a safety margin) and the target max size of a split file to be 500 LOC, but preferably more smaller files than 2x500 LOC files.Enjoy

Enrichment

Theme
lightweight and on-device AI runtimes
Vertical
Horizontal
Function
Dev tools
Audience
Developer
AI stance
AI feature
Project type
Hobby / open-source project
Normalized one-liner
code splitter for rust files to reduce llm token usage
Manually corrected
False

Could you build this?

Yes A CLI tool that parses Rust source files using `syn` or `tree-sitter` and splits modules/functions across multiple files is well within AI coding assistant capabilities.

Discussion

2 comments analyzed.

Competitors

Other products that read as similar to this one — 111 launches clear the similarity bar, closest 8 shown.

Attention rank: #93 of 112 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).

Launched 315 days after the earliest competitor.

Other launches for this product

Same idea, different domain

Nobody's really built a dev tools tool for Sales yet.