Repository F# setup
open System
open System.IO
open System.Threading
open System.Threading.Tasks
open Axial
open Axial.Layers
open Axial.Console
open Axial.FileSystem
open Axial.Hosting
open Axial.Hosting.Browser
open Axial.Hosting.Node
open Axial.PlatformService
open Axial.State
open Axial.Telemetry
open Axial.Telemetry.JavaScriptPlatform services
Platform services expose common host capabilities to Flow with cancellation, replaceable implementations, and typed errors where callers can recover. They are supporting parts of Axial Core rather than separate documentation contexts.
Higher-level libraries build their own programming models on top of Axial and these capabilities. Axial.Process composes external commands and streams. Axial.HttpClient models HTTP requests, responses, and reliability. Each has its own guides and API reference.
| Service | Wraps | Axial API |
|---|---|---|
| Clock | DateTimeOffset.UtcNow |
Current time and derived Unix-time readers |
| Logging | Host logging | Structured messages and exception-preserving logging |
| Randomness and GUIDs | System.Random, Guid.NewGuid() |
Explicit random values, byte generation, and GUID creation |
| Environment variables | Environment.GetEnvironmentVariable |
Required and parsed reads with EnvironmentVariableError |
| Console | System.Console |
Standard streams, redirection, and terminal control |
| File system | System.IO.File and Directory |
File and directory operations with FileSystemError |
open Axial
open Axial.Console
AxialConsoleA workflow declares the capability it needs:
let greet name : Flow<#IHasConsole, Never, unit> =
Console.writeLine $"Hello, {name}."
greet: 'a -> Flow<'b,Never,unit>name: 'aAxial.Flow`3Represents a cold workflow that reads an environment, returns a typed result, and is executed explicitly through one of its execution members such as ToTask, ToAsync, or RunSynchronously. The type of the environment dependency. The type of the failure value. The type of the success value.
Axial.Console.IHasConsoleDeclares that an environment supplies the console service. Implement this on the environment supplied at the host edge. A workflow that reads or writes the console constrains its environment with 'env :> IHasConsole.
Axial.NeverRepresents an error channel that cannot occur.
unitThe type 'unit', which has only one value "()". This value is special and always uses the representation 'null'. Basic Types
Axial.Console.ConsoleModulewriteLine: string -> Flow<'env,'error,unit>The host supplies the live implementation at the edge. Tests supply a recording or in-memory implementation of the same contract.
In this section
- Platform-service bundle — clock, logging, randomness, GUIDs, and environment variables.
- Console — standard streams, redirection, and terminal control.
- File system — files, directories, paths, and typed failures.
- Using existing services — compose
BaseRuntimewith application dependencies.
Telemetry instruments the runtime rather than defining a workflow dependency. Hosting supplies environments and application lifecycle integration.

