Can someone explain what I am doing wrong?

This is my code. But magically the VSCodium shows me some errors:

And the cargo build shows the follows:

error[E0433]: failed to resolve: could not find `option` in `core`
  --> src\main.rs:11:14
   |
11 |         .run(tauri::generate_context!())
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `option` in `core`
   |
   = note: this error originates in the macro `tauri::generate_context` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `option` in `core`
  --> src\main.rs:11:14
   |
11 |         .run(tauri::generate_context!())
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `core::option`
   |
   = note: this error originates in the macro `tauri::generate_context` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing one of these items
   |
6  | use serde::__private::Option;
   |
6  | use std::option::Option;
   |
help: if you import `Option`, refer to it directly
   |
11 -         .run(tauri::generate_context!())
11 +         .run(tauri::generate_context!())
   |

warning: unused import: `core::helpers::math_helper`

Can someone explain what is wrong with my code?

When you ask for help, you should run cargo build and post the output using a code block. You can read how to make a code block here.

Anyway, the issue is that you've called your own crate core. The standard library already provides a crate by that name, so you get name collisions if you use it.

Wow, Thanks Alice. I love you. :heart_eyes: :heart_eyes: :heart_eyes:

I still don't understand. It is still erroring.

Cargo build:

error: no matching package found
searched package name: `core`
perhaps you meant:      my_core
location searched: C:\Code\my_app\core
required by package `domain v0.1.0 (C:\Code\my_app\domain)`
    ... which satisfies path dependency `domain` (locked to 0.1.0) of package `app v0.1.0 (C:\Code\my_app\app\src-tauri)`

What's in your domain/Cargo.toml file?

[package]
name = "domain"
version = "0.1.0"
edition = "2021"

[dependencies]
core = { path = "../core" }
data = { path = "../data" }
models = { path = "../models" }

Here you go:

my_core = { path = "../core" }

You are the most beautiful Alice on the earth and in the entire galaxy. :sparkling_heart:

You might also want to rename the folder.

I got it. Thanks. :kissing_heart:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.