1
0
Fork 0
forked from fun/fun
fun/docs
2026-03-30 14:53:11 +02:00
..
examples Added some await pattern and added a scheduler to the stdlib. Broken! (0.39.13) 2026-03-30 14:53:11 +02:00
external More notcurses fun. Not stable! (0.39.4) 2026-03-20 20:57:43 +01:00
arrays.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-17 14:34:57 +01:00
asyncio.md Added some await pattern and added a scheduler to the stdlib. Broken! (0.39.13) 2026-03-30 14:53:11 +02:00
build.md Some unicode fixes in docs/. No code changes. (0.38.16) 2026-02-19 23:41:34 +01:00
bytecode-format.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-18 18:11:21 +01:00
cli.md Holy shit, added some fun.md to the docs. (0.39.2) 2026-03-18 21:38:51 +01:00
contributing.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-18 18:11:21 +01:00
embedding.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-18 18:11:21 +01:00
errors-and-diagnostics.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-18 18:11:21 +01:00
examples.md Added OpenSSL RIPEMD-160 fun. (0.38.14) 2026-02-19 14:19:17 +01:00
faq.md More OpenSSL and documenation fun. No more words to say. (0.38.13) 2026-02-19 14:05:14 +01:00
fun.md Holy shit, added some fun.md to the docs. (0.39.2) 2026-03-18 21:39:15 +01:00
funstx.md Ufff, I forgot to add the primay code... :) (0.39.1) 2026-03-18 21:13:22 +01:00
handbook.md Handbook update. No code changes. (0.37.57) 2026-01-19 20:45:09 +01:00
includes.md Some more documentation fun about includes. No code changes. (0.38.11) 2026-02-11 03:02:29 +01:00
internals.md Some unicode fixes in docs/. No code changes. (0.38.16) 2026-02-19 23:43:49 +01:00
maps.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-17 14:34:57 +01:00
numbers.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-17 14:59:39 +01:00
opcodes.md Added some basic asyncio documentation. No code changes. (0.39.12) 2026-03-27 21:37:36 +01:00
performance.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-18 17:39:10 +01:00
README.md Some documentation refactoring. No code changes. (0.39.12) 2026-03-27 23:39:54 +01:00
repl.md Added REPL documentation to ./docs/. No code changes. (0.37.62) 2026-01-26 03:45:35 +01:00
roadmap.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-18 18:11:21 +01:00
rust.md More OpenSSL and documenation fun. No more words to say. (0.38.13) 2026-02-19 14:05:14 +01:00
security-and-sandboxing.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-18 17:39:10 +01:00
stdlib.md Some documentation updates for stdlib. No code changes. (0.39.12) 2026-03-27 22:03:42 +01:00
strings.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-17 14:59:39 +01:00
style-guide.md Some more stdlib fun and example code and cosmetic changes. (0.38.15) 2026-02-19 21:50:24 +01:00
testing.md Some more stdlib fun and example code and cosmetic changes. (0.38.15) 2026-02-19 21:50:24 +01:00
troubleshooting.md More OpenSSL and documenation fun. No more words to say. (0.38.13) 2026-02-19 14:05:14 +01:00
types.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-17 14:59:39 +01:00
writing-tests.md Holiday is over, now I have fun again. No code changes. (0.38.11) 2026-02-18 17:39:10 +01:00

Fun Documentation Index

This file serves as an index of the documents in this directory. Links are relative and can be opened directly on Git hosting or locally.

Overview

  • handbook.md - Comprehensive handbook for the Fun language and VM: install/build, configuration flags, usage, and full feature overview.
  • types.md - Core types (numbers, strings, arrays, maps, nil/bool), common operations, patterns, and interop notes.
  • numbers.md - Working with integers and floats: arithmetic, conversions, clamping, bitwise ops, and patterns.
  • strings.md - Working with strings: literals/escaping, concatenation, substr/find, split, and conversions.
  • arrays.md - Working with arrays: creation, indexing/slicing, iteration patterns, helpers, and idioms.
  • maps.md - Working with maps: construction, lookup/update, merging, iteration, and common patterns.
  • includes.md - Using local vs. system includes, FUN_LIB_DIR, DEFAULT_LIB_DIR, and namespaced includes with as.
  • repl.md - REPL guide: how to build/launch, editing and history, completions, REPL-on-error, and tips.
  • opcodes.md - VM opcodes overview grouped by domain with brief behavior/stack notes.
  • internals.md - Implementation details: bytecode format, VM architecture, stacks/frames, parser, and dispatch.
  • rust.md - Writing Rust-backed opcodes and wiring them into the C VM; build/setup notes.
  • examples.md - How to run the examples and the interactive showcase script, with environment tips.
  • testing.md - How to build and run tests/targets with CMake/CTest, and where to add new tests.
  • troubleshooting.md - Common issues and quick fixes for build, includes, and REPL usage.

New and supplemental guides

  • build.md - How to build Fun with CMake, available targets, and build options (FUN_DEBUG, FUN_USE_MUSL, FUN_WITH_CPP, FUN_WITH_RUST, FUN_WITH_OPENSSL, FUN_WITH_LIBRESSL).
  • cli.md - Command-line usage of the fun executable: synopsis, options, exit codes, includes and library paths.
  • fun.md - Full usage guide for the fun executable: invocation patterns, REPL, env vars, include paths, examples, and install locations.
  • asyncio.md - Async I/O primitives and patterns: non-blocking sockets, fd polling, examples, and best practices.
  • funstx.md - Syntax checker for .fun files with optional --fix auto-corrections; usage, exit codes, and limitations.
  • contributing.md - How to contribute: project structure, coding style, running tests, and PR guidelines.
  • style-guide.md - Coding conventions for C and Fun (indentation, naming, idioms).
  • stdlib.md - Overview of the standard library modules under ./lib with one-line summaries.
  • embedding.md - Embedding the VM from C/Rust, lifecycle, and host integration tips.
  • errors-and-diagnostics.md - Understanding parser/runtime errors and enabling diagnostics.
  • performance.md - Build/runtime tuning tips and patterns for better performance.
  • security-and-sandboxing.md - Trust boundaries, I/O expectations, and capability restrictions.
  • faq.md - Frequently asked questions and quick answers.
  • writing-tests.md - How to author new tests for Fun and opcode components.
  • bytecode-format.md - Reference for the bytecode format (split out from internals for convenience).
  • roadmap.md - High-level direction, planned features, and pointers to issues.

Examples

  • examples/README.md - Catalog of all example scripts under ./examples/: what each area contains, how to run them, required env vars, and extension requirements.

External extensions

Documentation for optional, build-time selectable integrations lives in external/:

Tips

  • When building from the repo without installing, set FUN_LIB_DIR to the local ./lib directory so examples and the REPL can locate the stdlib.
  • For a broader project overview and quickstart, see the repository root README.md.
  • Crypto examples:
    • If built with -DFUN_WITH_OPENSSL=ON, try examples/crypto/openssl_md5.fun.
    • If built with -DFUN_WITH_LIBRESSL=ON, try examples/crypto/libressl_md5.fun.