<a id="development"></a>

# Development

The `hsh` program allows for a convenient building and testing
environment when developing functions for the Halon scripting language.
The `hsh` program will call the following plugin functions.

> * [`Halon_version()`](plugins_native.html.md#c.Halon_version)
> * [`Halon_hsl_register()`](plugins_native.html.md#c.Halon_hsl_register)
> * [`Halon_init()`](plugins_native.html.md#c.Halon_init)
> * [`Halon_cleanup()`](plugins_native.html.md#c.Halon_cleanup)

Other function such as delivery functions has to be built and tested
using external testing frameworks or by using `smtpd` in a testing environment.

We recommend to use any of the examples in our
[GitHub](https://github.com/halon-extras?language=c%2B%2B) repository as the boilerplate to get started quickly.

<a id="hsh"></a>

## hsh

The `hsh` program will load all plugins in the `--config` file specified, and the plugins *app* configuration from the plugins section in the `--appconf` file specified (optional).

<a id="hsh-yaml"></a>

### hsh.yaml

```yaml
version: "6.12"
plugins:
  - id: myplugin
    path: myplugin.so
    config:
     setting1: true
```

<a id="hsh-app-yaml"></a>

### hsh-app.yaml

```yaml
version: "6.12"
plugins:
  - id: myplugin
    config:
     setting2: true
```

Run the `hsh` program with the `--plugin` flag for each plugin to load.

```console
hsh --config hsh.yaml --appconf hsh-app.yaml --plugin myplugin test.hsl
```
