Skip to content

Commit

Permalink
docs: update readme (#2)
Browse files Browse the repository at this point in the history
* docs: update readme

* fix: readme

* fix: updated readme

* docs: update content

* fix: updated doc content and links

* fix: updated repository name

* fix: updated titles
  • Loading branch information
alexwine36 authored Aug 26, 2024
1 parent 8567c3f commit edc5b48
Show file tree
Hide file tree
Showing 2 changed files with 256 additions and 9 deletions.
265 changes: 256 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,273 @@
# NextJS Web Workers and WASM
<!-- Improved compatibility of back to top link: See: https://github.com/alexwine36/NextJS-WASM-and-WebWorkers/pull/73 -->
<a id="readme-top"></a>
<!--
*** Thanks for checking out the NextJS Web Workers and WASM. If you have a suggestion
*** that would make this better, please fork the repo and create a pull request
*** or simply open an issue with the tag "enhancement".
*** Don't forget to give the project a star!
*** Thanks again! Now go create something AMAZING! :D
-->

Example repo with web workers, browser run web assembly and server run web assembly in NextJS.


<!-- PROJECT SHIELDS -->
<!--
*** I'm using markdown "reference style" links for readability.
*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
*** See the bottom of this document for the declaration of the reference variables
*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
*** https://www.markdownguide.org/basic-syntax/#reference-style-links
-->
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]


## Tooling
- [moon](https://moonrepo.dev/docs) for monorepo management
- Rust for compiling web assembly
- NextJS for client build

<!-- PROJECT LOGO -->
<br />
<div align="center">
<!-- <a href="https://github.com/alexwine36/NextJS-WASM-and-WebWorkers">
<img src="images/logo.png" alt="Logo" width="80" height="80">
</a> -->

## Development
<h3 align="center">NextJS WASM and Web Workers</h3>

<p align="center">
<div>An example project comparing computation speed with Web Workers and WASM</div>
<br />
<!-- <a href="https://github.com/alexwine36/NextJS-WASM-and-WebWorkers"><strong>Explore the docs »</strong></a>
<br /> -->
<br />
<a href="https://moon-repo-test.vercel.app/">View Demo</a>
·
<a href="https://github.com/alexwine36/NextJS-WASM-and-WebWorkers/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
·
<a href="https://github.com/alexwine36/NextJS-WASM-and-WebWorkers/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
</p>
</div>



<!-- TABLE OF CONTENTS -->
<details>
<summary>Table of Contents</summary>
<ol>
<li>
<a href="#about-the-project">About The Project</a>
<ul>
<li><a href="#built-with">Built With</a></li>
</ul>
</li>
<li>
<a href="#getting-started">Getting Started</a>
<ul>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#installation">Installation</a></li>
</ul>
</li>
<li><a href="#usage">Usage</a></li>
<li><a href="#roadmap">Roadmap</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#license">License</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#acknowledgments">Acknowledgments</a></li>
</ol>
</details>



<!-- ABOUT THE PROJECT -->
## About The Project

[![Product Name Screen Shot][product-screenshot]](https://example.com)

## 🚀 **NextJS WASM and Workers** - Compare efficiency of offloading tasks on the web!

This repository contains a NextJS application that is able to run web workers and WASM on the server and client. For quick comparison, functions calculate fibonacci numbers.

**Key Features:**
- ⚡️ Monorepo using [Moonrepo][moon-url]
- 💻 NextJS bundling web workers and wasm
- 💡 Web worker using web assembly

<!-- **Getting Started:**
- ➡️ [Briefly explain how to get started with the project]
- [Optional: Link to documentation] -->

**Contribution:**
- 🎉 Contributions are welcome!
<!-- - [Optional: Link to contribution guidelines] -->

**Let's build something amazing together! ✨**



### Built With

This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

[![Next][Next.js]][Next-url]
[![React][React.js]][React-url]
[![Rust][Rust]][Rust-url]
[![Moon][Moon]][Moon-url]
[![Wasm][Wasm]][Wasm-url]

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- GETTING STARTED -->
## Getting Started


To get a local copy up and running follow these simple example steps.

### Prerequisites

Install moon - [instructions](https://moonrepo.dev/docs/install)

```sh
<!-- ```sh
moon setup
```
Run dev servers
```sh
moon :dev
```
``` -->

### Installation

_Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services._


1. Clone the repo
```sh
git clone https://github.com/alexwine36/NextJS-WASM-and-WebWorkers.git
```
2. Initialize Moon
```sh
moon setup
```
3. Run development server
```sh
moon :dev
```

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- USAGE EXAMPLES -->
<!-- ## Usage
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
_For more examples, please refer to the [Documentation](https://example.com)_
<p align="right">(<a href="#readme-top">back to top</a>)</p> -->



<!-- ROADMAP -->
## Roadmap

<!-- - [x] Add Changelog
- [x] Add back to top links
- [ ] Add Additional Templates w/ Examples
- [ ] Add "components" document to easily copy & paste sections of the readme
- [ ] Multi-language Support
- [ ] Chinese
- [ ] Spanish -->

See the [open issues](https://github.com/alexwine36/NextJS-WASM-and-WebWorkers/issues) for a full list of proposed features (and known issues).

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- CONTRIBUTING -->
## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- LICENSE -->
## License

Distributed under the MIT License. See `LICENSE` for more information.

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- CONTACT -->
## Contact


[Alex Wine](https://github.com/alexwine36)

Project Link: [https://github.com/alexwine36/NextJS-WASM-and-WebWorkers](https://github.com/alexwine36/NextJS-WASM-and-WebWorkers)

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- ACKNOWLEDGMENTS -->
## Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

* [wasm-pack](https://github.com/rustwasm/wasm-pack)
* [Comlink](https://github.com/GoogleChromeLabs/comlink)
* [Img Shields](https://shields.io)



<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/alexwine36/NextJS-WASM-and-WebWorkers.svg?style=for-the-badge
[contributors-url]: https://github.com/alexwine36/NextJS-WASM-and-WebWorkers/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/alexwine36/NextJS-WASM-and-WebWorkers.svg?style=for-the-badge
[forks-url]: https://github.com/alexwine36/NextJS-WASM-and-WebWorkers/network/members
[stars-shield]: https://img.shields.io/github/stars/alexwine36/NextJS-WASM-and-WebWorkers.svg?style=for-the-badge
[stars-url]: https://github.com/alexwine36/NextJS-WASM-and-WebWorkers/stargazers
[issues-shield]: https://img.shields.io/github/issues/alexwine36/NextJS-WASM-and-WebWorkers.svg?style=for-the-badge
[issues-url]: https://github.com/alexwine36/NextJS-WASM-and-WebWorkers/issues
[license-shield]: https://img.shields.io/github/license/alexwine36/NextJS-WASM-and-WebWorkers.svg?style=for-the-badge
[license-url]: https://github.com/alexwine36/NextJS-WASM-and-WebWorkers/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/alexwine
[product-screenshot]: docs/assets/screenshot.jpg
[Next.js]: https://img.shields.io/badge/next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white
[Next-url]: https://nextjs.org/
[React.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB
[React-url]: https://reactjs.org/
[Rust]: https://img.shields.io/badge/Rust-CE412B?style=for-the-badge&logo=rust&logoColor=white
[Rust-url]: https://www.rust-lang.org/
[Moon]: https://img.shields.io/badge/Moonrepo-6e58d1?style=for-the-badge&logo=moonrepo&logoColor=white
[Moon-url]: https://moonrepo.dev/

[Wasm]: https://img.shields.io/badge/webassembly-6550F0?style=for-the-badge&logo=webassembly&logoColor=white
[Wasm-url]: https://webassembly.org/

Binary file added docs/assets/screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit edc5b48

Please sign in to comment.