feat: replace curl with libcurl, add mirror URL support and TUI download progress#200
Merged
Sunrisepeak merged 6 commits intomainfrom Mar 8, 2026
Merged
feat: replace curl with libcurl, add mirror URL support and TUI download progress#200Sunrisepeak merged 6 commits intomainfrom
Sunrisepeak merged 6 commits intomainfrom
Conversation
…d TUI download progress
- Add core/curl.cppm module wrapping libcurl C API (download_file, probe_latency, fetch_to_file)
- Replace all curl command invocations with libcurl calls (downloader, config, commands)
- Add real-time TUI progress display for parallel downloads using ANSI escape redraws
- Support url table format { GLOBAL = "...", CN = "..." } in xpm package definitions
- Select preferred mirror from DownloaderConfig, remaining mirrors become fallback URLs
- Bump mcpplibs-xpkg to 0.0.28 (adds mirrors field to PlatformResource)
- Add libcurl 8.11.0 dependency
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace libcurl dependency with a lightweight tinyhttps module built on mbedTLS + raw POSIX sockets, enabling fully static musl-libc builds with zero glibc dependency. Same public API (download_file, probe_latency, fetch_to_file) - only internal implementation changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The XLINGS_RES e2e test asserts the resolved mirror URL appears in install output. Add log line showing the download URL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
use tinyhtpps.cppm replace curl.cppm |
- mbedTLS 3.x requires psa_crypto_init() before TLS operations, otherwise handshake fails with "internal error in lower-level module" - Windows requires WSAStartup before any Winsock socket operations - Use std::call_once for thread-safe lazy initialization Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mbedTLS 3.6.1 TLS 1.3 key derivation fails with internal error in static builds (handshake parses all messages but final key derivation step fails). Force TLS 1.2 which works reliably. Also pin mbedtls version to 3.6.1 in xmake.lua. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
curlsubprocess calls withlibcurlC API via newcore/curl.cppmmodule, enabling real-time per-task download progress callbacks[>>] name [########----] 45.7%url = { GLOBAL = "...", CN = "..." }table format in xpm definitions, select preferred mirror, use remaining as fallback URLsmirrorsfield toPlatformResourcestructChanged Files
core/curl.cppmdownload_file(),probe_latency(),fetch_to_file()core/xim/downloader.cppmcurl::download_file(), add TUI refresh threadcore/config.cppmcurl::probe_latency()core/xim/commands.cppmcurl::fetch_to_file()core/xim/installer.cppmxmake.lualibcurl 8.11.0, bumpmcpplibs-xpkgto0.0.28Test plan
xlings install mdbook musl-gcc— verify TUI progress bars display correctly--mirror CN— verify CN URL used as primary🤖 Generated with Claude Code