Skip to content

arroyo 编译和使用

Posted on:April 12, 2023 at 01:30 PM

背景

github 地址 Arroyo 是分布式流式引擎,使用Rust编写.因为要试用,所以写了这篇

编译

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/ArroyoSystems/arroyo.git
sudo apt install postgresql

配置路径:

/etc/postgresql/14/main/pg_hba.conf
## 链接postgresql
sudo -u postgres psql
## 创建database arroyo
create database arroyo;
## 执行sql , 要执行这个路径的
source  arroyo/arroyo-api/migrations/V1__initial.sql

##postgresql 创建用户
create user arroyo with password 'arroyo';
## 重启postgresql
sudo systemctl restart postgresql.service
## 切换目录
cd arroyo
## 编译
cargo build
## 如果编译不了,用
cargo build --no-default-features 

编译结果:

  Compiling datafusion-optimizer v20.0.0
   Compiling datafusion v20.0.0
   Compiling arroyo-sql v0.1.0 (/home/dai/rust/arroyo/arroyo-sql)
   Compiling arroyo-sql-macro v0.1.0 (/home/dai/rust/arroyo/arroyo-sql-macro)
   Compiling arroyo-sql-testing v0.1.0 (/home/dai/rust/arroyo/arroyo-sql-testing)
    Finished dev [unoptimized + debuginfo] target(s) in 2m 13s

错误和处理

发现没有ssl的库,我的系统是Ubuntu,所以执行sudo apt install libssl-dev , 如果编译不了用cargo build --no-default-features 试试

相关阅读