syntax

syntax is a cursor rule for Cursor from Sounio-lang/sounio. It costs 0 tokens per session (850 once invoked), scanned A, original, Apache-2.0.

A syntax reference for Sounio, a programming language that resembles Rust but uses different rules.

In plain words
What is it for?
Use it while writing or reviewing .sio files to check valid bindings, references, functions, collections, arithmetic, and other Sounio syntax.
Why use it?
It prevents common Rust-based mistakes, such as semicolons, mutable-binding syntax, mutable-reference syntax, macros, closures, unary negative literals, and incorrect shift types.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it while writing or reviewing .sio files to check valid bindings, references, functions, collections, arithmetic, and other Sounio syntax.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/sounio-lang/sounio/syntax
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Sounio-lang/sounio

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for syntax

README.md
[![agentmods](https://agentmods.dev/badge/rules/sounio-lang/sounio/syntax/github.svg)](https://agentmods.dev/rules/sounio-lang/sounio/syntax)
Your own site
<a href="https://agentmods.dev/rules/sounio-lang/sounio/syntax"><img src="https://agentmods.dev/badge/rules/sounio-lang/sounio/syntax/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for syntax

Your own site · 80×15
<a href="https://agentmods.dev/rules/sounio-lang/sounio/syntax"><img src="https://agentmods.dev/badge/rules/sounio-lang/sounio/syntax.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 850 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00850
Opus 5.5 $0.00000 $0.00340
Sonnet 5.5 $0.00000 $0.00170
Haiku 4.5 $0.00000 $0.00085

Measured 24d ago against content hash c431068cab1a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

syntax scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 24d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/syntax.mdc · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sounio Syntax — Anti-Rust Patterns

Sounio LOOKS like Rust but has different syntax and semantics. These are the most common mistakes.

1. NO Semicolons

Sounio statements end WITHOUT semicolons. The parser treats ; as an error.

// WRONG
let x = 5;
// CORRECT
let x = 5

2. var not let mut

Mutable bindings use var. There is no let mut.

// WRONG
let mut x = 10;
// CORRECT
var x = 10

3. &! not &mut

Exclusive (mutable) references use &!T. There is no &mut.

// WRONG
fn set(x: &mut i32) { *x = 5 }
// CORRECT
fn set(x: &!i32) with Mut { *x = 5 }

4. NO Macros

Sounio has no macro system. No ! after function names.

// WRONG
assert!(x > 0)
println!("hello")
vec![1, 2, 3]
// CORRECT
assert(x > 0)
println("hello")
[1, 2, 3]

5. NO Closure Literals

|x| x + 1 does not compile. Use named function references.

// WRONG
let f = |x| x + 1
// CORRECT
fn add_one(x: i64) -> i64 { x + 1 }
let f = add_one

6. Unary Minus Works

Unary minus works on literals, variables and arguments; no 0 - x workaround is needed.

let neg = -42
let flipped = -x

7. Bit Shifts Take a Plain Integer

The shift amount is a plain integer literal or a variable of any integer type.

let shifted = x >> 4

8. Array Index Requires Cast

Array indices must be usize.

// WRONG
let val = arr[i]
// CORRECT
let val = arr[i as usize]

9. NO Attributes

No #[test], #[derive()], or any other attributes.

10. NO .len() / .push() on Arrays

Fixed arrays are not objects. Track length manually or use stdlib IntVec.

struct IntVec { data: [i64; 4096], len: i64 }
impl IntVec {
    fn push(self: &!IntVec, val: i64) with Mut, Panic {
        self.data[self.len as usize] = val
        self.len = self.len + 1
    }
}

11. Effects Are MANDATORY

Functions with side effects MUST declare them. See .cursor/rules/effects.mdc.

12. Match Arms — NO Commas

match value {
    Pattern1 => result1
    Pattern2 => result2
    _ => default
}

Read the full file on GitHub · 124 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 24d ago Changed · -5 lines c431068cab1a
  2. 1mo ago First seen · 129 lines · 0 tokens per session scan A f5a831d411cd

Subscribe to this mod's changes

syntax is a cursor rule published in the GitHub repository Sounio-lang/sounio (12 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 850 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.