filiph/linkcheck

Release linkcheck as a standalone executable

Closed this issue ยท 11 comments

Something similar to https://github.com/sass/dart-sass/blob/master/tool/grind.dart. Includes the Dart VM so installation is quite easy.

Maybe wait on full AOT support and release actual binaries (without DartVM)?

Standalone binaries in https://github.com/filiph/linkcheck/releases would be amazing! Any update on this?

Finally getting back to this. Dart has now dart2aot and the speedup is significant:

Size of site Script time Precompiled AOT time Speedup
76K links 6.331s 3.749s 1.7x
54 links -e 4.932s 1.421s 3.5x
52 links 2.749s 0.101s 27x ๐Ÿ˜ฎ

Blocked on dart-lang/sdk#36915. After that, we can just compile binaries on each platform and be done. Right now we'd still need to deal with the dartaotruntime. I'd rather the Dart team does it, than me trying to build some temporary workaround.

For those interested in the speedup, and want to have it now, you can follow the instructions below:

  1. Clone linkcheck.
  2. Compile the AOT representation by running dart2aot bin/linkcheck.dart bin/linkcheck.dart.aot
  3. Instead of running dart bin/linkcheck.dart [...], run dartaotruntime bin/linkcheck.dart.aot [...]

// cc @rodolphopivetta in case Rodolpho knows how to teach Docker do this.

@filiph can you try this now with this latest dev build?
https://storage.googleapis.com/dart-archive/channels/dev/release/2.6.0-dev.6.0/sdk/dartsdk-macos-x64-release.zip

You'll want to use dart2native (our new compiler that's replacing dart2aot).

Wow, this worked! I've attached a MacOS executable to the latest release: https://github.com/filiph/linkcheck/releases/tag/v2.0.11.

I'm trying out linux now. I won't get to a Windows box until evening at the earliest, but when I do, I'll add that, too.

UPDATE: Ok, I've created executables for all 3 main desktop 64bit platforms (Linux, Windows, Mac). Please try them out if you can.

I'm not sure how to properly name binaries so that it's clear what platform they are for. It's weird to name an executable linkcheck-mac. But I guess that'll need to do for now. @fenollp, do you know how others do it?

Btw, if anyone wants to look at how to automate this (so that releases are built for every tag, ideally in CI/CD), how to teach Docker to release as a binary, and/or how to put linkcheck on things like apt or homebrew, I would really appreciate the help.

Amazing. Waiting for this feature.

Iโ€™ll work on a github action to create binaries for tagged releases ๐Ÿ‘๐Ÿผ

@filiph I've seen naming like this. quickhash_3.1.0-1_amd64.deb
Name, version, architecture/platform.

@AppleEducate Awesome, thank you!

@ThinkDigitalSoftware So linkcheck_2.0.11_x64.mac? That still seems a bit weird to me, but probably better than what I have. Also, does .deb denote "linux executable"? I thought it stood for Debian package (which I'm not compiling through dart2native). Sorry for stupid questions, I'm new to this.

Well architecture or platform depending on what you're trying to differentiate so linkcheck_2.1.11_macOS, ..._linux, ..._win.exe
And the ".deb" was just the extension, which you're not worrying about except for windows I assume

I realize I never updated this: