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

Energy-monitor: android build and wasm simplicifation #4769

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

ogoffart
Copy link
Member

@ogoffart ogoffart commented Mar 6, 2024

This demo support both mcus, web, desktop and mobile.

Split in a lib.rs so that there are no warnings even if it means some dummy wrapper in main.

Add instructions in the README

@ogoffart ogoffart requested a review from FloVanGH March 6, 2024 13:15
name = "energy-monitor"

[lib]
crate-type = ["cdylib", "lib"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add a name but the default name for the library ("energy_monitor") is not the same as the binary name ("energy-monitor") and therefore it shouldn't conflict.

#![cfg_attr(all(feature = "mcu-board-support", not(feature = "simulator")), no_main)]

#[cfg(feature = "mcu-board-support")]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost all the code of this file was moved without change to lib.rs

This demo support both mcus, web, desktop and mobile.

Split in a lib.rs so that there are no warnings even if it means some
dummy wrapper in main.

Add instructions in the README
@ogoffart ogoffart merged commit 4a313f4 into master Mar 7, 2024
36 checks passed
@ogoffart ogoffart deleted the olivier/demos branch March 7, 2024 07:56
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

Successfully merging this pull request may close these issues.

2 participants