Setup
Install
Elixir stays a Mix dependency of the application that runs the node. The C library, the browser kit, and the Gleam, LFE, and Erlang sources are installed by scripts/install.sh onto a prefix. Mix compiles the BEAM files inside the host application.
Mix
def deps do
[
{:wiregrid, "~> 1.0"}
]
end
mix.exs requires elixir: ">= 1.17.0". The application starts :crypto, :logger, :public_key, and :ssl, and the application callback is Wiregrid.Application.
Runtime dependencies are empty on purpose. These packages are declared only: :test:
| Package | Constraint | Used for |
|---|---|---|
| postgrex | ~> 0.22.4 | Postgres adapter tests |
| redix | ~> 1.9 | Redis cache tests |
| xandra | ~> 0.19.4 | Scylla adapter tests |
| cowboy | ~> 2.18.0 | WebSocket transport tests |
| cowlib | ~> 2.19.0, override: true | Keeps OTP 26 off Cowlib 2.20 |
| stream_data | ~> 1.4 | Property tests |
A host that wants Postgres, Redis, Scylla, or Cowboy in production adds those libraries itself and passes the connection or the handler module into Wiregrid. The Hex package file list ships lib, src, priv, bindings, native, config, examples, scripts, docs, site, and the usual project markdown.
Prefix selection
scripts/install.sh installs include/wiregrid.h, the static and shared libraries plus pkgconfig/wiregrid.pc, share/wiregrid/ui, share/wiregrid/bindings, and share/wiregrid/LAYOUT.
PREFIX, when set, is used as given.- Root with
PREFIXunset uses/usr/localwhen that directory exists. - Any other user gets
~/.local. - On macOS, a Homebrew prefix owned by the current user is used when a system write to
/usr/localis the wrong default. Homebrew is not invoked as root.
When the prefix sits outside the default linker path, the script prints PKG_CONFIG_PATH, LD_LIBRARY_PATH or DYLD_LIBRARY_PATH, and C_INCLUDE_PATH. On Linux, /usr and /usr/local receive libraries in lib64 when that is where the system keeps them. Other prefixes use lib.
Release archive
A v* tag publishes wiregrid-<version>-linux-x86_64.tar.gz and SHA256SUMS. The install script checks that SHA-256 when the checksums asset is present. A missing checksums file is reported and the install continues.
curl -fsSL https://raw.githubusercontent.com/Plainwire-development/Wiregrid/v1.0.0/scripts/install.sh | sh
WIREGRID_VERSION selects a tag (a leading v is optional). WIREGRID_TARBALL selects an archive already on disk. A checkout that contains native/c and priv/ui builds the C library on this machine. An unpacked release tree installs the files it already has. A script piped into the shell, with no source tree, downloads the GitHub release.
The download URL is https://github.com/Plainwire-development/Wiregrid/releases/download/v<version>/wiregrid-<version>-linux-x86_64.tar.gz. Other operating systems and CPUs stop before installing a binary that does not match the machine. The script does not prompt. If the prefix is not writable, it exits.
Checks on a checkout
./scripts/doctor.sh
./scripts/setup-dev.sh
./scripts/verify.sh
make -C native/c test
verify.sh runs the test suite with warnings as errors, checks unused dependency overrides, and skips mix format --check-formatted on Elixir older than 1.19. LFE and Gleam checks are optional unless WIREGRID_REQUIRE_LFE=1 or WIREGRID_REQUIRE_GLEAM=1 is set. CI pins Gleam 1.18.1 and LFE 2.2.2.