Developers
Cryswol and Wolkit: apps made for WolOS
What Cryswol, Wolkit and Crystal are, how they fit together, where to start, and where the complete developer documentation lives.
What it is
WolOS apps are written in The programming language WolOS's own apps and tools are written in. It reads like Ruby and runs fast., a language that reads like a script and builds into a normal program. Two libraries make it a WolOS app:
- The library that lets a program written in Crystal use WolOS: windows, notifications, files and the rest. is the phone line between your program and the system. Through it a program opens windows, posts notifications, uses the clipboard, saves preferences, opens file panels, shares, plays sound and asks for the things a person may allow or refuse.
- Wolkit is the kit for programs that draw their own window: a description of the window, state that updates only the parts that change, and the parts the interface guidelines name (toolbar, sidebar, sheet, menu, tabs).
Your program never needs administrator rights to talk to the system, and it never reaches around the rules: before it does something personal, such as showing notifications, the person using it decides. A refusal arrives in your program as an error that carries WolOS's own sentence, ready to show.
Why WolOS does it this way
Writing an app should not mean managing memory by hand or decoding error numbers. Cryswol does that once, in one place, so a program of twelve lines is a real app. Splitting the work keeps both halves good: the fast, safe things (layout, text, painting, input, accessibility) live in the engine under Wolkit, and the pleasant things (the language you write in, components, tools) live in the Crystal part.
How
- Install the Developer Tools. Tick Developer Tools in the installer, or open System Settings > Modules and click Install next to it (Set up for development).
- Write and run a first program. Your first app in Crystal walks through twelve lines that read the system, ask to post a notification and handle a refusal.
- Draw a window. The Wolkit tutorial in the Reference builds a small to-do app in about fifteen minutes: a signal, a text field, a list, a style sheet, a test and a package (Your first Wolkit app).
- Look things up. The Reference has every object of Cryswol (Cryswol), every element of Wolkit (Wolkit), its style language (Wolkit style), the engine (libWolkit) and the interface guidelines (Interface guidelines). The Cryswol page shows what it looks like.
A worked example
Alice writes a small program that asks the system whether it is in light or dark mode and tries to post a notification. The first time, WolOS asks her to allow notifications for the program. She says no, and the program prints the sentence WolOS gave it: it says where in System Settings she could allow it later. Her program is finished, small, and behaves the way people expect an app to behave.
If something goes wrong
| What you see | What to do |
|---|---|
crystal: command not found | The Developer Tools are not installed. Install them in System Settings > Modules. |
| A permission error with a sentence | The person has not allowed it. Show the sentence; it says where in System Settings to allow it. |
| A window freezes while a file panel is open | Call the panel in the background, so the window keeps drawing. The Reference shows how. |
| An app refuses to start on another computer | It was built for a newer system library than that computer has. Update that computer, then try again. |
Related
- Your first app in CrystalWrite, build and run a small WolOS app in Crystal with Cryswol: it reads the system, tries to post a notification, and handles a refusal the way every app must.
- Set up for developmentThe Developer module adds Git, a code editor, containers, runtimes for every language and Crystal with Cryswol in one step, and makes ~/Work for your projects.
- Scripts and shellsRun sh, bash and Ruby scripts with wol script: checked before they run, as you, every change asked on screen and every run recorded. And choose the shell new terminal windows open in, PowerShell included.
- Privacy and permissionsWhat apps may use and how you allow it, the questions WolOS asks on screen, the firewall and the malware check, and where to take any permission back.
- Modules: tools for what you doDeveloper tools, AI assistants, creative apps, games and a richer terminal, each added in one step from Settings > Modules and removed in one step.