[PR #3891] [CLOSED] build: added the option to use static libraries #5930

Closed
opened 2026-03-23 22:20:57 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/3891
Author: @zoli
Created: 11/6/2023
Status: Closed

Base: mainHead: build/reduce-build-time


📝 Commits (10+)

  • bd76bbc build: introducing USE_STATIC_LIB env
  • 45b9f1a fix: install git before jemalloc4
  • 1c882a0 fix: jemalloc4 rocksdb conflict
  • 8c28c6f build: test running cargo make in 3 ways
  • 5660c02 fix: dockerfile workdir
  • 53d35de fix: source cargo for everey run
  • b9fcf1d fix: use curl instead of wget
  • c2b0da4 fix: install wget
  • 8b30c33 fix: change dockerfile back to build production
  • f7e25ac fix: enable USE_STATIC only on linux for now

📊 Changes

9 files changed (+75 additions, -60 deletions)

View changed files

📝 .github/workflows/flutter_ci.yaml (+7 -1)
📝 .github/workflows/mobile_ci.yaml (+3 -3)
📝 .github/workflows/rust_ci.yaml (+7 -7)
📝 .github/workflows/rust_coverage.yml (+5 -6)
📝 .github/workflows/tauri_ci.yaml (+5 -4)
📝 .gitignore (+3 -0)
📝 frontend/scripts/docker-buildfiles/Dockerfile (+9 -8)
📝 frontend/scripts/makefile/desktop.toml (+35 -30)
📝 frontend/scripts/makefile/flutter.toml (+1 -1)

📄 Description

Feature Preview

Added USET_STATIC_LIB environment variable to build AppFlowy SDK (sdk-dev-build task) using openssl, zstd, rocksdb static libraries, and eliminating their compile time.
I got static libraries from "rust-lib/target" directory (e.g. "frontend/rust-lib/target/x86_64-unknown-linux-gnu/debug/build/zstd-sys-2ceef7f8e16ac49d/out/" for zstd) which were built with cargo make --profile development-linux-x86_64 appflowy-core-dev command. I created a compressed file from all of them. The compressed file should get generated for each platform separately.

The result on my laptop was about 10-13 minutes saving build time for appflowy-core-dev task after flutter_clean task (the download time of the static libraries was not included).

Had some related notes and discussions before here https://github.com/AppFlowy-IO/AppFlowy/pull/3519.

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/3891 **Author:** [@zoli](https://github.com/zoli) **Created:** 11/6/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `build/reduce-build-time` --- ### 📝 Commits (10+) - [`bd76bbc`](https://github.com/AppFlowy-IO/AppFlowy/commit/bd76bbc0b52021f2fea5f2349e2eaea6031be1d0) build: introducing USE_STATIC_LIB env - [`45b9f1a`](https://github.com/AppFlowy-IO/AppFlowy/commit/45b9f1ab1e4e61ae7f6a35c85566ff7bcdfff9fb) fix: install git before jemalloc4 - [`1c882a0`](https://github.com/AppFlowy-IO/AppFlowy/commit/1c882a045d8cf6d45dc5874db7409547eafdfd56) fix: jemalloc4 rocksdb conflict - [`8c28c6f`](https://github.com/AppFlowy-IO/AppFlowy/commit/8c28c6f9fe0de1f307aec0a5b3aea6a7c36bcdde) build: test running cargo make in 3 ways - [`5660c02`](https://github.com/AppFlowy-IO/AppFlowy/commit/5660c029e9bc27181b409172ebf8dae0e592a507) fix: dockerfile workdir - [`53d35de`](https://github.com/AppFlowy-IO/AppFlowy/commit/53d35de3adc0ea541df81fd2709f821d2d027b6e) fix: source cargo for everey run - [`b9fcf1d`](https://github.com/AppFlowy-IO/AppFlowy/commit/b9fcf1d22397e4191074d2295ae07bfb1fc76fad) fix: use curl instead of wget - [`c2b0da4`](https://github.com/AppFlowy-IO/AppFlowy/commit/c2b0da4f7c06fc24b292ff8f6190a4bf9f054cd5) fix: install wget - [`8b30c33`](https://github.com/AppFlowy-IO/AppFlowy/commit/8b30c33f0290e4dad7ba177a39595c4e2fc6cb53) fix: change dockerfile back to build production - [`f7e25ac`](https://github.com/AppFlowy-IO/AppFlowy/commit/f7e25aca0548e78c2d76a9810c0d394e7fde9252) fix: enable USE_STATIC only on linux for now ### 📊 Changes **9 files changed** (+75 additions, -60 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/flutter_ci.yaml` (+7 -1) 📝 `.github/workflows/mobile_ci.yaml` (+3 -3) 📝 `.github/workflows/rust_ci.yaml` (+7 -7) 📝 `.github/workflows/rust_coverage.yml` (+5 -6) 📝 `.github/workflows/tauri_ci.yaml` (+5 -4) 📝 `.gitignore` (+3 -0) 📝 `frontend/scripts/docker-buildfiles/Dockerfile` (+9 -8) 📝 `frontend/scripts/makefile/desktop.toml` (+35 -30) 📝 `frontend/scripts/makefile/flutter.toml` (+1 -1) </details> ### 📄 Description ### Feature Preview Added `USET_STATIC_LIB` environment variable to build AppFlowy SDK (`sdk-dev-build` task) using openssl, zstd, rocksdb static libraries, and eliminating their compile time. I got static libraries from "rust-lib/target" directory (e.g. "frontend/rust-lib/target/x86_64-unknown-linux-gnu/debug/build/zstd-sys-2ceef7f8e16ac49d/out/" for zstd) which were built with `cargo make --profile development-linux-x86_64 appflowy-core-dev` command. I created a compressed file from all of them. The compressed file should get generated for each platform separately. The result on my laptop was about 10-13 minutes saving build time for `appflowy-core-dev` task after `flutter_clean` task (the download time of the static libraries was not included). Had some related notes and discussions before here https://github.com/AppFlowy-IO/AppFlowy/pull/3519. #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [ ] I've listed at least one issue that this PR fixes in the description above. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [x] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:20:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#5930
No description provided.