Comments (7)
Hmm, odd. That does seem like it should work, it it's not clear to me what's causing the error. (Clearly, cargo-bundle's error reporting could use some work; I'll look into that.)
Does your project happen to be available somewhere publicly where I could try bundling it to try to diagnose?
from cargo-bundle.
Alternatively, I believe that if you run cargo-bundle with the environment variable RUST_BACKTRACE=1 set, you should get a backtrace with the error; if you could post that backtrace here, that would be great.
from cargo-bundle.
Here's the backtrace (not so useful I think):
Error: the source path is not an existing regular file
stack backtrace:
0: 0x10c059e6e - backtrace::backtrace::trace::hc8f67935cd0b5b66
1: 0x10c059eac - backtrace::capture::Backtrace::new::h18c3b3b79d22977f
2: 0x10c0594b6 - error_chain::make_backtrace::hdcc4f1aacd973613
3: 0x10c059598 - _$LT$error_chain..State$u20$as$u20$core..default..Default$GT$::default::hda5dc645b6627964
4: 0x10bfce18b - cargo_bundle::bundle::osx_bundle::bundle_project::h0122419e7e2c7dac
5: 0x10bfd9454 - cargo_bundle::main::he1838a35c736bdb0
6: 0x10c1501bc - __rust_maybe_catch_panic
7: 0x10c143c68 - std::rt::lang_start::h7919b8561d5d8bb1
I'll try to reproduce with a simpler case than my project, and if I can't then I'll get back to you to reproduce it using mine.
from cargo-bundle.
In fact, I decided to just push by (broken) project, so you can clone and attempt to bundle it:
https://github.com/andrewdavidmackenzie/flow/
I just realized that the folder/sub-project I am trying to bundle is part of a cargo workspace (see Cargo.toml file in root directory) and maybe that is the source of the problem, as the binary (flowc) is compiled into the target folder under the root (flow) folder - and probably not found by cargo-bundler... I noticed in the code that the binary path is built from the folder plus the name of the package in Cargo.toml.
If that is confirmed, then maybe I can help you make it "workspace aware"...
To reproduce:
- cd flowc
- cargo bundle
After downloading and compiling everything, that should give you this output:
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Bundling flowc.app
Error: the source path is not an existing regular file
leave you with this content:
tree target/
target/
`-- debug
`-- flowc.app
`-- Contents
|-- Info.plist
|-- MacOS <--- No binary in here
`-- Resources
|-- flowc.icns
`-- lib
`-- test.toml
from cargo-bundle.
Ah, okay, that's the problem then; cargo-bundle
currently has no understanding of workspaces.
The place to address that would be in src/bundle/settings.rs
. When we parse the project's Cargo.toml
, we need to also check for workspaces to determine the correct value for target_dir
.
from cargo-bundle.
from cargo-bundle.
BTW: Just to confirm, that via a quick code-hack to make cargo-bundle use the path of the parent Cargo.toml in the workspace I was able to make it package the app OK. Hence, working on #42
from cargo-bundle.
Related Issues (20)
- Add release binaries to github releases for easy use with github actions HOT 1
- Adding libvulkan.dylib to ios bundle
- Crashing while install iOS app to Simulator
- How can I use cross and cargo bundle together? HOT 1
- `cargo-bundle` doesn't find correct package in workspace
- `cargo-bundle` should use `bin` target name instead of package name
- Does not respect ~/.cargo/config.toml target-dir setting
- Changing executable and bundle names based on --example argument
- Support Virtual Workspaces (Bundling Multiple Binaries in One Installer)
- short_description is not optionnal HOT 1
- System category from xdg not working
- Icon not showing on Ubuntu 23.10 HOT 1
- Mac M1 termainal can run, but .app crash immediately HOT 3
- About getter pattern HOT 1
- path resolver is broken on nesting rust project HOT 3
- Menu Item name is not shown on macOS
- Linker error `ld: framework not found Security` HOT 1
- Implement Document Handling for macOS
- Support for iOS production bundles HOT 1
- macOS Bundle Icon color messed up HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-bundle.