Install SQLPage on OpenBSD

Updated: by
Comments: antics@mastodon.nu

Download binary of SQLPage for OpenBSD 7.6: sqlpage-openbsd7.6.tar.gz

The binary is compiled with instructions from below.

SQLPage is an SQL-only webapp builder. It is meant for data scientists, analysts, and business intelligence teams to build powerful data-centric applications quickly, without worrying about any of the traditional web programming languages and concepts.

Compile SQLPage from source

Compile and install rust 1.82.0

Latest OpenBSD is 7.6 (as of writing this) on which pkg_add installs version 1.81.0 (eeb90cda1 2024-09-04) of rustc.

rustc 1.82.0 is the first version that supports unsafe blocks. So you need to update to at least that version to compile SQLPage on OpenBSD.

I have used the instructions from this page to compile rust 1.82.0 (2024-10-13): https://www.openbsd-desktop.rocks/posts/update-rust/

pkg_add rust git

git clone https://github.com/semarie/build-rust.git

cd build_rust

# If you are not the root user:
# echo "SUDO=doas" > ~/.build_rust.conf

./build.sh init

# Rust release version and base dir on system:
echo 'distfiles_rustc_base="https://static.rust-lang.org/dist/2024-10-13"' >> ~/.build_rust.conf
echo "rust_base_dir=/usr/local" >> ~/.build_rust.conf

./build.sh beta

cd install_dir
mv beta current
cd current
cp -r {bin,lib,libexec,share} /usr/local

rustc --version
# Should now print:
# rustc 1.82.0-beta.6 (763ad520c 2024-10-12) (built from a source tarball)

Compile and install SQLPage

curl -L -O https://github.com/sqlpage/SQLPage/archive/refs/tags/v0.34.0.tar.gz
tar -zxvf v0.34.0.tar.gz
cd SQLPage-0.34.0
cargo build
cargo run

# If everything is ok you run:
cargo build --release

# Install to $HOME/.cargo/bin
cargo install --path .