Important
This project is still a work in progress.
Pick any upcoming web feature. Get notified as soon as it hits a certain browser support threshold.
Support data is pulled from caniuse.com (hence the name), specifically the GitHub repo containing the raw data.
This server runs on a Raspberry Pi 5 running Debian 12. It doesn't really make sense for it to be built anywhere else, but for those curious, here you go.
Requirements:
- Go >=1.24
- Datastar v1.0.0 - the minified datastar.js file (13KB) must be downloaded to the root directory.
- simdjson must be compiled into a static library and put in a standard place for libs; e.g.,
/usr/lib/libsimdjson.a.
go get
go build
./whencaniuse- The website portion is fully server-side-rendered via a Go web server which sends page updates via Datastar. Other than the aforementioned minified
datastar.js, this site contains no Javascript. - Compatibility data (
fulldata-json/data-2.0.jsonfrom github.com/Fyrd/caniuse (~4.5 MB),data.jsonfrom github.com/mdn/browser-compat-data (~18.7MB), anddata.jsonfrom theweb-featuresnpm package) is downloaded via a cronjob once a day to the server at midnight MDT. A C++ program then parses all three data sources using simdjson and generates one big, minimal binary data file containing all the data whencaniuse needs. That cronjob then sends a signal (SIGUSR1) to the whencaniuse server telling it to update its data buffer with the new data. - Any time the aforementioned combined binary data file is needed, it is searched in C++. The Go code communicates with the C++ code via cgo
- Current plan is to use Amazon SES for sending the emails
- I've struggled choosing between a Go server and a Rust one. I didn't want to just write the whole web server in C++ because there is no built-in first-party TCP network utils; there is with Go and Rust. Go has HTML templating built into the standard library, so that's a plus, though it may not even be needed for a site this simple. Go is pretty performant, being a compiled language, but is garbage collected, and cannot match the performance of Rust. However, the difference is negligable compared to network speed, which is the real bottleneck when it comes to how fast the web page feels. Nonetheless, I'm considering switching to Rust because there's no overhead/added code when calling into C, unlike with Go. In addition, there's still quite a bit more logic I need to write (in both languages) before the site is done; I'm wondering if the performance difference will be noticable by the end. I am also considering Zig since it too has TCP/IP utils in the standard library, is very fast, and C interop is incredibly natural. It's just less mature than the other options, and I saw something about the official Datastar Zig SDK being deprecated.