Closed niek-peters closed 1 year ago
The examples aren't really supposed to be used outside of the repo, they're just demonstrations that are tied to the main branch. They're more intended to be used as inspiration rather than being separated. With that said, I'll try to address some of the errors you mentioned:
I needed to run pnmp install in the root directory
Good point, I need to mention that
The first error happens on line 44, where the collect_types! macro from tauri_specta is used
You probably need to enable the specta
feature in prisma-client-rust-cli
The second one happens on line 47, where the _db_push() function on the PrismaClient is called
Same as previous but for the migrations
feature
The prisma-cli
folder of this repo is used for running cargo prisma generate
for the examples
and stuff. It automatically enables the migrations
feature, and conditionally allows enabling specta
, which is done in src-tauri/.cargo/config.toml
with --features specta
.
When I tried running the Tauri example in this repo's
/examples/tauri
directory, I get two compilation errors. Both errors happen in thesrc-tauri/src/main.rs
file.Installation process
I cloned the repository and moved the
/examples/tauri
directory to its own folder. I then followed the steps in this projectsREADME.md
file. Those steps alone were not enough to run the project. Before being able to run it, I had to change theprisma-client-rust dependency
in theCargo.toml
file to match what is shown in the prisma-client-rust documentation:I also changed the contents of the
src-tauri/.cargo/config.toml
file to match what was shown in the documentation and created the CLI Binary as described:And I needed to run
pnmp install
in the root directory.These steps would be nice to include in the
README.md
file for this project.I added all these files with the changes I made to this GitHub repo so you can check them out: repo link
The errors
The first error happens on line 44, where the
collect_types!
macro from tauri_specta is used. This line results in the following error:The second one happens on line 47, where the
_db_push()
function on the PrismaClient is called:After commenting out both lines, the compilation step completed succesfully, but now I'm missing the tauri_specta functionality, which is a feature I would really like to have.