proposal: tree-sitter-wit hosted project#129
Merged
ricochet merged 3 commits intoJul 18, 2025
Merged
Conversation
mkatychev
marked this pull request as ready for review
July 1, 2025 07:03
tree-sitter-wit hosted project
Contributor
|
The TSC has approved this hosted project. Please initiate the project transfer to the Bytecode Alliance organization. |
ricochet
approved these changes
Jul 10, 2025
Member
Author
4 tasks
Contributor
|
The project has been transferred and a team for project administration created, |
Member
Author
|
Awesome! Thank you all for the effort! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposal to Create tree-sitter-wit
This document is a proposal to create tree-sitter-wit as a formal Hosted Project under the auspices of the TSC of the Bytecode Alliance, as specified in the TSC’s charter.
Proposing the adoption of tree-sitter-wit as a Bytecode Alliance hosted project.
Current Repository URL: https://github.com/liamwh/tree-sitter-wit
Proposed Repository URL: https://github.com/bytecodealliance/tree-sitter-wit
tree-sitter-wit is a Tree-sitter grammar implementation for WebAssembly
Interface Types (WIT), providing syntax highlighting, parsing, and language
support for WIT files in various editors and development environments. The
project enables developers working with WebAssembly Component
Model interfaces to have rich
editor support including syntax highlighting, code folding, and structural
parsing capabilities.
As WIT is a core, but rapidly changing, interface definition language for
WebAssembly components and WASI, this tooling can enable automated testing of design specs
to minimise regressions and inconsistencies as the specification evolves (this "bug" was found by running the ebnf through tree-sitter-wit).
Requirements
Alignment with the Bytecode Alliance Mission
tree-sitter-wit provides language toolchain infrastructure for WebAssembly
Component Model interfaces.
The project supports BA's modularity goals by providing syntax
highlighting, parsing, and editor support for component interfaces, and
supports standardization efforts by implementing proper tooling for the WIT
specification instantly in these supported languages:
Code Review
Description
All proposed changes (Pull Requests) go through pull requests and CI validation
before merging. The project has comprehensive automated testing via GitHub
Actions that includes multi-platform testing (Ubuntu, Windows, macOS), parser
testing, and example parsing validation.
Code of Conduct
The project currently lacks a formal Code of Conduct document. If and when the
BA chooses to adopt this proposal, a
CODE_OF_CONDUCT.mdfile linking to theBytecode Alliance's Code of Conduct will be added to the repository root, and
maintainers will commit to enforcing the code of conduct.
Continuous Integration Testing
The project has comprehensive CI testing implemented via GitHub Actions. The
main CI workflow
runs on all pushes and pull requests, testing across multiple platforms
(Ubuntu, Windows, macOS-14) and includes parser testing and example parsing
validation. Additional workflows include grammar linting,
query file validation,
and fuzz testing.
All CI processes are reproducible by external contributors and core language
features are tested via the corpus tests.
Contributor Documentation
The project has a comprehensive
CONTRIBUTING.mdfile here providingdetailed guidance for contributors including:
justcommands for developmentThe documentation includes specific instructions for
testing, formatting, and development workflows, making it easy for new
contributors to get started and understand the project's conventions.
Following the Bytecode Alliance Operational Principles
The project demonstrates alignment with BA operational principles through its
commitment to broad testing coverage, building for consistency and
interoperability (following tree-sitter ecosystem standards), and facilitating
collaboration (open source development with clear contribution guidelines).
Licensing Compatible with the Bytecode Alliance
The project is already licensed under Apache-2.0 WITH LLVM-exception.
Dependencies are limited and use compatible licenses: tree-sitter ecosystem
packages, standard Node.js/Rust build tools (node-addon-api, cc crate), and
development tools (ESLint, tree-sitter-cli). The project is fully open source
and available to all under the same license terms.
README
The project has a comprehensive README.md
(https://github.com/liamwh/tree-sitter-wit/blob/main/README.md) with:
The README will be updated to include the required Bytecode Alliance hosted
project designation and ensure all key information is prominently displayed
above the fold.
Release Process
The project currently uses semantic versioning (v1.1.0) and should be able to publish to
popular registries such as npm and crates.io.
Security Process
The project currently lacks a formal security process documentation. If and
when the proposal is approved, a security policy will be established including
vulnerability reporting procedures, security release processes, and appropriate
escalation mechanisms. The project has minimal dependencies and automates
fuzzing in CI
to avoid potential security issues in the parser.
Dependabot or similar tooling can be added for security-only updates with
manual approval processes.
Semantic Versioning
The project follows semantic versioning as evidenced by the current version
1.1.0 in the repository.
Secrets Management
The project has no hardcoded secrets in the source code. The current CI
workflows use only standard GitHub Actions and do not require any secrets.
If automated deployment to package manager registries is added (npm,
crates.io), any required secrets for publishing to package registries will be
managed through GitHub organization-level secrets, and publishing credentials
will be managed through BA's established processes to ensure continuity and
shared access among maintainers.
Supply Chain Security
The project has a minimal dependency footprint, using primarily tree-sitter
ecosystem packages and standard build tools. Dependencies are locked via
Cargo.lock and pnpm-lock.yaml files.
Sustainable Contributor Base
The project currently two primary maintainers (Liam Woodleigh-Hardinge, Mikhail Katychev).
The project has comprehensive documentation enabling new contributors to get
involved, and there is no private information required for contribution.
Version Control
The project is currently hosted at https://github.com/liamwh/tree-sitter-wit
and will be transferred to the Bytecode Alliance GitHub organization
(github.com/bytecodealliance/tree-sitter-wit) upon adoption. The repository
includes full history, comprehensive CI/CD configuration, and all project
assets necessary for the transfer.
Access controls will be managed through BA
organizational settings upon transfer.
Recommendations
Changelog
The project currently does not maintain a formal changelog. If and when this
proposal is approved, a CHANGELOG.md file following the keepachangelog.com
format will be established to document releases, breaking changes, and
noteworthy updates for downstream users and integrators.
Continuous Fuzzing
The project already implements parser fuzzing via GitHub Actions
using tree-sitter's fuzzing infrastructure. This fuzzing tests the parser
against various input combinations to identify potential crashes or incorrect
parsing behavior.
End-User Documentation
The project provides comprehensive end-user documentation including
installation instructions for multiple editors (Neovim with detailed setup for
Lazy.nvim and manual installation), examples of WIT syntax
highlighting,
and example WIT
files. The
README documents how to use the parser across different language bindings
(Node.js, Rust, Python, Go, Swift, C).
Issue Triage Process
The project uses GitHub Issues for tracking but currently lacks a formal issue
triage process.
Leverage the Bytecode Alliance RFC Process
The project will adopt the Bytecode Alliance RFC process
for major changes that affect the parser's compatibility with the WIT
specification, changes to supported language bindings, or modifications that
could impact downstream tooling integration.
Given the project's role in validating WIT specification, RFCs would largely
be based around grammar correctness.
Production Use
The project has two current production project adopers:
Public Project Meetings and Notes
The project currently does not hold regular meetings given it aims to follow the
ratification process of the WIT specification.
Sanitizers and Code Analysis
The project includes generated C code for the parser and uses ESLint for
JavaScript grammar linting
(https://github.com/liamwh/tree-sitter-wit/blob/main/.github/workflows/lint-grammar.yml).
Generated (C code) Code Analysis is done through
tree-sitter test.