rhai/doc/src/SUMMARY.md

6.7 KiB

The Rhai Scripting Language

  1. What is Rhai
    1. Features
    2. Supported Targets and Builds
    3. What Rhai Isn't
    4. Licensing
    5. Related Resources
  2. Getting Started
    1. Online Playground
    2. Install the Rhai Crate
    3. Optional Features
    4. Special Builds
      1. Performance
      2. Minimal
      3. no-std
      4. WebAssembly (WASM)
    5. Examples
      1. Rust
      2. Scripts
  3. Using the Engine
    1. Hello World in Rhai - Evaluate a Script
    2. Compile to AST for Repeated Evaluations
    3. Call a Rhai Function from Rust
    4. Create a Rust Closure from a Rhai Function
    5. Evaluate Expressions Only
    6. Raw Engine
    7. Scope - Initializing and Maintaining State
    8. Engine Configuration Options
  4. Extend Rhai with Rust
    1. Traits
    2. Register a Rust Function
      1. String Parameters in Rust Functions
    3. Register a Generic Rust Function
    4. Register a Fallible Rust Function
    5. Override a Built-in Function
    6. Operator Overloading
    7. Register a Custom Type and its Methods
      1. Getters and Setters
      2. Indexers
      3. Disable Custom Types
      4. Printing Custom Types
    8. Packages
      1. Built-in Packages
      2. Load a Plugin Module as a Package
      3. Manually Create a Custom Package
    9. Modules
      1. Create from Rust
      2. Create from AST
      3. Module Resolvers
        1. Custom Implementation
    10. Plugins
      1. Export a Rust Module
      2. Export a Rust Function
  5. Rhai Language Reference
    1. Comments
    2. Values and Types
      1. Dynamic Values
      2. Serialization/Deserialization with serde
      3. type_of()
      4. Numbers
        1. Operators
        2. Functions
        3. Value Conversions
      5. Strings and Characters
        1. Built-in Functions
      6. Arrays
      7. Object Maps
        1. Parse from JSON
        2. Special Support for OOP
      8. Time-Stamps
    3. Keywords
    4. Statements
    5. Variables
    6. Constants
    7. Logic Operators
    8. Other Operators
    9. If Statement
    10. While Loop
    11. Loop Statement
    12. For Loop
    13. Return Values
    14. Throw Exception on Error
    15. Functions
      1. Call Method as Function
      2. Overloading
      3. Namespaces
      4. Function Pointers
      5. Currying
      6. Anonymous Functions
      7. Closures
    16. Print and Debug
    17. Modules
      1. Export Variables, Functions and Sub-Modules
      2. Import Modules
    18. Eval Statement
  6. Safety and Protection
    1. Checked Arithmetic
    2. Sand-Boxing
    3. Maximum Length of Strings
    4. Maximum Size of Arrays
    5. Maximum Size of Object Maps
    6. Maximum Number of Operations
      1. Tracking Progress and Force-Termination
    7. Maximum Number of Modules
    8. Maximum Call Stack Depth
    9. Maximum Statement Depth
  7. Script Optimization
    1. Optimization Levels
    2. Re-Optimize an AST
    3. Eager Function Evaluation
    4. Side-Effect Considerations
    5. Volatility Considerations
    6. Subtle Semantic Changes
  8. Usage Patterns
    1. Object-Oriented Programming (OOP)
    2. Loadable Configuration
    3. Control Layer
    4. Singleton Command
    5. Multi-Layer Functions
    6. One Engine Instance Per Call
    7. Scriptable Event Handler with State
    8. Dynamic Constants Provider
  9. Advanced Topics
    1. Capture Scope for Function Call
    2. Low-Level API
    3. Variable Resolver
    4. Use as DSL
      1. Disable Keywords and/or Operators
      2. Custom Operators
      3. Extending with Custom Syntax
    5. Multiple Instantiation
  10. Appendix
    1. Keywords
    2. Operators and Symbols
    3. Literals