final 0.7 fixes: xcode 15/16 hybrid, auto openssldir for android, include_*! tracking hotpatch, fix /assets/ brick at high opt levels, windows linker file, etc (#4376)

* wip: openssl autodetection

* add voltaile read inside of asset fn

* support xcode 15 for --device

* vendor openssl on android

* Smaller width TUI

* switch to anyhow for the entire CLI

* add backtrace and print double printing of cargo_metadata errors

* add some padding to multi-line anyhow error

* check semvers

* don't open if not interactive

* set the tailwind current_dir so it doesn't twitch

* get the oboe demo working

* copy the c++ library on android

* cleanup env vars

* add depinfo watcher

* fix stale hotpatches and crate count

* add musl support

* remove outdated autofmt test

* update scanner app

* add hotdog app and bundle to ci

* upload dx on every branch

* collapse mobile into desktop

* `dx doctor` command

* windows command files

* no pipe on doctor

* fix ci?

* fix links

* fix ci

* use main instead of nightly

* bump node

* build cli for host

* cargo doc

* prep dog_app for bundle

* package hotdog

* no bundle or nightly cli

* comment out nightly cli

* add quotes to linker files
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-07-14 12:54:15 -07:00
1 parent 97947b169b
commit 727752a965
78 files changed
+2270 -817

No files matched your search

+17 -19
View File
@@ -4,7 +4,7 @@ use flate2::read::GzDecoder;
use std::path::{Path, PathBuf};
use tar::Archive;
use tempfile::TempDir;
use tokio::{fs, process::Command};
use tokio::process::Command;
pub(crate) struct WasmBindgen {
version: String,
@@ -100,7 +100,7 @@ impl WasmBindgen {
/// Run the bindgen command with the current settings
pub(crate) async fn run(&self) -> Result<std::process::Output> {
let binary = self.get_binary_path().await?;
let binary = self.get_binary_path()?;
let mut args = Vec::new();
@@ -253,7 +253,7 @@ impl WasmBindgen {
})?;
// Get the final binary location.
let binary_path = self.get_binary_path().await?;
let binary_path = self.get_binary_path()?;
// Download then extract wasm-bindgen-cli.
let bytes = reqwest::get(url).await?.bytes().await?;
@@ -300,11 +300,10 @@ impl WasmBindgen {
.output()
.await?;
fs::copy(
std::fs::copy(
tempdir.path().join(self.downloaded_bin_name()),
self.get_binary_path().await?,
)
.await?;
self.get_binary_path()?,
)?;
Ok(())
}
@@ -336,11 +335,10 @@ impl WasmBindgen {
tracing::info!("Copying into path: {}", tempdir.path().display());
// copy the wasm-bindgen out of the tempdir to the final location
fs::copy(
std::fs::copy(
tempdir.path().join("bin").join(self.downloaded_bin_name()),
self.get_binary_path().await?,
self.get_binary_path()?,
)
.await
.context("failed to copy wasm-bindgen binary")?;
Ok(())
@@ -352,7 +350,7 @@ impl WasmBindgen {
self.version
);
let binary = self.get_binary_path().await?;
let binary = self.get_binary_path()?;
let output = Command::new(binary)
.args(["--version"])
.output()
@@ -381,7 +379,7 @@ impl WasmBindgen {
);
let binary_name = self.installed_bin_name();
let path = self.install_dir().await?.join(binary_name);
let path = self.install_dir()?.join(binary_name);
if !path.exists() {
self.install().await?;
@@ -390,20 +388,20 @@ impl WasmBindgen {
Ok(())
}
async fn get_binary_path(&self) -> anyhow::Result<PathBuf> {
pub fn get_binary_path(&self) -> anyhow::Result<PathBuf> {
if CliSettings::prefer_no_downloads() {
which::which("wasm-bindgen")
.map_err(|_| anyhow!("Missing wasm-bindgen-cli@{}", self.version))
} else {
let installed_name = self.installed_bin_name();
let install_dir = self.install_dir().await?;
let install_dir = self.install_dir()?;
Ok(install_dir.join(installed_name))
}
}
async fn install_dir(&self) -> anyhow::Result<PathBuf> {
fn install_dir(&self) -> anyhow::Result<PathBuf> {
let bindgen_dir = Workspace::dioxus_home_dir().join("wasm-bindgen/");
fs::create_dir_all(&bindgen_dir).await?;
std::fs::create_dir_all(&bindgen_dir)?;
Ok(bindgen_dir)
}
@@ -501,7 +499,7 @@ mod test {
/// Helper to test that the installed binary actually exists.
async fn verify_installation(binary: &WasmBindgen) {
let path = binary.install_dir().await.unwrap();
let path = binary.install_dir().unwrap();
let name = binary.installed_bin_name();
let binary_path = path.join(name);
assert!(
@@ -513,9 +511,9 @@ mod test {
/// Delete the installed binary. The temp folder should be automatically deleted.
async fn reset_test() {
let binary = WasmBindgen::new(VERSION);
let path = binary.install_dir().await.unwrap();
let path = binary.install_dir().unwrap();
let name = binary.installed_bin_name();
let binary_path = path.join(name);
let _ = tokio::fs::remove_file(binary_path).await;
let _ = std::fs::remove_file(binary_path);
}
}