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

Sort out no_std support #86

Open
nicoburns opened this issue Jul 21, 2024 · 2 comments
Open

Sort out no_std support #86

nicoburns opened this issue Jul 21, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@nicoburns
Copy link
Contributor

Currently parley has a std feature which can be disabled, and we are paying the maintenance cost of maintaining that, but it can't actually do anything useful when that feature is disabled. I would suggest that:

  • Nothing in this repo ought to be support in "no alloc" configurations
  • Fontique ought to work as "font database" and support querying, manual loading of fonts, etc without std. Backends should require std as needed (probably all of them?).
  • Parley ought to to fully function in "alloc but no std" mode. It ought to have no conditional code to enable this (except perhaps some conditional imports from the alloc crate). Parley will still transitively require std in some cases through it's dependencies.
@waywardmonkeys
Copy link
Contributor

See problem exposed in PR #124.

@xorgy xorgy added the enhancement New feature or request label Oct 10, 2024
@xStrom
Copy link
Member

xStrom commented Nov 5, 2024

I think a good first step is to get things actually compiling with no_std. That will allow us to at least not regress thanks to CI checks. Adding actually useful functionality can be a step after that.

With that goal, I managed to get fontique compiling in #158.

Now parley is more tricky, because swash does not yet support no_std. I started to add that support, but then found that @waywardmonkeys is already ahead of me with swash#63. Once that lands we can move forward with doing the same for parley.

github-merge-queue bot pushed a commit that referenced this issue Nov 5, 2024
The following command now passes:
```
cargo check -p fontique --locked --no-default-features --features libm --target x86_64-unknown-none
```

The key was removing the use of `not(any(target_vendor="apple",
target_family="windows"))` to include `std` using dependencies, which
triggers with `x86_64-unknown-none`.

I also synced the dependency conditionals with what the code expects.

This is progress towards #86.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants