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

feat: introduce connector for js/wasm #4

Merged
merged 10 commits into from
Jul 19, 2024

Conversation

x1unix
Copy link
Contributor

@x1unix x1unix commented Jul 17, 2024

This PR introduces js/wasm platform support to run gnopls in browsers and Node.js.

Implementation relies on 3 WebAssembly exports and syscall/js package to receive JSON-RPC from host environment.
The js bridge is heavily based on the code of our gopls wasm port.

Why no stdio?

  • Because by default, there is no stdin implementation in browsers and getting a reliable stdin implementation on JS might be a complex task.

Where this will be used?

  • Goal of this PR is to introduce LSP support in Gno Playground

Are there any examples?

  • There is a bare-minimum embedding example in internal/js/example directory.

@x1unix x1unix requested a review from a team as a code owner July 17, 2024 22:16
@x1unix x1unix requested review from zivkovicmilos and piux2 and removed request for a team July 17, 2024 22:16
internal/js/reader.go Outdated Show resolved Hide resolved
x1unix and others added 3 commits July 18, 2024 11:07
Co-authored-by: Jerónimo Albi <jeronimo.albi@gmail.com>
Co-authored-by: Jerónimo Albi <jeronimo.albi@gmail.com>
@x1unix x1unix requested a review from jeronimoalbi July 18, 2024 15:12
@x1unix x1unix requested a review from jeronimoalbi July 18, 2024 18:01
@x1unix x1unix merged commit e0df7e3 into gnolang:master Jul 19, 2024
1 check passed
@x1unix x1unix deleted the feat/support-wasm branch July 19, 2024 18:35
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

Successfully merging this pull request may close these issues.

2 participants