Skip to content

allow for no_std and embedded-io builds#25

Open
cpacejo wants to merge 1 commit intodoy:mainfrom
cpacejo:cpacejo/no_std
Open

allow for no_std and embedded-io builds#25
cpacejo wants to merge 1 commit intodoy:mainfrom
cpacejo:cpacejo/no_std

Conversation

@cpacejo
Copy link
Copy Markdown

@cpacejo cpacejo commented Feb 25, 2026

This is ultimately to allow tui-term to build on ESP32 (or other embedded environments).

For the most part, this is accomplished simply by replacing std references with core or alloc references as appropriate.

The only functionality which is only available in std is the Write trait, which I've gated behind an std default feature flag.

The only dependency which requires std is vte, which itself has an std default feature flag, which I've made conditional on the std flag in this crate.

I also added a flag and matching optional dependency on the embedded-io crate, which provides its own Write trait suitable for use in no_std embedded environments. (This is not necessary for no_std, but nice to have.)

Modified the write tests to use the appropriate trait (or not run). Here there is one infelicity: if both std and embedded-io features are requested, the tests only run for the std Write traits. I don't know a clean way to parameterize them (short of a pile of macros), and it's unlikely someone will enable both these features simultaneously.

Finally, bumped the version to 0.16.3.

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.

1 participant