Skip to content

Made lib no-std#50

Open
uandere wants to merge 8 commits intoloony-bean:masterfrom
uandere:no_std
Open

Made lib no-std#50
uandere wants to merge 8 commits intoloony-bean:masterfrom
uandere:no_std

Conversation

@uandere
Copy link
Contributor

@uandere uandere commented Sep 15, 2023

This pull request adds no_std functionality to the library. This allows for embedded development using textplots, although testing is needed to confirm this possibility.

This is done by introducing new drawille-nostd crate, which does not rely on standard library features. Now, when adding textplots to Cargo.toml dependencies with default-features = false, it will use drawille-nostd crate with reduced functionality (no color support):

# using no_std functionality
textplots = {version = "*", default-features = false}

By default, std feature is enabled, so you can also use all library's functionality like before, without any changes.

@loony-bean
Copy link
Owner

@Kezii @TDHolmes what do you guys think about this?

@TDHolmes
Copy link
Contributor

This was discussed on #14 , how are you handling drawile-rs & colored? Those are std reliant dependencies aren't they?

@uandere
Copy link
Contributor Author

uandere commented Oct 7, 2023

This was discussed on #14 , how are you handling drawile-rs & colored? Those are std reliant dependencies aren't they?

Hi, @TDHolmes! I separated std and no_std functionality by providing new drawille-nostd crate. Now when adding textplots to Cargo.toml with default features (std feature enabled, no changes required), we're using drawille and colored. Otherwise, when default-features = false is specified, we're swithing to the functionality of the drawille-nostd crate.

What do you think about that?

@TDHolmes
Copy link
Contributor

TDHolmes commented Oct 8, 2023 via email

@uandere
Copy link
Contributor Author

uandere commented Oct 10, 2023

Sweet! Sounds good

Thanks! Planning to test this out next week on stm32f4 =)

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.

3 participants