Basic StructureΒΆ

This is an example of AILANG file structure, involving a .ail suffix at the end of the file. The code within this block is a simple AILANG profolio application, meant to showcase the basic structure and syntax of AILANG.

# app.ail

# import statements for this file
imports: windows

# decriptions for the main file
app: "AILANG Demo Application."
description: "A simple application to demonstrate AILANG's capabilities.  A Profolio Deployment to Web, iOS, and Windows."


# crosslinker specifications; must specify target languages
targets: @react, @swift, @cpp

# Optional: specify target frameworks
@react["tailwindcss", "vite"]
@swift["swiftui"]
@cpp["qt"]

screen MainScreen:
title: "Welcome to MyApp"
layout: vertical


# -----------------------------
# State & Reactive Logic
# -----------------------------


# -----------------------------
# System & Persistence
# -----------------------------
persist:
- items

startup:
call LoadItems()