Skip to content

Commit

Permalink
doc: update documentation, add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul authored Oct 13, 2023
1 parent ef391d3 commit 744d607
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 12 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
Expand All @@ -17,6 +17,20 @@ jobs:
run: npm install
- name: Run the linter
run: npm run lint
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm install
- name: Run the linter
run: npm run api-docs
build-linux:
name: Linux
runs-on: ubuntu-latest
Expand All @@ -31,7 +45,7 @@ jobs:
env:
BUILDTYPE: ${{ matrix.buildType }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
Expand Down Expand Up @@ -66,7 +80,7 @@ jobs:
steps:
- name: Install automake
run: brew install automake
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
Expand All @@ -89,14 +103,14 @@ jobs:
env:
BUILDTYPE: ${{ matrix.buildType }}
steps:
- uses: actions/checkout@v1
- name: Prepare
run: apk add git build-base cmake curl-dev autoconf automake libtool texinfo linux-headers --update-cache
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Prepare
run: apk add build-base cmake curl-dev autoconf automake libtool texinfo linux-headers --update-cache
- name: Build it
run: make
- name: Test it
Expand All @@ -114,7 +128,7 @@ jobs:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup MSYS2
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

> **txikia** (basque): small, tiny.
*txiki.js* is a small and powerful JavaScript runtime. It's built on the shoulders of
*txiki.js* is a small and powerful JavaScript runtime. It targets ECMAScript 2020
and implements many web platform features.

It's built on the shoulders of
giants: it uses [QuickJS] as its JavaScript engine, [libuv] as the platform layer,
[wasm3] as the WebAssembly engine and [curl] as the HTTP / WebSocket client.

It targets ECMAScript 2020 and implements many web platform features.

See it in action here:

<p align="center">
Expand Down
78 changes: 76 additions & 2 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,79 @@
# Welcome to the txiki.js API documentation
# Welcome to the txiki.js documentation

On this site you'll find documentation on all the APIs provided by [txiki.js](https://github.com/saghul/txiki.js).
[*txiki.js*](https://github.com/saghul/txiki.js) is a small and powerful JavaScript runtime.
It targets ECMAScript 2020 and implements many web platform features.

On this site you'll find documentation on all the APIs provided by it.

If there is any missing, please [open an issue](https://github.com/saghul/txiki.js/issues/new).

## Features

Support for the [ES2020] specification plus some ES2020+ features like top level await.

### Web Platform APIs

- [alert, confirm, prompt] (1)
- [Console]
- [Crypto] (2)
- [Encoding API]
- [EventTarget]
- [fetch]
- [JSON modules]
- [Performance]
- [setTimeout, setInterval]
- [Storage API]
- [Streams API]
- [URL]
- [URLPattern]
- [URLSearchParams]
- [WebAssembly] (3)
- [WebSocket]
- [Web Workers API]

(1): All of them are async.

(2): No subtle support.

(3): No tables, globals or memory support.

### Runtime features

- TCP and UDP sockets
- Unix sockets / named pipes
- Signal handling
- File operations
- Child processes
- DNS (getaddrinfo)
- WASI
- Miscellaneous utility functions

Other extras:

- Import directly from HTTP(S) URLs
- Import JSON files
- BigFloat and BigDecimal extensions
- Builtin test runner

### Standard library

Look at the modules on the left sidebar.

[alert, confirm, prompt]: https://developer.mozilla.org/en-US/docs/Web/API/Window/alert
[fetch]: https://fetch.spec.whatwg.org/
[EventTarget]: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
[Console]: https://developer.mozilla.org/en-US/docs/Web/API/Console
[Crypto]: https://developer.mozilla.org/en-US/docs/Web/API/Crypto
[Encoding API]: https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API
[JSON modules]: https://github.com/tc39/proposal-json-modules
[Performance]: https://developer.mozilla.org/en-US/docs/Web/API/Performance
[setTimeout, setInterval]: https://developer.mozilla.org/en-US/docs/Web/API/setTimeout
[Storage API]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API
[Streams API]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
[URL]: https://developer.mozilla.org/en-US/docs/Web/API/URL
[URLPattern]: https://developer.mozilla.org/en-US/docs/Web/API/URLPattern
[URLSearchParams]: https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
[Web Workers API]: https://developer.mozilla.org/en-US/docs/Web/API/Worker
[WebAssembly]: https://developer.mozilla.org/en-US/docs/WebAssembly
[WebSocket]: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
[ES2020]: https://tc39.es/ecma262/

0 comments on commit 744d607

Please sign in to comment.