---
sidebar_position: 5
---
# Contributing
Due to the precarious nature of the Open Specifications Promise, it is very
important to ensure code is cleanroom.  [Contribution Notes](https://git.sheetjs.com/sheetjs/sheetjs/src/branch/master/CONTRIBUTING.md)
  File organization (click to show)
Folders:
| folder       | contents                                                      |
|:-------------|:--------------------------------------------------------------|
| `bin`        | server-side bin scripts (`xlsx.njs`)                          |
| `bits`       | raw source files that make up the final script                |
| `dist`       | dist files for web browsers and nonstandard JS environments   |
| `misc`       | miscellaneous supporting scripts                              |
| `modules`    | TypeScript source files that generate some of the bits        |
| `packages`   | Support libraries and tools                                   |
| `test_files` | test files (pulled from the test files repository)            |
| `tests`      | browser tests (run `make ctest` to rebuild)                   |
| `types`      | TypeScript definitions and tests                              |
 
After cloning the repo, running `make help` will display a list of commands.
## Setup
These instructions will cover system configuration, cloning the source repo,
building, reproducing official releases, and running NodeJS and browser tests.
:::note Tested Deployments
These instructions were tested on the following platforms:
| Platform                      | Architecture | Test Date  |
|:------------------------------|:-------------|:-----------|
| Linux (Steam Deck Holo x64)   | `linux-x64`  | 2024-03-21 |
| Linux (Ubuntu 18 AArch64)     | `linux-arm`  | 2023-12-01 |
| MacOS 14.4 (x64)              | `darwin-x64` | 2024-03-15 |
| MacOS 14.1.2 (ARM64)          | `darwin-arm` | 2023-12-01 |
| Windows 10 (x64) + WSL Ubuntu | `win10-x64`  | 2024-03-04 |
| Windows 11 (x64) + WSL Ubuntu | `win11-x64`  | 2023-10-14 |
| Windows 11 (ARM) + WSL Ubuntu | `win11-arm`  | 2023-09-18 |
With some additional dependencies, the unminified scripts are reproducible and
tests will pass in Windows XP with NodeJS 5.10.0.
:::
### Install dependencies
#### OS-Specific Setup
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
  
A) Ensure WSL ("WSL 2" in Windows 10) and the Ubuntu distribution are installed.
Installation Notes (click to hide)
In "Turn Windows features on or off", the following features must be enabled:
- "Hyper-V" (including every sub-feature)
- "Virtual Machine Platform"
- "Windows Hypervisor Platform"
- "Windows Subsystem for Linux"
The following command installs Ubuntu within WSL:
```powershell
wsl --install Ubuntu
```
In some versions of `wsl`, the `-d` flag must be specified:
```powershell
wsl --install -d Ubuntu
```
:::caution pass
In the last Windows 11 test, there was a `WSL_E_DEFAULT_DISTRO_NOT_FOUND` error.
The resolution is to switch to WSL1, install, and switch back to WSL2:
```
wsl --set-default-version 1
wsl --install Ubuntu
wsl --set-default-version 2
wsl --install Ubuntu
```
:::
:::warning pass
**WSL will not run in a Windows on ARM VM on computers with the M1 CPU**
Apple Silicon M1 processors do not support nested virtualization.
M2 processors do support nested virtualization. SheetJS users have reported
success with Windows on ARM running on computers with the M2 Max CPU.
:::
Steam Deck (click to hide)
Desktop Mode on the Steam Deck uses `pacman`.  It also requires a few steps.
0) Switch to Desktop mode and open `Konsole`
:::tip pass
At this point, it is strongly recommended to install the `ungoogled-chromium`
browser from the "Discover" app and open this page on the Steam Deck. Running
the browser on the device makes it easy to copy and paste commands.
:::
1) Set a password for the user by running `passwd` and following instructions.
2) Disable read-only mode:
```bash
sudo steamos-readonly disable
```
(When prompted, enter the password assigned in step 1)
3) Configure keyring:
```bash
sudo sh -c 'echo "keyserver hkps://keyserver.ubuntu.com" >> /etc/pacman.d/gnupg/gpg.conf'
sudo pacman-key --init
sudo pacman-key --populate
sudo pacman-key --refresh-keys
```
4) Install dependencies:
```bash
sudo pacman -S base-devel
```
:::note pass
In local testing on the Steam Deck, some of the C / C++ demos failed to build.
This issue was resolved by manually installing `glibc` and `linux-api-headers`:
```bash
sudo pacman -S glibc linux-api-headers
```
This is *not required* for building or testing the library.
:::