Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto eol=lf
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Bug Report"
description: "Report software deficiencies"
labels: ["bug"]
body:
- type: "markdown"
attributes:
value: |
Use this form to report any functional or performance bugs you've found in the software.

Be sure to check if your [issue](https://github.com/y-scope/zstd-ffi-js/issues) has already been
reported.

- type: "textarea"
attributes:
label: "Bug"
description: "Describe what's wrong and if applicable, what you expected instead."
validations:
required: true

- type: "input"
attributes:
label: "Spider version"
description: "The release version number or development commit hash that has the bug."
placeholder: "Version number or commit hash"
validations:
required: true

- type: "textarea"
attributes:
label: "Environment"
description: "The environment in which you're running Spider."
placeholder: "OS version, Docker version, etc."
validations:
required: true

- type: "textarea"
attributes:
label: "Reproduction steps"
description: "List each step required to reproduce the bug."
validations:
required: true
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Feature/Change Request"
description: "Request a feature or change"
labels: ["enhancement"]
body:
- type: "markdown"
attributes:
value: |
Use this form to request a feature/change in the software, or the project as a whole.

- type: "textarea"
attributes:
label: "Request"
description: "Describe your request and why it's important."
validations:
required: true

- type: "textarea"
attributes:
label: "Possible implementation"
description: "Describe any implementations you have in mind."
validations:
required: false
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
zstd-ffi-js is a JavaScript library that provides bindings to the Zstandard compression library.

# Docs

You can find our docs [online][zstd-ffi-js-docs].

## Contributing

We welcome contributions! Please see our [contributing guidelines][contributing-guidelines] for more
information.

## License

This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.

[contributing-guidelines]: https://docs.yscope.com/zstd-ffi-js/main/dev-docs/contributing
[zstd-ffi-js-docs]: https://docs.yscope.com/zstd-ffi-js/main/
42 changes: 42 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Docs

This directory contains the files necessary to generate a Sphinx-based documentation website for
this project:

* `conf` - Configuration files
* `src` - The actual docs

## Requirements

* [Node.js] >= 16 to be able to [view the output](#viewing-the-output)
* Python 3.10 or higher
* [Task] 3.40.0 or higher

## Build commands

* Build the site incrementally:

```shell
task docs:site
```

* The output of the build will be in `../build/docs/html`.

* Clean up the build:

```shell
task docs:clean
```

## Viewing the output

```shell
task docs:serve
```

The command above will install [http-server] and serve the built docs site; `http-server` will print
the address it binds to (usually http://localhost:8080).

[http-server]: https://www.npmjs.com/package/http-server
[Node.js]: https://nodejs.org/en/download/current
[Task]: https://taskfile.dev/
77 changes: 77 additions & 0 deletions docs/conf/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# -- Project information -------------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "zstd-ffi-js"

# NOTE: We don't include a period after "Inc" since the theme adds one already.
copyright = "2025 YScope Inc"

# -- General configuration -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"myst_parser",
"sphinx_copybutton",
"sphinx_design",
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
]

# -- MyST extensions -----------------------------------------------------------
# https://myst-parser.readthedocs.io/en/stable/syntax/optional.html
myst_enable_extensions = [
"attrs_block",
"colon_fence",
]

myst_heading_anchors = 4

# -- Sphinx autodoc options ----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#configuration

autoclass_content = "class"
autodoc_class_signature = "separated"
autodoc_typehints = "description"

# -- HTML output options -------------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_favicon = "https://docs.yscope.com/_static/favicon.ico"
html_title = project
html_show_copyright = True

html_static_path = ["../src/_static"]

html_theme = "pydata_sphinx_theme"

# -- Theme options -------------------------------------------------------------
# https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/layout.html

html_theme_options = {
"footer_start": ["copyright"],
"footer_center": [],
"footer_end": ["theme-version"],
"navbar_start": ["navbar-logo"],
"navbar_end": ["navbar-icon-links", "theme-switcher"],
"primary_sidebar_end": [],
"secondary_sidebar_items": ["page-toc", "edit-this-page"],
"show_prev_next": False,
"use_edit_page_button": True,
}

# -- Theme source buttons ------------------------------------------------------
# https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/source-buttons.html

html_context = {
"github_user": "y-scope",
"github_repo": "zstd-ffi-js",
"github_version": "main",
"doc_path": "docs/src",
}

# -- Theme custom CSS and JS ---------------------------------------------------
# https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/static_assets.html


def setup(app):
app.add_css_file("custom.css")
5 changes: 5 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
myst-parser>=4.0.0
pydata-sphinx-theme>=0.16.1
sphinx_design>=0.6.1
sphinx-copybutton>=0.5.2
sphinx>=8.1.3
32 changes: 32 additions & 0 deletions docs/src/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
html[data-theme="dark"], html[data-theme="light"] {
--pst-color-primary: #3399ff;
--pst-color-secondary: #9580ff;
}

a {
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

/*
Use the bottom border that's used for indicating the current page as the hover style (for a more
cohesive look).
NOTE: This selector matches the one in pydata-sphinx-theme
pydata/pydata-sphinx-theme@v0.14.4/src/pydata_sphinx_theme/assets/styles/sections/_header.scss#L86
*/
.bd-header .navbar-nav li a.nav-link:hover {
border-bottom: max(3px,.1875rem,.12em) solid var(--pst-color-secondary);
text-decoration: none;
}

/*
Remove margin from sidebar-primary-items__end so that we don't have an unnecessary scrollbar. We're
not using the end items currently.
*/
.bd-sidebar-primary .sidebar-primary-items__end {
margin-top: 0;
margin-bottom: 0;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Building `zstd-wasm`
# Building the project

This document explains how to build the Zstandard WASM library `zstd-wasm` from source.
This document explains how to build the project.

## Requirements
* CMake 3.16 or higher
Expand Down
9 changes: 9 additions & 0 deletions docs/src/dev-docs/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing

Thank you for your interest in contributing to zstd-ffi-js! This document provides guidelines for
contributing to the project.

:::{note}
This documentation is still under development. Please check back later for complete contribution
guidelines.
:::
38 changes: 38 additions & 0 deletions docs/src/dev-docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Developer docs

This section contains docs for developing zstd-ffi-js. Choose one of the sections below
or use the left sidebar (if it's hidden, click the <i class="fa fa-bars"></i> icon) to navigate to
specific docs.

::::{grid} 1 1 2 2
:gutter: 2

:::{grid-item-card}
:link: building-project
Building the project
^^^
How to build zstd-ffi-js.
:::

:::{grid-item-card}
:link: contributing
Contributing
^^^
How to contribute to zstd-ffi-js.
:::

:::{grid-item-card}
:link: testing
Testing
^^^
How to test zstd-ffi-js.
:::
::::

:::{toctree}
:hidden:

building-project.md
contributing.md
testing.md
:::
7 changes: 7 additions & 0 deletions docs/src/dev-docs/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Testing

This document explains how to test zstd-ffi-js.

:::{note}
This documentation is still under development. Please check back later for complete testing instructions.
:::
30 changes: 30 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# zstd-ffi-js

zstd-ffi-js is a JavaScript library that provides bindings to the Zstandard compression library through FFI (Foreign Function Interface).

This documentation is organized into the following sections:

::::{grid} 1 1 2 2
:gutter: 2

:::{grid-item-card}
:link: user-docs/index
🧑 User docs
^^^
Documentation for users who want to use zstd-ffi-js in their projects.
:::

:::{grid-item-card}
:link: dev-docs/index
🛠 Developer docs
^^^
Documentation for developers who want to contribute to zstd-ffi-js.
:::
::::

:::{toctree}
:hidden:

user-docs/index.md
dev-docs/index.md
:::
14 changes: 14 additions & 0 deletions docs/src/user-docs/guides-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Overview

The tutorials below guide you on how to use and operate zstd-ffi-js.

::::{grid} 1 1 2 2
:gutter: 2

:::{grid-item-card}
:link: quick-start
Quick start
^^^
How to get started with using zstd-ffi-js in your project.
:::
::::
24 changes: 24 additions & 0 deletions docs/src/user-docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# User docs

This section contains docs for using and operating zstd-ffi-js. Choose one of the sections below or use
the left sidebar (if it's hidden, click the <i class="fa fa-bars"></i> icon) to navigate to specific
docs.

::::{grid} 1 1 2 2
:gutter: 2

:::{grid-item-card}
:link: guides-overview
Guides
^^^
Guides for using and operating zstd-ffi-js.
:::
::::

:::{toctree}
:hidden:
:caption: Guides

guides-overview.md
quick-start.md
:::
Loading