rhai/doc/src/SUMMARY.md
2020-08-07 18:40:31 +08:00

6.1 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 Anonymous Function from a Rhai Function
    5. Evaluate Expressions Only
    6. Raw Engine
  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. Packages
      1. Built-in Packages
      2. Create a Custom Package
    6. Override a Built-in Function
    7. Operator Overloading
    8. Register a Custom Type and its Methods
      1. Getters and Setters
      2. Indexers
      3. Disable Custom Types
      4. Printing Custom Types
    9. Scope - Initializing and Maintaining State
    10. Engine Configuration Options
  5. Rhai Language Reference
    1. Comments
    2. Values and Types
      1. Dynamic Values
      2. type-of()
      3. Numbers
        1. Operators
        2. Functions
        3. Value Conversions
      4. Strings and Characters
        1. Built-in Functions
      5. Arrays
      6. Object Maps
        1. Parse from JSON
        2. Special Support for OOP
      7. 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. Anonymous Functions
      6. Currying
      7. Closures
    16. Print and Debug
    17. Modules
      1. Export Variables, Functions and Sub-Modules
      2. Import Modules
      3. Create from Rust
      4. Create from AST
      5. Module Resolvers
        1. Custom Implementation
  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. Advanced Topics
    1. Advanced Patterns
      1. Object-Oriented Programming (OOP)
      2. Loadable Configuration
      3. Control Layer
      4. Singleton Command
    2. Capture Scope for Function Call
    3. Serialization/Deserialization of Dynamic with serde
    4. 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
    5. Low-Level API
    6. Use as DSL
      1. Disable Keywords and/or Operators
      2. Custom Operators
      3. Extending with Custom Syntax
    7. Eval Statement
  8. Appendix
    1. Keywords
    2. Operators and Symbols
    3. Literals