You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all: I am not entirely sure if this is an issue with Tauri, autoccx, or just me using something incorrectly. However as tauri dev seems to fail silently for no apparent reason, this seemed like the logical place to ask first. Apologies for what is probably a very specific case, but I have not been able to find something more generic. Let me explain the context:
I am interfacing with openvr through autocxx. This works fine standalone. When I combine this into a Tauri project, I can tauri build and I can cd src-tauri and cargo run from there just fine too. The application works fine as I would expect.
However, when I use tauri dev, it exits without any error messages right after it's done compiling the Rust code:
This only happens when referencing some of the function bindings generated by autocxx. It does not matter whether the function is actually called, not even if it's referenced in a code path that actually runs. If the code exists, tauri dev seems to exit silently after compiling.
Reproduction
I've set up a clean Tauri project, with a single function binding using autocxx, which triggers this issue:
Clone the example: git clone --recursive https://github.com/Raphiiko/tauri-autocxx-reproduction (Don't forget --recursive, as it references openvr as a git submodule).
Change directory into the example: cd tauri-autocxx-reproduction
Install npm dependencies: npm install
Run tauri dev, and notice how it exits silently after it's done building.
At this point, you can also run cd src-tauri followed by cargo run, to see how it does function when not using tauri dev.
Once you comment out line 22 in src-tauri/src/main.rs, you will see that tauri dev starts working correctly again:
// Note that this command or function is never called. It is only here to demonstrate the issue.#[tauri::command]asyncfnunsafe_function(){unsafe{
ffi::vr::VR_Shutdown();//L22: When you comment this out, `tauri dev` works fine}}
Expected behavior
I would expect tauri dev to function normally, like cargo run, or to at least produce an error to give me context on why it's failing.
It indeed looks very similar! Adding one of the dlls to src/tauri and referencing it as a resource in tauri.conf.json seems to fix tauri dev exiting abruptly.
I think with this I've got enough to be able to go from here.
Thanks a lot for the info @FabianLars :)
Describe the bug
First of all: I am not entirely sure if this is an issue with Tauri,
autoccx
, or just me using something incorrectly. However astauri dev
seems to fail silently for no apparent reason, this seemed like the logical place to ask first. Apologies for what is probably a very specific case, but I have not been able to find something more generic. Let me explain the context:I am interfacing with openvr through autocxx. This works fine standalone. When I combine this into a Tauri project, I can
tauri build
and I cancd src-tauri
andcargo run
from there just fine too. The application works fine as I would expect.However, when I use
tauri dev
, it exits without any error messages right after it's done compiling the Rust code:This only happens when referencing some of the function bindings generated by autocxx. It does not matter whether the function is actually called, not even if it's referenced in a code path that actually runs. If the code exists,
tauri dev
seems to exit silently after compiling.Reproduction
I've set up a clean Tauri project, with a single function binding using autocxx, which triggers this issue:
Here is how it can be reproduced (on Windows):
Make sure you have LLVM installed and
LIBCLANG_PATH
set, as this is required for autocxx.Clone the example:
git clone --recursive https://github.com/Raphiiko/tauri-autocxx-reproduction
(Don't forget--recursive
, as it references openvr as a git submodule).Change directory into the example:
cd tauri-autocxx-reproduction
Install npm dependencies:
npm install
Run
tauri dev
, and notice how it exits silently after it's done building.At this point, you can also run
cd src-tauri
followed bycargo run
, to see how it does function when not usingtauri dev
.Once you comment out line 22 in
src-tauri/src/main.rs
, you will see thattauri dev
starts working correctly again:Expected behavior
I would expect
tauri dev
to function normally, likecargo run
, or to at least produce an error to give me context on why it's failing.Platform and versions
Stack trace
Additional context
Running
tauri dev -v
for verbose logging seems to give no additional info regarding what happens.The text was updated successfully, but these errors were encountered: