Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release linkcheck as a standalone executable #7

Closed
filiph opened this issue Feb 15, 2017 · 11 comments
Closed

Release linkcheck as a standalone executable #7

filiph opened this issue Feb 15, 2017 · 11 comments

Comments

@filiph
Copy link
Owner

filiph commented Feb 15, 2017

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)?

@fenollp
Copy link

fenollp commented Apr 18, 2018

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

@filiph
Copy link
Owner Author

filiph commented May 27, 2019

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.

@mit-mit
Copy link

mit-mit commented Oct 8, 2019

@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).

@filiph
Copy link
Owner Author

filiph commented Oct 8, 2019

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?

@filiph
Copy link
Owner Author

filiph commented Oct 8, 2019

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.

@ansarizafar
Copy link

Amazing. Waiting for this feature.

@rodydavis
Copy link

I’ll work on a github action to create binaries for tagged releases 👍🏼

@ThinkDigitalSoftware
Copy link

ThinkDigitalSoftware commented Oct 9, 2019

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

@filiph
Copy link
Owner Author

filiph commented Oct 9, 2019

@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.

@filiph filiph changed the title Add tool for creating executables Release linkcheck as a standalone executable Oct 9, 2019
@ThinkDigitalSoftware
Copy link

ThinkDigitalSoftware commented Oct 9, 2019

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

@filiph
Copy link
Owner Author

filiph commented Jan 22, 2021

I realize I never updated this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants