Quick Start Guide
Installation
Using the installer script (Recommended)
curl -sSf https://asthra-lang.org/install | sh
Package Managers
Homebrew (macOS/Linux):
brew install asthra-lang/tap/asthra
Chocolatey (Windows):
choco install asthra
Your First Program
Create hello.asthra
:
func main() {
print("Hello, Asthra!")
}
Run it:
asthra run hello.asthra
Language Basics
// Variables
let name = "Asthra"
mut counter = 0
// Functions
func greet(name: String) -> String {
return "Hello, ${name}!"
}
// Data structures
struct User {
name: String
age: Int
}
// Pattern matching
match result {
Ok(value) => print("Success: ${value}"),
Err(error) => print("Error: ${error}")
}
Getting Help
- GitHub Discussions - Ask questions and share ideas
- GitHub Issues - Report bugs and request features
- Discord Server - Real-time chat with the community
Happy coding with Asthra! 🚀