#!/bin/sh
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# Copyright © 2021, stack-graphs authors.
# Licensed under either of Apache License, Version 2.0, or MIT license, at your
# option.  Please see the LICENSE-APACHE or LICENSE-MIT files in this
# distribution for license details.
# ------------------------------------------------------------------------------

set -e
cd "$(dirname "$0")/.."

if ! which cbindgen >/dev/null 2>/dev/null; then
    echo "Cannot find cbindgen!  Try `cargo install cbindgen`." >&2
    exit 1
fi

mkdir -p include
cbindgen > include/stack-graphs.h
