- Notifications
You must be signed in to change notification settings - Fork2
The tiny JavaScript runtime built with QuickJS, libuv and ❤️
License
quickjs-zh/txiki.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
txikia (basque): small, tiny.
txiki.js is a small and powerful JavaScript runtime. It's built on the shoulders ofgiants: it usesQuickJS as its JavaScript engine,libuv as the platform layer,wasm3 as the WebAssembly engine andcurl as the HTTP client.
- alert, confirm, prompt (1)
- Console
- Crypto (2)
- Encoding API
- EventTarget
- fetch
- JSON modules
- Performance
- setTimeout, setInterval
- Streams API
- URL
- URLPattern
- URLSearchParams
- WebAssembly (3)
- Web Workers API
(1): All of them are async.
(2): No subtle support.
(3): No tables, globals or memory support.
- TCP and UDP sockets
- Unix sockets / named pipes
- Signal handling
- File operations
- Child processes
- DNS (getaddrinfo)
- WASI
- Miscellaneous utility functions
See thefull API documentation.
Other extras:
- Import directly from HTTP(S) URLs
- Import JSON files
- BigFloat and BigDecimal extensions
The builtin@tjs/std
module exports the following:
- GNU/Linux
- macOS
- Windows (beta)
- Other Unixes (please test!)
CMake is necessary.
NOTE: The txiki.js build depends on a number of git submodules (e.g.curl,libuv).If you didn't already clone this repository recursively, make sure you initialize thesesubmodules withgit submodule update --init
before proceeding to the build.
# Get the codegit clone --recursive https://github.com/saghul/txiki.js --shallow-submodules&&cd txiki.js# Compile it!make# Run the REPL./build/tjs
Building has only been tested in 64bit Windows.
First make sure you haveMSYS2 installed. Themingw64
andclang64
environments are currently tested.
Then install the required dependencies:
pacman -S git make pactoyspacboy -S curl-winssl:p toolchain:p cmake:p ninja:p
These commands must be run in a MinGW64 or clang64 shell.
make
This will build the executable just like on Unix. Note that at this point there are a number of dynamically linked libraries, so if you want to use the executable on a different system you'll need to copy those too. Check the list withldd build/tjs.exe
.
Make sure these commands are run from Windows Terminal (mintty, what MSYS2 provides is not supported).
maketest
At this time txiki.js usescalendar versioning with the form YY.MM.MICRO.
txiki.js stands on shoulders of giants. It wouldn't be what it is today without these libraries:
In addition, txiki.js has thesecontributors to thank for their help.
Thank you all for making this project possible!