Skip to content

[WIP] Split out minifb, viewer, and possibly other things into features#137

Merged
jamjamjon merged 1 commit into
jamjamjon:mainfrom
glasgow-haskell-omelette:split
Sep 24, 2025
Merged

[WIP] Split out minifb, viewer, and possibly other things into features#137
jamjamjon merged 1 commit into
jamjamjon:mainfrom
glasgow-haskell-omelette:split

Conversation

@glasgow-haskell-omelette

@glasgow-haskell-omelette glasgow-haskell-omelette commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

what: splitting out things into on-by-default features
why: to not include unnecessary components in the supply chain and not increase binary size and compilation time for no reason

draft since the ureq split isn't exactly perfect yet

@jamjamjon jamjamjon added the enhancement New feature or request label Sep 23, 2025
@jamjamjon

Copy link
Copy Markdown
Owner

@glasgow-haskell-omelette Thanks for the PR and the work on splitting out things into on-by-default features.
I agree that this is a valuable step: it helps reduce unnecessary dependencies and
makes the project more organized.

That said, I think this still needs further refinement. For example:

  • Whether hub should be a feature is worth discussing. Currently hub is used
    for downloading models and images from GitHub release pages. If we want to support
    HuggingFace models in the future, we will need to add hf-hub support as a separate feature.
  • There are still many unnecessary dependencies and legacy code in the project.
    For instance, the current Tensor type is ndarray::Array<f32, IxDyn>. In many
    scenarios it requires precision conversion (e.g., f16 → f32). For small data
    this is fine, but for a 6D KV cache it can be expensive. I plan to introduce a
    new Tensor implementation from my other project slsl soon.
  • The overall project architecture is a bit messy and needs further planning and design.

In any case, refining the features is an important step, and I will take this task
as part of the next round of optimizations. Thanks again for putting this together!

@glasgow-haskell-omelette

Copy link
Copy Markdown
Contributor Author
  • Whether hub should be a feature is worth discussing. Currently hub is used
    for downloading models and images from GitHub release pages. If we want to support
    HuggingFace models in the future, we will need to add hf-hub support as a separate feature.

Depends. Really the main issue this one had with it is that it pulled in ureq and OpenSSL. Just adding support for different backends would be very little code and have very little impact on compile times. So perhaps there should be a "network" feature?

This PR in its current form is more or less just some small changes this one made in order to reduce its compilation times. It might iterate on it more later (although it ended up switching from ONNX to MNN, and so isn't actively using usls)

@jamjamjon jamjamjon marked this pull request as ready for review September 24, 2025 01:56
@jamjamjon

Copy link
Copy Markdown
Owner

@glasgow-haskell-omelette I’ve added the viewer feature, but hub is still not an optional feature. The feature configuration will be further refined in future updates. Thanks for your suggestion! I’ll close this PR for now, but if new requirements come up, please feel free to open another PR or issue at any time. Thanks again for your contribution!

@jamjamjon jamjamjon merged commit ff52de7 into jamjamjon:main Sep 24, 2025
9 checks passed
@glasgow-haskell-omelette

Copy link
Copy Markdown
Contributor Author

oki! will do if something comes up

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

Successfully merging this pull request may close these issues.

2 participants