ptex 0.3.0

High-level Ptex bindings over ptex-sys
Documentation
# Use "cargo install garden-tools" to install garden (https://gitlab.com/garden-rs/garden).
# Usage:
#   garden grow ptex        # One-time setup: clone dependencies.
#   garden build all        # Build ptex-sys and ptex.
#   garden build            # Build ptex only.
#   garden check            # Run checks and tests.
#   garden test             # Run tests.
#   garden dev              # Build, check and test everything.
#   garden watch            # Build, check and test whenever files are saved.
#   garden doc              # Build documentation.

variables:
    jobs: $ nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 8
    libdir: $ PKG_CONFIG_PATH=${GARDEN_ROOT}/ptex/dist/share/pkgconfig pkg-config --variable=libdir ptex

commands:
    dev: garden build all && garden check
    doc: cargo doc --document-private-items --workspace "$@"
    watch: cargo watch --shell 'garden build all && garden check'

trees:
    ptex:
        description: Ptex texture-mapping system
        url: "https://github.com/wdas/ptex.git"
        commands:
            build: make -j ${jobs} prefix="${TREE_PATH}/dist" install

    ptex-bind:
        description: Rust bindings for Ptex
        url: "git@github.com:vfx-rs/ptex-bind.git"
        path: ${GARDEN_CONFIG_DIR}
        environment:
            LD_LIBRARY_PATH: ${libdir}
            PKG_CONFIG_PATH: ${GARDEN_ROOT}/ptex/dist/share/pkgconfig
        commands:
            audit: cargo audit "$@"
            build: cargo build --workspace "$@"
            test: cargo test --workspace "$@"
            expand: cargo expand "$@"
            check: |
                cargo clippy -- -D warnings
                cargo fmt --all --check
            check>:
                - test
                - audit
            fix: cargo clippy --all --fix "$@" -- -D warnings
            fmt: cargo fmt --all "$@"
            publish: |
                cd ./ptex-sys
                cargo publish "$@"
                cd ..
                cargo publish "$@"
        remotes:
            davvid: git@github.com:davvid/ptex-bind.git
            ratmice: git@github.com:ratmice/ptex-bind.git

groups:
    all:
        - ptex
        - ptex-bind