Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edition-3 Post 2 (booting): profiles for the non root package will be ignored #1314

Closed
a-usr opened this issue Apr 22, 2024 · 2 comments
Closed

Comments

@a-usr
Copy link

a-usr commented Apr 22, 2024

In the post about booting it is suggested create a new workspace member for the kernel by moving the src forder and the cargo.toml to a new "kernel" folder, before adding said folder into a new cargo.toml's workspace field. However cargo will Ignore the the profiles inside kernel/cargo.toml, as suggested by this warning from cargo check:

warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   [Path]\kernel\Cargo.toml
workspace: [Path]\Cargo.toml
@ajh123
Copy link

ajh123 commented Aug 7, 2024

Doesn't the post 1 of edition 3 tell you to remove those profiles?

It says:

We still get the error about a missing start language item because the custom target only removed the dependency on the C library.
To remove the dependency on the Rust runtime as well, we can use the #[no_main] attribute.

Before that, we can do a small cleanup.
The x86_64-unknown-none target defaults to panic = "abort", so the we can remove the profile.dev and profile.release tables from our Cargo.toml again.

Those profiles are not needed since the post eventually tells you to use the x86_64-unknown-none target.

This means you did not follow all the steps in the post so you now have a kernel/cargo.toml which doesn't match what the post says.

@a-usr
Copy link
Author

a-usr commented Aug 7, 2024

I swear I read all the posts multiple times and I still missed this. Thanks anyways, closing this for obvious reasons.

@a-usr a-usr closed this as completed Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants