Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Use kiwi.js instead of Cassowary? #184

Open
JobLeonard opened this issue Apr 11, 2018 · 4 comments
Open

Use kiwi.js instead of Cassowary? #184

JobLeonard opened this issue Apr 11, 2018 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@JobLeonard
Copy link

JobLeonard commented Apr 11, 2018

Cassowary.js hasn't been updated in years.

When someone commented on that in the github repo, the maintainers themselves suggested kiwi.js for an alternative faster implementation:

https://www.npmjs.com/package/kiwi.js

Not that I think that Cassowary is currently a bottleneck, but if the API is identical and it doesn't introduce new bugs, then why not get the free performance boost? And at least there is a chance any bugs encountered will be fixed.

@mbebenita
Copy link
Collaborator

@JobLeonard thanks for the tip, I hadn't come across this implementation.

@yurydelendik yurydelendik added the help wanted Extra attention is needed label Apr 17, 2018
@ollelauribostrom
Copy link
Contributor

Gave kiwi.js a try this weekend. For the most part, the API is the same but there are some differences which made me fail in swapping out this dependency.

I could not find any kiwi.js equivalence for:

  • solver.addStay(...)
  • Cassowary.Equation(..)
  • Cassowary.Inequality(..)

However, i'm not too familiar with the solving algorithm. Does @mbebenita know if there are any way around those differences?

@mreinstein
Copy link

mreinstein commented Apr 4, 2019

Does @mbebenita know if there are any way around those differences?

You could submit improvements to kiwi.js directly :) My impression is the maintainer is approachable, responsive, and reasonable from my limited interactions.

@mreinstein
Copy link

All 3 of the aforementioned bullets have equivalents in kiwi.js see IjzerenHein/kiwi.js#17 for details on these.

Also, shameless plug, if you're looking for something a little higher level where you can specify a set of equations as a string, I wrote/maintain constraint-solver npm module, which layers on top of the latest kiwi.js: https://github.com/mreinstein/constraint-solver

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants