<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Cradicle Explorer</title>
    <link href="/css/bootstrap/bootstrap.min.css" rel="stylesheet">
    <style>
      .form-control-dark::placeholder {
          color: #aaa;
          opacity: 1;
      }
    </style>
    <link rel="stylesheet" href="/assets/fontawesome/css/all.min.css">
    <link rel="icon" type="image/png" href="/favicon.png">


                <link href="/css/dashboard.css" rel="stylesheet">
                </head>
                <body>
                <header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
                  <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3 fs-6" href="/">Cradicle Explorer</a>
                  <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                  </button>
                  <form method="get" action="/cgi-bin/main" style="width:100%;"><input class="form-control form-control-dark w-100 rounded-0 border-0" type="text" name="q" placeholder="Search repos" aria-label="Search"></form>
                  <div class="navbar-nav flex-row">
                    <div class="nav-item text-nowrap">
                      <a class="nav-link px-3 active" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM">ae-carbon-hyperchains</a>
                    </div>
                  </div>
                </header>
                <div class="container-fluid">
                  <div class="row">
                    <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-dark sidebar collapse">
                      <div class="position-sticky pt-3 sidebar-sticky">
                        <ul class="nav flex-column">
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM">
                              <i class="align-text-bottom fa-solid fa-info"></i>
                              Info
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&issue=list">
                              <i class="align-text-bottom fa-solid fa-layer-group"></i>
                              Issues
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&patch=list">
                              <i class="align-text-bottom fa-solid fa-vest-patches"></i>
                              Patches
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&wallet=list">
                              <i class="align-text-bottom fa-solid fa-wallet"></i>
                              Wallets
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link active" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=.">
                              <i class="align-text-bottom fa-solid fa-code"></i>
                              Source
                            </a>
                          </li>
                        <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted text-uppercase">
                          <span></span>
                        </h6>
                        <ul class="nav flex-column mb-2">
                        
    <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-1 mb-1 text-muted text-uppercase">
      <span>Source</span>
    </h6>
    <li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=aeplugin_carbon"><i class="fa-solid fa-folder-open" style="color:#f0c040;"></i> aeplugin_carbon</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=aeplugin_carbon%2Fdocs"><i class="fa-solid fa-folder-open" style="color:#f0c040;"></i> docs</a></li><li><a class="nav-link py-0 active" style="padding-left:48px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&file=aeplugin_carbon%2Fdocs%2Fplugin.md"><i class="fa-solid fa-file" style="color:#888;"></i> plugin.md</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=aeplugin_carbon%2Finclude"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> include</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=aeplugin_carbon%2Fpriv"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> priv</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=aeplugin_carbon%2Fsrc"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> src</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=aeplugin_carbon%2Ftest"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> test</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&file=aeplugin_carbon%2F.gitignore"><i class="fa-solid fa-file" style="color:#888;"></i> .gitignore</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&file=aeplugin_carbon%2FLICENSE.md"><i class="fa-solid fa-file" style="color:#888;"></i> LICENSE.md</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&file=aeplugin_carbon%2FMakefile"><i class="fa-solid fa-file" style="color:#888;"></i> Makefile</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&file=aeplugin_carbon%2FREADME.md"><i class="fa-solid fa-file" style="color:#888;"></i> README.md</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&file=aeplugin_carbon%2Ferlang_ls.config"><i class="fa-solid fa-file" style="color:#888;"></i> erlang_ls.config</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&file=aeplugin_carbon%2Frebar.config"><i class="fa-solid fa-file" style="color:#888;"></i> rebar.config</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&file=aeplugin_carbon%2Frebar.lock"><i class="fa-solid fa-file" style="color:#888;"></i> rebar.lock</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=agent"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> agent</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=docs"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> docs</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=hc-contract"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> hc-contract</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&file=.gitignore"><i class="fa-solid fa-file" style="color:#888;"></i> .gitignore</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&file=.tool-versions"><i class="fa-solid fa-file" style="color:#888;"></i> .tool-versions</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&file=README.md"><i class="fa-solid fa-file" style="color:#888;"></i> README.md</a></li>
    
                        </ul>
                      </div>
                    </nav>
                <main class="col-md-9 ms-sm-auto col-lg-10">
                  <div class="container px-1 py-3">
        
<div class="mb-2" style="font-size:1.1rem;"><a href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=.">/</a> <a href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=aeplugin_carbon">aeplugin_carbon</a> / <a href="/cgi-bin/repo?id=z3PHPznddi8hmrvcKiWcYwFkm9XLM&source=aeplugin_carbon%2Fdocs">docs</a> / plugin.md</div>
        <div class="list-group">
        <div class="list-group-item">
        <div class="mb-2" style="font-weight:bold;"><i class="fa-solid fa-file"></i> plugin.md</div>
        <pre style="margin:0; font-size:0.85rem; overflow-x:auto; color:#fafafa;"><span style="color:#666; user-select:none;"> 1</span>  # aeplugin_rebar3 plugin
<span style="color:#666; user-select:none;"> 2</span>  
<span style="color:#666; user-select:none;"> 3</span>  This is a rebar3 plugin for building Aeternity node plugin packages.
<span style="color:#666; user-select:none;"> 4</span>  
<span style="color:#666; user-select:none;"> 5</span>  For an example, see [aeplugin_dev_mode](https://github.com/aeternity/aeplugin_dev_mode)
<span style="color:#666; user-select:none;"> 6</span>  
<span style="color:#666; user-select:none;"> 7</span>  The plugin ensures that dependencies that are also dependencies of the Aeternity node,
<span style="color:#666; user-select:none;"> 8</span>  are fetched with the same version as that used by the node the plugin is built for.
<span style="color:#666; user-select:none;"> 9</span>  
<span style="color:#666; user-select:none;">10</span>  By default, dependencies will be checked against the `master` branch of the Aeternity repos,
<span style="color:#666; user-select:none;">11</span>  but another branch or tag can be specified, or a local repository on disk can be used.
<span style="color:#666; user-select:none;">12</span>  
<span style="color:#666; user-select:none;">13</span>  The command `rebar3 ae_plugin` packs the plugin application and all dependencies not
<span style="color:#666; user-select:none;">14</span>  already included in the Aeternity node build into a zip (`&quot;.ez&quot;`) archive. This archive
<span style="color:#666; user-select:none;">15</span>  is then copied (or symlinked) into the `plugins/` archive of the Aeternity node, where it
<span style="color:#666; user-select:none;">16</span>  is automatically picked up and extracted into `plugins/lib/`, from where it is then loaded.
<span style="color:#666; user-select:none;">17</span>  
<span style="color:#666; user-select:none;">18</span>  ## Usage
<span style="color:#666; user-select:none;">19</span>  
<span style="color:#666; user-select:none;">20</span>  To activate the plugin, add it to the `rebar.config` file of your AE node plugin application.
<span style="color:#666; user-select:none;">21</span>  
<span style="color:#666; user-select:none;">22</span>  ```erlang
<span style="color:#666; user-select:none;">23</span>  {plugins, [
<span style="color:#666; user-select:none;">24</span>             {aeplugin_rebar3, {git, &quot;https://github.com/aeternity/aeplugin_rebar3&quot;, {branch,&quot;master&quot;}}}
<span style="color:#666; user-select:none;">25</span>            ]}.
<span style="color:#666; user-select:none;">26</span>  ```
<span style="color:#666; user-select:none;">27</span>  
<span style="color:#666; user-select:none;">28</span>  ### Specifying the Aeternity root
<span style="color:#666; user-select:none;">29</span>  
<span style="color:#666; user-select:none;">30</span>  By default, the `master` branch of the [Aeternity repos](https://github.com/aeternity/aeternity) is used.
<span style="color:#666; user-select:none;">31</span>  Specifically, the `rebar.lock` file is fetched, and dependency targets and versions are extracted.
<span style="color:#666; user-select:none;">32</span>  
<span style="color:#666; user-select:none;">33</span>  A different root can be specified in one of two ways, listed in order of priority:
<span style="color:#666; user-select:none;">34</span>  
<span style="color:#666; user-select:none;">35</span>  1. Create a symbolic link to an Aeternity source package on-disk. Name the link `aeternity`.
<span style="color:#666; user-select:none;">36</span>  2. Specify the target as `aeternity_root` in your `rebar.config`.
<span style="color:#666; user-select:none;">37</span>     The value can either be `{local, AeternityDir}` or `{git, URI, BranchOrTag}`
<span style="color:#666; user-select:none;">38</span>  
<span style="color:#666; user-select:none;">39</span>  ```erlang
<span style="color:#666; user-select:none;">40</span>  {aeternity_root, {git, &quot;https://github.com/aeternity/aeternity&quot;, &quot;master&quot;}}.
<span style="color:#666; user-select:none;">41</span>  ```
<span style="color:#666; user-select:none;">42</span>  
<span style="color:#666; user-select:none;">43</span>  ### Name Aeternity dependencies
<span style="color:#666; user-select:none;">44</span>  
<span style="color:#666; user-select:none;">45</span>  Dependencies that are also dependencies of the Aeternity node, are listed as `{App, {ae, App}}`.
<span style="color:#666; user-select:none;">46</span>  
<span style="color:#666; user-select:none;">47</span>  Example:
<span style="color:#666; user-select:none;">48</span>  
<span style="color:#666; user-select:none;">49</span>  ```erlang
<span style="color:#666; user-select:none;">50</span>  {deps, [
<span style="color:#666; user-select:none;">51</span>          {lager, {ae, lager}},
<span style="color:#666; user-select:none;">52</span>          {cowboy, {ae, cowboy}},
<span style="color:#666; user-select:none;">53</span>          {aeserialization, {ae, aeserialization}},
<span style="color:#666; user-select:none;">54</span>          {jsx, {ae, jsx}},
<span style="color:#666; user-select:none;">55</span>          ...
<span style="color:#666; user-select:none;">56</span>         ]}.
<span style="color:#666; user-select:none;">57</span>  ```
<span style="color:#666; user-select:none;">58</span>  
<span style="color:#666; user-select:none;">59</span>  (Strictly speaking, the 2nd element in the `{ae,...}` tuple can be anything, as the plugin
<span style="color:#666; user-select:none;">60</span>  currently ignores it. Rebar3 seems to expect a 2-tuple, though.)
<span style="color:#666; user-select:none;">61</span>  
<span style="color:#666; user-select:none;">62</span>  ### Build the archive file
<span style="color:#666; user-select:none;">63</span>  
<span style="color:#666; user-select:none;">64</span>  `rebar3 ae_plugin`
<span style="color:#666; user-select:none;">65</span>  
<span style="color:#666; user-select:none;">66</span>  The `ae_plugin` command depends on `compile`, so the code will be automatically compiled first.
<span style="color:#666; user-select:none;">67</span>  
<span style="color:#666; user-select:none;">68</span>  The archive file will be placed in the profile build directory (e.g. `_build/default`) of your
<span style="color:#666; user-select:none;">69</span>  plugin application, and named `PluginName.ez`. Example:
<span style="color:#666; user-select:none;">70</span>  
<span style="color:#666; user-select:none;">71</span>  ```
<span style="color:#666; user-select:none;">72</span>  aeplugin_dev_mode.ez
<span style="color:#666; user-select:none;">73</span>  ```
</pre>
        </div>
        </div>

</div>
</main>
</div>
</div>


</body>
</html>

