pkg.soopen package index

brew / rank 8342

Install stanc3 with Homebrew, MacPorts, Nix

Stan transpiler. Version 2.39.0 via Homebrew; verified 2026-07-13. Also installable with macports: sudo port install stanc3.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install stanc3

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install stanc3

MacPorts ports tree · math/stanc3/Portfile · source: api.github.com

Linux

Nixverified · 92%
nix profile install nixpkgs#stanc

nixpkgs package indexes · pkgs/by-name/st/stanc/package.nix · source: api.github.com

overview

Package summary

Stan transpiler

Commands and aliases

  • stanc

history

Project history and usage

stanc3 is the OCaml implementation of the Stan compiler, exposed to users as the stanc command.

Project history

The official repository describes stanc3 as a new Stan-to-C++ compiler written in OCaml, with a frontend, middle representation, analysis and optimization layer, and Stan Math backend. The Stan User's Guide says the Stan compiler has been implemented in OCaml since Stan 2.22, while the repository README says stanc3 has been the default compiler for Stan since version 2.26.

Adoption history

stanc3 became part of normal Stan usage because Stan interfaces call the stanc compiler when translating models. The official releases page shows signed multi-platform binaries and a JavaScript version, while the package facts show Homebrew, MacPorts, and Nix packaging.

How it is used

Users generally encounter stanc through CmdStan and other Stan interfaces, or directly as a CLI with syntax like stanc options model_file. The User's Guide documents options for output files, generated C++ printing, automatic formatting, canonicalization, warnings, optimization levels, OpenCL support, and compiler diagnostics.

Why package nerds care

Package nerds care about stanc3 because it is the compiler binary behind a large statistical programming ecosystem. Its OCaml toolchain, generated multi-platform assets, JavaScript build, and integration with CmdStan make it a packaging-sensitive developer tool rather than just an internal library.

Timeline

  • 2018: Stan developers publicly discussed choosing OCaml for the new compiler implementation.
  • Stan 2.22: Stan User's Guide says the compiler has been implemented in OCaml since this version.
  • Stan 2.26: stanc3 became the default compiler for Stan, according to the official README.
  • 2026: stanc3 v2.39.0 release notes added language features, warning improvements, parser fixes, and optimization bug fixes.

Related projects

  • stanc3 is tightly related to Stan, CmdStan, Stan Math, Stan interfaces, stancjs, and the Stan documentation. Its developer docs also point to OCaml tooling such as dune, opam, ocamlformat, and Merlin.

security posture

No protected-tool coverage found yet

No matching local secret-handling manifest was found for stanc3. Nucleus package metadata is still published here so future coverage has a stable package URL.

Install behavior

  • No Homebrew bottle metadata was recorded.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
stancexecutableindexed executableDiscovered from the local executable index.

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-08-03
manager version2.39.0
manager updated2026-07-13
local dataunknown
upstreamnot available
latest detectednot detected
  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:stanc3
Version2.39.0
Package managerHomebrew
Homepagehttps://github.com/stan-dev/stanc3
Repositoryhttps://github.com/stan-dev/stanc3
Last updated2026-07-13T05:11:31Z
Pulseupdated
Bottlenot recorded
Servicenone declared

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

MacPorts95%

stanc3

sudo port install stanc3
  • normalized package name match
  • Matched by: Stanc3
MacPorts ports tree · api.github.com · MacPorts ports tree: math/stanc3/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
Nix92%

stanc

nix profile install nixpkgs#stanc
  • installed executable or alias match
  • Matched by: Stanc
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/st/stanc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • pkg.so package database
  • pkgdb category and tag curation