Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qix-/cassowary-playground
A playground for Cassowary constraints
https://github.com/qix-/cassowary-playground
cassowary cassowary-algorithm cassowary-constraints constraints demo dsl peg pegjs playground
Last synced: 23 days ago
JSON representation
A playground for Cassowary constraints
- Host: GitHub
- URL: https://github.com/qix-/cassowary-playground
- Owner: Qix-
- Created: 2023-02-05T19:07:41.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-05T20:27:21.000Z (almost 2 years ago)
- Last Synced: 2024-10-05T13:41:20.291Z (about 1 month ago)
- Topics: cassowary, cassowary-algorithm, cassowary-constraints, constraints, demo, dsl, peg, pegjs, playground
- Language: Rust
- Homepage: https://junon.me/cassowary-playground/
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Cassowary Playground
A small playground for checking out Cassowary constraints.
Please see the demo site for instructions: https://junon.me/cassowary-playground
## Disclaimer
Please do not judge me for the code written here. It was done in ~3 hours or so.
It was purposefully hacked together to get it work as quickly as possible, and
there is a lot of _cursed nonsense_ across all of the languages used (Rust,
Javascript and PEG.js).The error handling on this is also abysmal. I didn't optimize for a great DX,
as I wanted to play with some ideas as fast as possible (this is a tool I'm
using to research automated circuit design tooling I'm interested in creating).So, if you're a recruiter or otherwise looking at my profile for reasons to judge,
feel free, but please know this code was a wreck from the first minute I started
on it and I do not have any interest in improving it. Sorry about that!The interface between the WASM binary and Javascript is embarassingly crude as I
didn't want to get WASI involved (I don't particularly approve of WASI's design
decisions so tend to avoid it) and didn't want the hastle of another build tool
(wasm-pack) so I just went without any string or complex type support in the FFI
end of things. Worked out okay, just needed to use a stack-based stateful protocol.
I should probably mention that you should avoid stateful stack-based protocols
when you can.Also, please ignore the globals in Rust. I'm... aware. I know.
**tl;dr** please don't take any code here as "good" or "I should copy this" material.
It's all really bad.## Building
You'll need `npm`, `node` and `cargo` with a suitably recent toolchain and the `wasm32-unknown-unknown`
target installed.Then run `make` and serve the `/www/` directory that is generated.
## License
Aside from the dependencies' respective licenses, all code under this repository
is released as either Public Domain, CC0, WTFPL, or MIT license - whatever
floats your boat. If you want a Copyright, you can use `Copyright (c) 2023, Josh Junon`.
I will not be enforcing it, though. Go nuts.