---
outline: deep
---

# Custom Rule

We can use `rule()` to define custom build rules to handle specific file types or build logic.

## Basic Example

<FileExplorer rootFilesDir="examples/configuration/custom_rule/basic" />

### Build and Run

```bash
$ xmake
```
