Describe the bug
Projects created with npm x create-tauri-app do not set a package.description in the the top-level Cargo.toml. This causes the Cargo.toml to fail being imported in cargo_tauri::interface::rust::get_workspace_dir in the call to CargoSettings::load(&dir);. This eventually leads to tauri build failing.
Additionally, the feedback to the developer as to why the build failure is happening is not particularly helpful. In my case, the failure to identify the workspace causes the rename of the built app from app to the final target name to fail due to incorrect path. The parse failure adds a context describing why parsing failed, which is silently consumed by rs.cli. This parse detail might be useful for the developer.
To Reproduce
Steps to reproduce the behavior:
1.
$ npm x create-tauri-app
We hope to help you create something special with Tauri!
You will have a choice of one of the UI frameworks supported by the greater web tech community.
This should get you started. See our docs at https://tauri.studio/
If you haven't already, please take a moment to setup your system.
You may find the requirements here: https://tauri.studio/en/docs/getting-started/setup-macos/
Press any key to continue...
? What is your app name? test-tauri-app
? What should the window title be? Test Tauri App
? What UI recipe would you like to add? Dominator (https://crates.io/crates/dominator/)
? Add "@tauri-apps/api" npm package? Yes
cd test-tauri-app/
yarn add -D wasm-pack
yarn tauri build
- Note error:
Error: failed to rename `/Users/edgex004/Code/test-tauri-app/src-tauri/target/release/app` to `/Users/edgex004/Code/test-tauri-app/src-tauri/target/release/test-tauri-app`
- Add a package.description to
test-tauri-app/Cargo.toml :
[package]
name = "test-tauri-app"
version = "1.0.0"
categories = ["wasm"]
edition = "2018"
description = ""
yarn tauri build
- Build succeeds.
Expected behavior
Build succeeds without modifying test-tauri-app/Cargo.toml .
Screenshots
Platform and Versions (required):
yarn run v1.22.11
warning package.json: No license field
$ tauri info
app:spawn Running "/Users/edgex004/Code/test-tauri-app/node_modules/@tauri-apps/cli/bin/tauri-cli tauri info" +0ms
Operating System - Mac OS, version 11.2.3 X64
Node.js environment
Node.js - 16.7.0
@tauri-apps/cli - 1.0.0-beta.7
@tauri-apps/api - 1.0.0-beta.6
Global packages
npm - 7.20.3
yarn - 1.22.11
Rust environment
rustc - 1.56.0-nightly
cargo - 1.56.0-nightly
App directory structure
/dist
/target
/node_modules
/src-tauri
/src
App
tauri.rs - 1.0.0-beta.6 (no lockfile)
build-type - bundle
CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
distDir - ../dist
devPath - http://localhost:10001/
bundler - Rollup
✨ Done in 6.52s.
Additional context
Stack Trace
Describe the bug
Projects created with
npm x create-tauri-appdo not set a package.description in the the top-levelCargo.toml. This causes theCargo.tomlto fail being imported incargo_tauri::interface::rust::get_workspace_dirin the call toCargoSettings::load(&dir);. This eventually leads totauri buildfailing.Additionally, the feedback to the developer as to why the build failure is happening is not particularly helpful. In my case, the failure to identify the workspace causes the rename of the built app from
appto the final target name to fail due to incorrect path. The parse failure adds a context describing why parsing failed, which is silently consumed by rs.cli. This parse detail might be useful for the developer.To Reproduce
Steps to reproduce the behavior:
1.
cd test-tauri-app/yarn add -D wasm-packyarn tauri buildtest-tauri-app/Cargo.toml:yarn tauri buildExpected behavior
Build succeeds without modifying
test-tauri-app/Cargo.toml.Screenshots
Platform and Versions (required):
Additional context
Stack Trace