A Marathi Programming Language
Swaraj is a programming language with Marathi keywords, designed to honor Maharashtra's linguistic heritage while providing modern programming capabilities.
Swaraj means "self-rule" or "independence" in Marathi. This language embodies that spirit by using authentic Marathi words for all keywords, making programming accessible and natural for Marathi speakers.
- Marathi Keywords - Every keyword is authentic Marathi
- Fast & Safe - Written in Rust for performance and safety
- Simple & Clean - Easy to learn, powerful to use
- Intuitive Syntax - Based on natural Marathi grammar
- Modern Features - Functions, recursion, loops, conditionals, lists
- Rust 1.70+ (install from rust-lang.org)
git clone https://github.com/urngmi/swaraj
cd swaraj
cargo build --releaseThe compiled binary will be at target/release/swaraj.
swaraj program.swswarajswaraj --help # Show help
swaraj --version # Show version
swaraj -i # Start REPL
swaraj file.sw # Run a filebol "Namaste, Duniya!"
samajh name = "Maharashtra"
samajh count: puranaank = 42
samajh price: ardhaank = 99.99
bol name
kaarya square(n: puranaank): puranaank {
dya n * n
}
bol square(5)
jar (age >= 18) tar {
bol "Adult"
} naahi {
bol "Minor"
}
prati i madhye 1..10 {
bol i
}
samajh numbers = [10, 20, 30]
bol numbers[0]
| Marathi | Devanagari | English | Usage |
|---|---|---|---|
samajh |
समज | understand/let | Variable declaration |
kaarya |
कार्य | function/work | Function declaration |
dya |
द्या | give/return | Return statement |
bol |
बोल | say/print | Output |
| Marathi | Devanagari | English | Usage |
|---|---|---|---|
jar |
जर | if | Conditional |
tar |
तर | then | Then clause |
naahi |
नाही | else/not | Else clause |
prati |
प्रति | for each | For loop |
madhye |
मध्ये | in | Range specification |
paryant |
पर्यंत | while/until | While loop |
| Marathi | Devanagari | English | Example |
|---|---|---|---|
puranaank |
पूर्णांक | integer | 42 |
ardhaank |
अर्धांक | float | 3.14 |
akshar |
अक्षर | string | "text" |
satya |
सत्य | true | boolean true |
asatya |
असत्य | false | boolean false |
yaadi |
यादी | list | [1, 2, 3] |
The examples/ directory contains tutorial programs:
swaraj examples/01_hello.swSee examples/README.md for the complete tutorial guide.
cargo testcargo build --releaseMIT License
Swaraj - Programming with Independence
Made with love for Maharashtra
