Replies: 27 comments 29 replies
-
|
Recently, there are no more modifications. |
Beta Was this translation helpful? Give feedback.
-
|
@ssrlive Publish to crates.io failed, because the package is is too large |
Beta Was this translation helpful? Give feedback.
-
|
Seems we should download wxwidgets_3.3.1's source code at build time. |
Beta Was this translation helpful? Give feedback.
-
|
how about to email to the supporter to resolve this issue? https://crates.io/support |
Beta Was this translation helpful? Give feedback.
-
|
If wxWidgets had no historical commits, how big would it be to maintain your own 3.3.1 version? |
Beta Was this translation helpful? Give feedback.
-
max upload size is: 10485760 (10MB) |
Beta Was this translation helpful? Give feedback.
-
|
Study how gtk4-rs is made? https://github.com/gtk-rs/gtk4-rs/ |
Beta Was this translation helpful? Give feedback.
-
|
If we have to download the wxWidgets source code, suggest use this code. // reqwest = { version = "0.12", features = ["blocking", "rustls-tls", "socks"] }
const WX_SRC_URL: &str =
"https://github.com/wxWidgets/wxWidgets/releases/download/v3.3.1/wxWidgets-3.3.1.zip";
fn main() {
// _main();
let dest_path = std::env::temp_dir().join("wxWidgets.zip");
if let Err(e) = download_file_with_git_proxy(WX_SRC_URL, dest_path) {
eprintln!("download failed: {e}");
}
}
use std::fs::File;
use std::path::Path;
use std::process::Command;
/// Try to read the proxy URL via `git config --get http.proxy`.
fn get_git_http_proxy() -> Option<String> {
let output = Command::new("git")
.args(["config", "--get", "http.proxy"])
.output()
.ok()?;
if !output.status.success() {
return None;
}
let stdout = String::from_utf8_lossy(&output.stdout).trim().to_string();
if stdout.is_empty() {
None
} else {
Some(stdout)
}
}
/// Download a ZIP file from `url` to `dest_path`, using ~/.gitconfig [http].proxy if present.
/// Falls back to direct connection if no proxy is configured.
pub fn download_file_with_git_proxy(url: &str, dest_path: impl AsRef<Path>) -> std::io::Result<()> {
use std::io::Error;
// Build reqwest blocking client, optionally with proxy.
let client = match get_git_http_proxy() {
Some(proxy_url) => {
// Try with proxy first
match reqwest::blocking::Client::builder()
.proxy(reqwest::Proxy::all(&proxy_url).map_err(|e| Error::other(e))?)
.build()
{
Ok(c) => c,
Err(e) => return Err(Error::other(e)),
}
}
None => {
// No proxy; direct
reqwest::blocking::Client::new()
}
};
// Perform GET request
let resp = client.get(url).send().map_err(|e| Error::other(e))?;
if !resp.status().is_success() {
return Err(Error::other(format!("HTTP error: {}", resp.status())));
}
// Stream to file to avoid loading the entire ZIP into memory.
let path = dest_path.as_ref();
if let Some(parent) = path.parent() {
if !parent.as_os_str().is_empty() {
std::fs::create_dir_all(parent)?;
}
}
let mut file = File::create(path)?;
let mut resp = resp; // make mutable to read
resp.copy_to(&mut file).map_err(|e| Error::other(e))?;
Ok(())
} |
Beta Was this translation helpful? Give feedback.
-
|
crates.io didn't respond yet, but I figure most likely we should change to build time download the source. |
Beta Was this translation helpful? Give feedback.
-
|
Okay. I will submit a PR for it.
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
I'm trying to exclude unnecessary files inside wxwidgets to decrease the final package size now. |
Beta Was this translation helpful? Give feedback.
-
|
After exclude all test data, docs, examples, I've managed to decrease the .crate file from 35MB to 20MB, I already reply that info to crates.io team, and request to increase the size limit of wxdragon-sys to 25MB, hope that will work. |
Beta Was this translation helpful? Give feedback.
-
|
But now I think it is a good idea to directly download the wxWidgets zip source package, without the trouble and mental burden of git submodule management. |
Beta Was this translation helpful? Give feedback.
-
|
Plus, the source code zip archive is only 40MB, while the git submodules are 400MB+. |
Beta Was this translation helpful? Give feedback.
-
|
Agree, thinking about the nature of cargo, naturally need network to pull any other crate, so let's go for download at build time solution. |
Beta Was this translation helpful? Give feedback.
-
|
Now we mainly solve the problem of cross compilation |
Beta Was this translation helpful? Give feedback.
-
|
I think that if the previous code will result in the Anyway, we will update and upload the code of subsequent new versions of wxWidgets. commit 8aa1882454d4713c501b6acc8061cee8d937f111
Author: Allen <allengnr@gmail.com>
Date: Wed Oct 15 19:58:28 2025 +0800
Change wxwidgets download target to dest_bin_dir to avoid it be included into package
diff --git a/rust/wxdragon-sys/build.rs b/rust/wxdragon-sys/build.rs
index 2634302..c698f98 100644
--- a/rust/wxdragon-sys/build.rs
+++ b/rust/wxdragon-sys/build.rs
@@ -19,9 +19,8 @@ fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
.ancestors()
.find(|p| p.file_name().map(|n| *n == *profile).unwrap_or(false))
.expect("Could not find destination binary directory");
- let wxwidgets_dir = std::env::current_dir()
- .expect("Failed to get current directory")
- .join("wxWidgets");
+ // Download wxWidgets to target directory to avoid including it in published crate
+ let wxwidgets_dir = dest_bin_dir.join("wxWidgets");
let wxwidgets_dir_str = wxwidgets_dir.display().to_string(); |
Beta Was this translation helpful? Give feedback.
-
|
How about importing the For example, it can help us check the reference count of the |
Beta Was this translation helpful? Give feedback.
-
|
This code will change the window width. it's unexpected. wxDragon/examples/rust/gallery/src/tabs/basic_tab.rs Lines 789 to 797 in 25132da And when we expended the control, then collapse it, the height of the window not change anymore, I think it's another bug. |
Beta Was this translation helpful? Give feedback.
-
|
Another bug.
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Review this commit, what's your opinion? |
Beta Was this translation helpful? Give feedback.
-
|
Now wxDragon has finally evolved into a productivity tool, fully capable of developing native-looking programs. See the |
Beta Was this translation helpful? Give feedback.
-
|
Doc tests are passed. But I don’t know why publish it failed.
|
Beta Was this translation helpful? Give feedback.
-
|
There no wxdragon doc in docs.rs site
|
Beta Was this translation helpful? Give feedback.
-
|
I don't know what happened to you, but you seem to have completely lost interest in wxDragon. Your highest principle seems to be simply generating code with AI support that runs without crashing. You're too lazy to bother with the various glitches in the code and examples. Is it because you're too busy with other work to dedicate time to this project? |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
I plan to bump to version to 0.9.0, do you have anything need to add to this release? @ssrlive
Beta Was this translation helpful? Give feedback.
All reactions