# `mix barnacle.new`
[🔗](https://github.com/physarella/barnacle/blob/v0.1.0/lib/mix/tasks/barnacle/new.ex#L1)

Generates a standalone Zig project ready to build a BEAM NIF using `cement`.

## Usage

    # From the Elixir project root (creates native/<name>/)
    mix barnacle.new hasher

    # Create inside the current directory (e.g. after `cd native`)
    mix barnacle.new hasher --here

    # Custom options
    mix barnacle.new hasher --dir native --module MyApp.Hasher --barnacle-path ../../barnacle --elixir-stub

## Options

  * `--here` - Create `./<name>` in the current working directory instead of `native/<name>`
  * `--dir PATH` - Parent directory to create `<name>` inside
  * `--module NAME` - Elixir module name for `ErlNifEntry.name` (e.g. `MyApp.Hasher`)
  * `--barnacle-path PATH` - Path to the `barnacle` Zig dependency in `build.zig.zon`
  * `--otp N` - Default OTP version in `build.zig` (defaults to current BEAM OTP release)
  * `--elixir-stub` - Also create `lib/<app>/<name>.ex` using `Barnacle.Nif`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
