Skip to content

fix: bundle libraries on Linux and Windows #5078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
May 23, 2025
Merged

Conversation

vansangpfiev
Copy link
Contributor

@vansangpfiev vansangpfiev commented May 22, 2025

Describe Your Changes

This pull request introduces several updates to the build configuration, packaging, and setup scripts for the Tauri-based application. Key changes include enhancements to the Linux and Windows build processes, adjustments to dependency management, and improvements to configuration files for better maintainability and functionality.

Build and Packaging Updates:

  • Linux Build Workflow: Updated .github/workflows/template-tauri-build-linux-x64.yml to include additional binaries (libvulkan.so and dependencies in binaries/deps) in both stable and non-stable channels for .deb packaging. Adjusted AppImage creation to ensure proper inclusion of these new dependencies. [1] [2]

  • Windows Installer: Enabled previously commented-out lines in src-tauri/tauri.bundle.windows.nsis.template to include additional CUDA-related DLLs (cublas64_11.dll, cublasLt64_11.dll, and cudart64_110.dll) in the Windows installer.

Dependency Management:

  • Download Scripts: Modified src-tauri/binaries/download.bat and src-tauri/binaries/download.sh to correctly place CUDA runtime binaries in the deps subdirectory for better organization. [1] [2]

Configuration Improvements:

  • Tauri Configuration: Updated src-tauri/tauri.conf.json to include the binaries/deps directory in the .deb files list for Linux builds, ensuring all necessary dependencies are packaged.

  • Capabilities Configuration: Reformatted src-tauri/capabilities/default.json for better readability and added new command-line argument validators (--cors, --allowed_origins, and others) to enhance flexibility. [1] [2]

Debugging and Logging:

  • Sidecar Setup: Added debug logging in src-tauri/src/core/setup.rs to log the sidecar command being executed, aiding in troubleshooting. Updated the PATH environment variable setup to use the executable's parent directory instead of the app data directory. [1] [2]

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Important

Enhances Linux and Windows build processes by including additional libraries, updating configurations, and improving logging for better maintainability and debugging.

  • Build and Packaging:
    • Updated .github/workflows/template-tauri-build-linux-x64.yml to include libvulkan.so and dependencies in binaries/deps for .deb packaging and AppImage creation.
    • Enabled additional CUDA-related DLLs in src-tauri/tauri.bundle.windows.nsis.template for Windows installer.
  • Dependency Management:
    • Modified download.bat and download.sh to place CUDA runtime binaries in deps subdirectory.
  • Configuration:
    • Updated tauri.conf.json to include binaries/deps in .deb files list.
    • Reformatted capabilities/default.json and added command-line argument validators.
  • Debugging and Logging:
    • Added debug logging in setup.rs to log sidecar command execution and updated PATH setup for Windows.

This description was created by Ellipsis for a07f013. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to a07f013 in 1 minute and 49 seconds. Click for details.
  • Reviewed 231 lines of code in 9 files
  • Skipped 0 files when reviewing.
  • Skipped posting 8 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/template-tauri-build-linux-x64.yml:110
  • Draft comment:
    New jq commands for deb packaging now map additional directories (e.g. 'binaries/deps'). Verify that these paths match your expected file layout and don’t conflict with existing resources.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to verify that the paths match their expected file layout and don't conflict with existing resources. This falls under asking the author to double-check things, which is against the rules.
2. extensions/inference-cortex-extension/package.json:16
  • Draft comment:
    The build:publish scripts remove the 'yarn downloadcortex' call. Confirm this removal is intentional so that required binaries are now handled elsewhere.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The comment violates our rules by asking for confirmation ("Confirm this removal..."). We should not ask authors to confirm their intentions. The change is clearly deliberate since it was removed from both platform-specific scripts. If this breaks something, it would be caught during testing/building. Maybe the removal of downloadcortex could cause serious build issues that wouldn't be immediately apparent during testing? If the removal causes issues, it would be caught during the PR's build process. We trust the author made this change intentionally and tested it. Delete this comment as it violates our rule against asking authors to confirm their intentions or explain their changes.
3. src-tauri/binaries/download.bat:15
  • Draft comment:
    The previously commented-out download call for '-avx2-cuda-cu11.7-x64.tar.gz' is now active. Ensure that shipping this additional CUDA runtime is intended and that all dependent code accommodates it.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to ensure that the change is intended and that all dependent code accommodates it. This violates the rule against asking the author to confirm their intention or ensure compatibility.
4. src-tauri/binaries/download.sh:51
  • Draft comment:
    CUDA runtime downloads now place files into the 'deps' subdirectory. This improves organization; please ensure that any downstream references to these binaries are updated accordingly.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, reminding the author to update downstream references due to a change in file location. It doesn't provide a specific code suggestion or ask for a test to be written. It violates the rule against making purely informative comments.
5. src-tauri/capabilities/default.json:55
  • Draft comment:
    New command‐line argument validators (for --data_folder_path, --cors, --allowed_origins) have been added. Confirm that the regex patterns and order meet your security and functionality requirements.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm that the regex patterns and order meet security and functionality requirements. This falls under asking the author to ensure behavior is intended, which is against the rules.
6. src-tauri/src/core/setup.rs:243
  • Draft comment:
    The Windows sidecar setup uses env::current_exe() without an explicit import for std::env. Adding 'use std::env;' at the top is recommended.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The code works fine either way - using the fully qualified path (std::env) or adding an import (use std::env). The codebase seems to prefer using std::env directly based on other usage. This is purely a style preference, not a functional issue. The comment is technically correct but not particularly valuable. The comment identifies a real inconsistency in import style. Having consistent imports could make the code more maintainable. While consistency is good, this is a minor style issue. The codebase already shows a preference for using std::env directly, so adding the import would actually reduce consistency. Delete the comment. The code works fine as is and the codebase shows a preference for using std::env directly rather than importing it.
7. src-tauri/tauri.bundle.windows.nsis.template:640
  • Draft comment:
    CUDA-related DLL installation lines have been uncommented. Verify that the versions (e.g. cublas64_11, cublasLt64_11, cudart64_110) are correct and consistent with your package requirements.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to verify the correctness and consistency of CUDA-related DLL versions. This falls under asking the author to double-check things, which is against the rules. The comment does not provide a specific suggestion or point out a specific issue, making it unapproved.
8. src-tauri/tauri.conf.json:108
  • Draft comment:
    The deb files configuration now includes a mapping for 'usr/lib/Jan/binaries' to 'binaries/deps'. Ensure that your build outputs conform to this structure.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to ensure that their build outputs conform to a new structure. This falls under the rule of not asking the author to ensure or verify something, which is not allowed.

Workflow ID: wflow_RkxKto6SvLCjyO3O

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

Copy link
Contributor

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

@louis-menlo louis-menlo merged commit 4684cf8 into release/v0.5.18 May 23, 2025
40 checks passed
@louis-menlo louis-menlo deleted the s/fix/bundle branch May 23, 2025 04:30
@github-project-automation github-project-automation bot moved this to QA in Jan May 23, 2025
@github-actions github-actions bot added this to the v0.5.18 milestone May 23, 2025
@david-menloai david-menloai moved this from QA to Done in Jan Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants