Skip to content

Tinygo wasm #4

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

Merged
merged 7 commits into from
Apr 27, 2022
Merged

Tinygo wasm #4

merged 7 commits into from
Apr 27, 2022

Conversation

ZauberNerd
Copy link
Contributor

Breaking change - see commit messages.

Final file size of main.wasm: 2.01 MB vs 6.86 MB before.

This commit refactors the wasm and JavaScript parts to make use of
TinyGo for creating even smaller wasm binaries.
It also introduces another wasm-opt pass that shaves off ~500K.

The API has changed: Previously the exported `createLinter()` function
was synchronous and returned an async function to lint a single file.
Now the `createLinter()` function is asynchronous and the returned
linter function is synchronous.

```js
import { createLinter } from "actionlint";
const linter = await createLinter();
const results = linter("on: psuh", "borked.yml");
```

BREAKING CHANGE: The `createLinter()` function is now asynchronous and
resolves to a function that synchronously invokes the actionlint binary.
@ZauberNerd ZauberNerd merged commit d765b30 into main Apr 27, 2022
@ZauberNerd ZauberNerd deleted the tinygo-wasm branch April 27, 2022 08:09
@github-actions
Copy link

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants