Skip to content

Project Configuration

The ion.config.json file defines your project name, enabled features, and code generation targets.

Full Example

{
  "name": "MyProject",
  "features": ["std"],
  "modules": {
    "auth": "../shared/auth-contracts"
  },
  "generators": {
    "dotnet": {
      "features": ["models", "client", "server"],
      "outputs": "./"
    },
    "browser": {
      "outputFile": "./client.generated.ts"
    }
  }
}

name

Required. The project name. Used as the module identifier in generated code and schema lock files.

"name": "MyContracts"

features

Required. An array of feature modules to enable. Available features:

Feature Description
std Standard library — includes all primitive types, Maybe<T>, Array<T>, Partial<T>
vector Vector math types — Vector2, Vector3, Vector4, Quaternion
orleans Microsoft Orleans integration — grain-aware code generation

generators

Required. At least one generator must be configured. Each key is a target platform.

dotnet

Generates C# code with multiple output files.

Field Description
features Array of: "models" (type definitions), "client" (RPC client impls), "server" (server executors)
outputs Output directory for generated files (relative to project root)

browser

Generates a single TypeScript file for browser clients.

Field Description
outputFile Path to the generated .ts file

modules

Optional. A map of external module dependencies. Each key is the module name (used in #import directives), and the value is a relative path to the module's root directory:

"modules": {
  "auth": "../shared/auth-contracts",
  "common": "../shared/common-types"
}

Each referenced path must contain a valid ion.config.json. Modules are resolved recursively — if a module depends on other modules, those are resolved too. See the Modules guide for details on resolution, cycle detection, and content hashing.

Validation

The IonPath Toolkit VS Code extension provides JSON schema validation for ion.config.json. The schema is bundled at extensions/ionpath-toolkit/schemas/ion-config.schema.json and triggers automatically for any file named ion.config.json.