Getting Started with OMEGA
Learn how to install OMEGA and write your first blockchain smart contract
Installation
Prerequisites
- OMEGA Compiler (self-hosting native compiler)
 - Node.js 18+ (for EVM tooling)
 - Git
 
Install from Source
git clone https://github.com/Rafael2022-prog/omega-lang.git
cd omega
make build
make install
                        Windows Installation
# Using PowerShell build script
.\build.ps1 -Mode release
.\build.ps1 -Install
                        Native Build System
# Using OMEGA native build system
omega build --config omega.toml
omega install --system-wide
                        Install via Package Manager
# Coming soon
npm install -g @omega-lang/cli
                    Quick Start
1. Initialize New Project
omega init my-dapp --template basic
cd my-dapp
                        2. Configure Target Blockchains
omega config enable evm solana
omega config show
                        3. Write Your First Smart Contract
Create a file called SimpleToken.mega:
// contracts/SimpleToken.mega
blockchain SimpleToken {
    state {
        mapping(address => uint256) balances;
        uint256 total_supply;
        string name;
        string symbol;
    }
    
    constructor(string _name, string _symbol, uint256 _initial_supply) {
        name = _name;
        symbol = _symbol;
        total_supply = _initial_supply;
        balances[msg.sender] = _initial_supply;
    }
    
    function transfer(address to, uint256 amount) public returns (bool) {
        require(balances[msg.sender] >= amount, "Insufficient balance");
        require(to != address(0), "Invalid recipient");
        
        balances[msg.sender] -= amount;
        balances[to] += amount;
        
        emit Transfer(msg.sender, to, amount);
        return true;
    }
    
    function balance_of(address account) public view returns (uint256) {
        return balances[account];
    }
    
    event Transfer(address indexed from, address indexed to, uint256 value);
}
                        4. Compile for Multiple Targets
omega build
# Output:
# ✅ EVM: SimpleToken.sol generated
# ✅ Solana: SimpleToken.rs + Cargo.toml generated  
# ✅ Cosmos: SimpleToken.go generated
# ✅ Build completed successfully
                        5. Deploy to Testnet
omega deploy --target evm --network sepolia
omega deploy --target solana --network devnet
omega deploy --target cosmos --network cosmoshub-testnet
                    Project Structure
my-dapp/
├── contracts/
│   └── SimpleToken.mega
├── tests/
│   └── token_tests.mega
├── omega.toml
├── build.mega
└── README.md