Is it supported to make rust crate at root and npm project at child directory? #8890
-
I'm going to develop an gui app with tauri and I already have some cli version in rust so I want to make directory structure like the following:
However, in the tauri documentation, there is no documentation for such a use case. Of course, I can make like following and add the rust project to the repository root but I don't like this structure.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Yes it is, though it may requires to use
|
Beta Was this translation helpful? Give feedback.
-
I much prefer this directory structure too. However, after I install the tauri cli and move the files accordingly, So, if my project structure is as follows:
When I run Here is a part of my
Do you see what I am doing wrong? |
Beta Was this translation helpful? Give feedback.
Yes it is, though it may requires to use
cargo tauri
(viacargo install tauri-cli
) instead of the npm based cli, unless you're okay with also having a package.json file at the repo root.cargo tauri
will actively search for the tauri config file in the current working dir (including subfolders) so the exact repo structure doesn't really matter as long as you configure beforeDev|BuildCommand and devPath/distDir accordingly.