**Kuroko** is a dynamic, bytecode-compiled programming language and a [dialect](#python-compatibility) of Python. The syntax features indentation-driven blocks, familiar keywords, and explicit variable declaration with block scoping. The runtime interpreter includes a tracing garbage collector, multithreading support without a global lock, and support for single-step debugging and bytecode disassembly. The full interpreter and compiler can be built on Unix-like platforms to a shared library of around 500K and is easy to embed and extend with a [clean C API](https://kuroko-lang.github.io/docs/embedding.html) and limited libc footprint. Kuroko has been successfully built for a wide range of targets, including Linux, [ToaruOS](https://github.com/klange/toaruos), WebAssembly, macOS (including M1 ARM devices), and Windows (with mingw64).
On most platforms, `make` is sufficient to build in the standard configuration which will produce a dynamically-linked REPL binary (`kuroko`) and a shared library containing the compiler and bytecode interpreter (`libkuroko.so`).
-`KRK_ENABLE_STATIC=1`: Build a single static binary. This will also disable support for C extension modules.
-`KRK_DISABLE_RLINE=1`: Do not build with support for the rich syntax-highlighted line editor.
-`KRK_DISABLE_DEBUG=1`: Do not build support for disassembly. Not recommended, as it does not offer any visible improvement in performance.
-`KRK_ENABLE_BUNDLE=1`: Embed C extension modules (which are normally built as shared objects) into the REPL binary. Generally used with `KRK_ENABLE_STATIC`.
-`KRK_NO_DOCUMENTATION=1`: Do not include documentation strings for builtins. Can reduce the library size by around 100KB depending on other configuration options.
Kuroko is easy to embed in a host application or extend with C modules. Please see [the documentation on our website](https://kuroko-lang.github.io/docs/embedding.html) for further information.
Kuroko aims for wide compatibility with Python 3.x and supports most syntax features and a growing collection of standard library functions. The most notable difference between Kuroko and standard Python is explicit variable declaration and the use of the `let` keyword. Many Python snippets can be ported to Kuroko with only the addition of declaration statements. Some syntax features remain unimplemented, however:
Kuroko iterables do not use the `__next__()` method, but rather are called normally. This allows iteration objects to be implemented as simple functions. If you are porting code which has a different use of `__call__()` than `__next__()` it will likely be necessary to change the implementation. Kuroko also doesn't have a `StopIteration` exception; iterators return themselves to signal they are exhausted (if you need an iterator to return itself, consider boxing it in a tuple).
Kuroko has generalized assignment expressions, so skip the walrus and assign whatever you like (some additional parenthesis wrapping may be necessary to disambiguate assignments).