halide-runtime 0.4.0

Bindings to the Halide runtime
Documentation
HALIDE_PATH?=~/halide

HEADER?=HalideRuntime.h

build: bindings
	cargo build

bindings:
	bindgen \
		--raw-line '#![allow(warnings)]' \
		--rustified-enum "halide.*_t" \
		--whitelist-type 'halide.*_t' \
		--whitelist-function 'halide.*' \
		--no-doc-comments \
		--no-layout-tests \
	$(HEADER) > src/runtime.rs

test:
	halide run -g brighter.cpp -- -g brighter -o . -e o target=host
	$(CC) -shared -o libbrighter.so brighter.o
	cargo test

update-header:
	curl -O https://raw.githubusercontent.com/halide/Halide/master/src/runtime/HalideRuntime.h