Skip to content
New issue

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

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

Already on GitHub? # to your account

Compile Wasm #336

Merged
merged 7 commits into from
Mar 14, 2023
Merged

Compile Wasm #336

merged 7 commits into from
Mar 14, 2023

Conversation

torhovland
Copy link
Member

@torhovland torhovland commented Mar 13, 2023

Related to #171 .

web_tree_sitter::Language::load_path() is async, so now Topiary is as well. It's not entirely straightforward to make formatter() async, and it may be nice to keep the async stuff out of it anyway, so the API has changed so that grammars are loaded outside of it, then passed in to formatter().

Also added Wasm building to Nix, and running that from CI.

@torhovland torhovland marked this pull request as ready for review March 13, 2023 14:10
Copy link
Member

@Xophmeister Xophmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full disclosure: I'm not familiar with Rust async -- but it looks like it follows the usual model -- and I'm afraid the Nix changes are beyond me.

That said, I can more-or-less understand the PR and your changes make sense to me...and if it works, it works 👍 I think it was a good idea to keep the formatter synchronous and delegate language loading, to keep the API relatively tidy.

@torhovland torhovland merged commit 4801ce8 into main Mar 14, 2023
@torhovland torhovland deleted the compile-wasm branch March 14, 2023 13:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants