Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add TypeScript bindings #369
This PR adds TypeScript bindings and an npm package for using Mesh in the browser. The Wasm bytecode is embedded in the package itself which makes it really easy to import and use. It also adds an example of how to import and use the TypeScript bindings.
Here's a breakdown of the directory structure and key files:
I'm planning to clean this up and document it in a README, but for now here are the steps for running the example:
I know there's not a lot of tests here. I'm planning to write integration tests in a separate PR. The way it will work is that we'll spin up a few nodes on a local network and confirm that they can connect and share orders with one another. It will involve coordinating between some native Go nodes and some that are running in a headless browser. In the meantime, examples/browser can serve as a sort of ad hoc integration test.