#radio-astronomy #astronomy #aoflagger

sys aoflagger_sys

rate will be renamed to aoflagger-sys, see https://github.com/MWATelescope/rust-aoflagger/issues/2

4 releases

new 0.1.3 Nov 13, 2024
0.1.2 Sep 23, 2024
0.1.1 Nov 29, 2022
0.1.0 Aug 31, 2021

#514 in Science

Download history 27/week @ 2024-07-29 33/week @ 2024-08-05 58/week @ 2024-08-12 34/week @ 2024-08-19 1/week @ 2024-08-26 9/week @ 2024-09-09 449/week @ 2024-09-23 16/week @ 2024-09-30 22/week @ 2024-10-07 20/week @ 2024-10-14 24/week @ 2024-10-21 46/week @ 2024-11-04 356/week @ 2024-11-11

428 downloads per month
Used in birli

MPL-2.0 license

32KB
453 lines

Rust AOFlagger

Crate will be renamed to aoflagger-sys, see issue #2

Rust bindings for https://gitlab.com/aroffringa/aoflagger

Installation

Prerequisites

aoflagger_sys itself only requires AOFlagger, version >= 3.0, but that requires many dependencies. On Ubuntu > 21.04, apt install aoflagger-dev is enough, but for OS-specific instructions, check out the linux and macOS CI Scripts and the Makefile.toml as these are tested regularly. The instructions below may be updated less frequently, but are better documented.

If AOFlagger is in a non-standard location, AOFLAGGER_INCLUDE_DIR and AOFLAGGER_LIB may be set to the include and library directories, respectively, which allows aoflagger_sys to find the correct files.

(Debian/Ubuntu) Linux Setup

# Prerequisites for rustup, cargo and cargo-make
sudo apt install -y gcc libssl-dev pkg-config curl unzip wget
# Run the Rustup install script, profile=default, toolchain=stable
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -sSf | sh -s -- -y
# Cargo make uses Makefile.toml to automate development tasks
cargo install --force cargo-make
# Use multiple cores when compiling C/C++ libraries
export MAKEFLAGS="-j $MAKEFLAGS"
# Install prerequisite C/C++ libraries
cargo make install_deps
# Ensure that rust can find the C/C++ libraries.
export LD_LIBRARY_PATH="/usr/local/lib/"

MacOS Setup

# Install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Run the Rustup install script, profile=default, toolchain=stable
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -sSf | sh -s -- -y
# Cargo make uses Makefile.toml to automate development tasks
cargo install --force cargo-make
# Add the MWATelescope homebrew tap
brew tap mwatelescope/tap
# Install prerequisite libraries
brew cask install mwatelescope/aoflagger
# Ensure that rust can find the C/C++ libraries.
export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib/

Windows Setup

Unfortunately most of the prerequisites aren't available on Windows. However, WSL is a thing.

Dependencies

~0.5–2.1MB
~34K SLoC