awesome-repositories.com
المدونة
awesome-repositories.com

اكتشف أفضل مستودعات المصادر المفتوحة باستخدام بحث مدعوم بالذكاء الاصطناعي.

استكشفعمليات بحث منسقةبدائل مفتوحة المصدربرمجيات ذاتية الاستضافةالمدونةخريطة الموقع
المشروعحولكيفية ترتيب النتائجالصحافةخادم MCP
قانونيالخصوصيةالشروط
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
rhaiscript avatar

rhaiscript/rhai

0
View on GitHub↗
5,453 نجوم·238 تفرعات·Rust·Apache-2.0·6 مشاهداتcrates.io/crates/rhai↗

Rhai

Rhai هو محرك برمجة نصية مضمن ولغة ذات كتابة ديناميكية مصممة للدمج في تطبيقات Rust. يعمل كمترجم لشجرة بناء الجملة المجردة (AST) وطبقة تداخل أصلية، مما يسمح للمطورين بربط أنواع ووظائف Rust ببيئة برمجة نصية للتواصل ثنائي الاتجاه.

يعمل المشروع كإطار عمل لإنشاء لغات خاصة بالمجال (DSL) قابلة للتخصيص. يسمح بتعريف عوامل تشغيل مخصصة، وبناء جملة، وبيئات تنفيذ مقيدة، مما يتيح إنشاء لغات متخصصة ذات مجموعات وظيفية مصممة خصيصاً.

يغطي المحرك مجموعة واسعة من القدرات بما في ذلك الحماية (Sandboxing) المحدودة الموارد للتنفيذ الآمن، وتنظيم الكود المعياري، ومعالجة البيانات الشاملة للأنواع الرقمية والنصية والثنائية. كما يوفر أدوات لمعالجة AST، وتسلسل حالة التنفيذ، وقابلية المراقبة في وقت التشغيل من خلال فحص مكدس الاستدعاءات وواجهات التصحيح.

تم تصميم المحرك للنشر عبر المنصات على أي وحدة معالجة مركزية أو نظام تشغيل مدعوم من المترجم الأصلي.

Features

  • AST-Based Execution - Processes source code by transforming it into an abstract syntax tree for optimization and repeated execution.
  • Embedded Scripting Engines - Implements a lightweight scripting engine that can be integrated into a host application for dynamic logic and data exchange.
  • Embedded Scripting for Rust - Integrates a dynamic scripting language into Rust applications to allow users to define custom logic and automation.
  • Native Type Mappings - Transforms native Rust data types, including primitives and collections, into a dynamic format compatible with the script engine.
  • Global Function Registrations - Registers native functions into a shared global namespace for direct access within scripts without requiring imports.
  • Native Type Bridges - Provides a dynamic layer and bridge for any native type that supports cloning to be used in scripts.
  • Parsed AST Caching - Transforms source code into an abstract syntax tree and caches it to avoid redundant parsing during repeated execution.
  • AST Optimizations - Simplifies the abstract syntax tree through optimization passes that eliminate dead code and pre-evaluate constant arguments.
  • Native Module Registration - Uses procedural macros to expose host functions, constants, and type aliases as native modules in the engine.
  • Primitive Data Types - Supports a comprehensive set of primitive data types including integers, floats, decimals, booleans, strings, arrays, and maps.
  • Domain Specific Languages - Provides a framework for designing specialized languages with custom syntax, operators, and restricted feature sets.
  • Dynamic Object Maps - Provides hash dictionaries for storing and retrieving key-value pairs to modify properties dynamically at runtime.
  • Dynamic Script Execution - Evaluates and runs strings of code at runtime to modify application logic and state without recompilation.
  • Embedded Scripting Languages - Implements a dynamically typed language designed for integration into Rust applications for custom logic.
  • Expression Evaluators - Computes the result of a script expression and returns the resulting value back to the host application.
  • External Variable Mapping - Allows the host application to map external Rust values and objects into the script's execution context.
  • Foreign Function Bindings - Maps native host functions and closures into the scripting environment via a registration system for bidirectional communication.
  • Function-Pointer Callbacks - Provides mechanisms to map script-defined functions to native memory addresses so the host application can trigger runtime logic.
  • Host Function Exposure - Provides mechanisms for registering native Rust functions to be callable from within the scripting environment.
  • Host-to-Script Data Passing - Shares host values with scripts as variables or constants via an external scope.
  • Host-to-Script Function Invocations - Executes specific functions defined within a script from the host language with custom arguments and scope management.
  • Host Type Exposure - Maps host data types into the scripting environment using custom display names, methods, and indexers.
  • Interface Value Wrapping - Wraps native Rust data in dynamic containers to enable seamless interoperability and runtime type switching between host and script.
  • Language Extension APIs - Provides APIs and a plugin system powered by procedural macros to add custom functionality to the language.
  • Feature Restrictions - Disables specific keywords, operators, or expression types to constrain the capabilities of the script.
  • Module Organization - Groups related functions and types into named namespaces to manage scope and code splitting.
  • Script Module Resolution - Implements mechanisms for discovering and importing external script files based on configurable search paths.
  • Native Function Pointer Invocations - Provides mechanisms for calling native functions via memory addresses mapped to script-accessible pointers.
  • Native Interoperability Layers - Provides a system for mapping Rust types and functions into a scripting environment for seamless communication.
  • Native-to-Script Function Invocations - Executes script-defined functions from within a native host function by passing function pointers as parameters.
  • Domain Specific Languages - Provides a flexible framework for creating specialized languages with custom operators, syntax, and restricted environments.
  • Script Variable Management - Implements mechanisms for defining, storing, and overriding variables within the scripting environment.
  • Sandboxed Code Execution Environments - Provides a restricted execution environment with resource limits to securely run untrusted code.
  • Runtime Stability Guards - Prevents stack overflows and runaway execution to ensure host stability when running untrusted code.
  • Runtime Type Identification - Provides utilities to determine the data type of a value during script execution.
  • Runtime Type Inspection - Provides utilities to determine the underlying data type of a dynamic value during runtime execution.
  • Source Code Modularization - Organizes script logic into dynamically loadable modules to manage large codebases.
  • Dynamic Variable Assignments - Supports a dynamically typed environment where variables can change types during execution.
  • Variable Assignments - Provides core language primitives for binding values to identifiers via assignment operators.
  • Execution Sandboxes - Implements an isolated runtime environment that restricts scripts from mutating the host or causing stack overflows.
  • AST Optimization Compilers - Transforms script source code into an optimized abstract syntax tree for efficient repeated execution.
  • Native Function Bindings - Creates script-accessible function pointers that trigger native host functions or closures.
  • Custom Scripting Functions - Triggers functions defined within a script from the host application to execute custom logic.
  • Custom Type Method Registration - Enables host functions to be registered as methods on custom types, allowing scripts to manipulate native state.
  • Sandbox Resource Caps - Prevents resource exhaustion and stack overflows by tracking execution progress and capping operation counts in a sandbox.
  • Keyword and Operator Restrictions - Provides the ability to disable specific keywords or operators to create constrained, domain-specific language surfaces.
  • Dynamic Typing - Implements a dynamic typing system allowing variables to hold various built-in datatypes interchangeably at runtime.
  • Execution Resource Limiters - Caps maximum operations, function calls, and memory use to prevent resource exhaustion in the engine.
  • Data Serialization - Provides mechanisms for encoding and parsing script data types into external formats using standardized frameworks.
  • Binary Object Storage - Handles packed arrays of bytes as large binary objects for efficient raw data storage.
  • Stripped-Down Engine Configurations - Allows creation of a minimal engine environment with basic arithmetic and logic to reduce binary footprint.
  • Runtime Behavior Configuration - Allows modifying application behavior at runtime by executing script-based rules without recompiling the binary.
  • Custom Language Definitions - Provides a framework for defining new language parsers and symbol recognition rules for domain-specific languages.
  • Custom Parser Definitions - Provides specifications for recognizing language objects and handling non-standard constructs using user-defined state.
  • Syntax Parser Interceptions - Allows the engine to register mini-parsers that handle non-standard syntax and custom operators.
  • AST Code Pruning - Removes unreachable code blocks and propagates constants within the compiled AST before evaluation.
  • Script Object State Serializations - Persists the current set of variables and constants to allow saving and restoring the script environment.
  • Script State Persistence - Stores variables and constants in a dedicated state container to maintain data across multiple script evaluations.
  • Dynamic Library Loading - Provides the ability to load shared libraries at runtime to extend the engine's functionality.
  • Anonymous Functions - Supports the definition of anonymous functions that capture surrounding scope to persist state.
  • Binary Blob Management - Provides utilities for creating and manipulating raw binary blob objects that grow and shrink dynamically.
  • Binary Data Conversions - Transforms raw byte arrays into integer arrays or UTF-8 strings for further processing.
  • Binary Data Writing - Encodes strings as byte streams and writes integers in specific endian orders into binary positions.
  • Binary Size Optimizations - Prunes unused types and language features during compilation to reduce the final executable binary size.
  • Byte Sequence Handling - Provides low-level manipulation of raw byte arrays, including padding, truncating, and concatenation.
  • Byte Stream Manipulations - Implements operations on binary objects including slicing, padding, reversing, and draining bytes.
  • Constant-Folding Optimizations - Implements compiler optimizations that evaluate expressions with constant operands at compile time to simplify the AST.
  • Constant Folding Prevention - Allows marking native functions as volatile to prevent constant folding during compilation.
  • Dead Code Elimination Engines - Removes expressions and statements without side effects during compilation to reduce script size and overhead.
  • Custom Operator Implementations - Maps host functions to symbols or overloaded names to provide language-level operator overloading for custom types.
  • Operator Binding Definitions - Assigns custom symbols to operations with specific binding strengths to control how expressions are parsed.
  • Evaluatable Syntax Extensions - Registers new expression patterns and statement types that are parsed and evaluated via a callback.
  • String Deduplication - Stores unique strings only once to reduce memory consumption when handling high volumes of text data.
  • Execution Context Management - Modifies the current execution context, including variable scopes and call depth, during script evaluation.
  • Explicit This Binding Techniques - Allows associating a specific object with a function call to serve as the internal this context.
  • Function Metadata Inspection - Provides utilities to analyze high-level properties of functions, including parameters and documentation.
  • Host-Linked Property Definitions - Maps script property access to specific host functions to handle the retrieval and modification of data.
  • Host-Script Scope Sharing - Passes host values into scripts as variables or constants without requiring specialized trait implementations.
  • Scope Constant Injections - Adds predefined values or custom types into a script execution environment as immutable references.
  • Volatile Function Declarations - Prevents the optimizer from evaluating functions with unstable return values during the compilation process.
  • Language Feature Restrictions - Limits scripts to expressions or removes keywords to prevent the use of dangerous language features.
  • Ownership Transfer - Transfers data ownership during assignment to avoid the cost of cloning large objects.
  • Looping Restrictions - Enables the blocking of loop and while constructs to guarantee that scripts terminate.
  • Mixed-Type Arrays - Provides support for ordered lists of mixed types with built-in methods to grow, shrink, and access elements.
  • Operator Overloading - Allows replacing built-in arithmetic or comparison operations by registering host functions under operator names.
  • Parser Service Exposure - Exposes the tokenizer and parser as services to allow the definition of custom syntax and operators at runtime.
  • Pure Functions - Allows marking methods as pure to enable operations on constant values without triggering mutation errors.
  • Reference-Based Data Access - Allows the host to obtain references to internal script data to avoid ownership transfer of dynamic values.
  • Script Execution Termination - Allows the host application to manually terminate long-running scripts to ensure system stability.
  • Script Unit Composition - Allows grouping multiple functions and scripts into a single unified execution unit via AST merging.
  • Strict Variable Checking - Validates that all variables are defined during compilation to prevent runtime errors from missing definitions.
  • Syntax and Variable Error Detection - Detects undefined variables and missing imports during compilation to prevent runtime failures.
  • Assignment Optimizations - Rewrites simple assignment expressions into compound assignments to reduce memory cloning and increase speed.
  • Arithmetic Operations - Executes fundamental mathematical operations including addition, subtraction, multiplication, and division.
  • Script-to-Native Closure Wrappers - Wraps scripted functions into native closures to be used as callbacks within the host application.
  • Execution State Serializers - Converts global variables and constants into a serializable format to save and restore the execution environment.
  • Engine Behavior Configuration - Provides interfaces to modify how the engine handles property access and state tags during runtime evaluation.
  • Runtime Engine Extensions - Allows loading sets of functions and modules into engine instances to share configurations.
  • Evaluation Environment Restrictions - Enables the creation of restricted evaluation environments with selective functional packages and operators.
  • Module Scope Isolation - Encapsulates functions and variables within named modules to isolate scope and prevent naming collisions.
  • Modular Plugin Architectures - Enables the creation of extensible software where third parties can add functionality via external scripts and modular code.
  • Dynamic Value Casting - Converts dynamic script values into specific native types using safe or panicking methods.
  • Script Evaluation Monitoring - Tracks the evaluation progress of running scripts and allows the host to terminate execution.
  • Custom Debugging Implementations - Implements a debugging interface that hooks custom callbacks to track steps and manage breakpoints.
  • Stack Trace Inspections - Provides utilities for retrieving and analyzing runtime call stacks to diagnose execution flow.
  • Shared State Captures - Captures external variables or shared state within closures to let scripts modify data in the host environment.

سجل النجوم

مخطط تاريخ النجوم لـ rhaiscript/rhaiمخطط تاريخ النجوم لـ rhaiscript/rhai

بحث بالذكاء الاصطناعي

استكشف المزيد من المستودعات الرائعة

صف ما تحتاجه بلغة بسيطة — وسيقوم الذكاء الاصطناعي بترتيب آلاف المشاريع مفتوحة المصدر المنسقة حسب الصلة.

Start searching with AI

بدائل مفتوحة المصدر لـ Rhai

مشاريع مفتوحة المصدر مشابهة، مرتبة حسب عدد الميزات المشتركة مع Rhai.
  • dop251/gojaالصورة الرمزية لـ dop251

    dop251/goja

    6,914عرض على GitHub↗

    Goja is a JavaScript engine and ECMAScript compliant interpreter implemented entirely in Go. It serves as an embedded scripting engine that allows Go applications to execute JavaScript code and integrate a programmable scripting layer without relying on Cgo or external native dependencies. The project functions as a bridge between Go and JavaScript, enabling bidirectional data exchange and function invocation. It allows Go hosts to expose native structs, slices, and maps as JavaScript objects and arrays, while providing mechanisms to export script values and functions back into native Go type

    Go
    عرض على GitHub↗6,914
  • lunet-io/scribanالصورة الرمزية لـ lunet-io

    lunet-io/scriban

    3,905عرض على GitHub↗

    Scriban is a .NET text templating engine and embedded scripting language used for dynamic text generation. It functions as an abstract syntax tree manipulation tool and a template parser, allowing for the conversion of scripts into visitable trees for analysis, modification, and rendering. The engine is specifically designed for Native AOT compatibility, utilizing a reflection-free API to execute templates in trimmed environments. It also provides a dedicated parser and conversion system for Liquid templates, enabling the migration and execution of Liquid scripts within .NET. The project cov

    C#
    عرض على GitHub↗3,905
  • alibaba/qlexpressالصورة الرمزية لـ alibaba

    alibaba/QLExpress

    5,597عرض على GitHub↗

    QLExpress is a dynamic scripting engine and expression language for the Java platform. It functions as a runtime expression evaluator and business rule engine, allowing applications to execute scripts and evaluate business logic without requiring system recompilation. The engine distinguishes itself through a secure scripting sandbox that enforces security policies via class whitelisting and execution timeouts. It supports high-precision mathematics to prevent rounding errors and provides language alias support to create domain-specific languages that resemble natural language. Additional cap

    Java
    عرض على GitHub↗5,597
  • yuin/gopher-luaالصورة الرمزية لـ yuin

    yuin/gopher-lua

    6,933عرض على GitHub↗

    Gopher-lua is a complete implementation of the Lua language and its standard libraries written natively in Go. It serves as an embedded scripting engine and virtual machine that allows Go applications to execute Lua scripts and exchange data between the host and the script environment. The project provides a bytecode compiler to transform source code into a binary format for faster execution. It enables deep integration between the two languages by allowing the registration of native Go functions to be called from scripts, and the invocation of script functions directly from Go. The engine c

    Gogogopher-lualua
    عرض على GitHub↗6,933
عرض جميع البدائل الـ 30 لـ Rhai→

الأسئلة الشائعة

ما هي وظيفة rhaiscript/rhai؟

Rhai هو محرك برمجة نصية مضمن ولغة ذات كتابة ديناميكية مصممة للدمج في تطبيقات Rust. يعمل كمترجم لشجرة بناء الجملة المجردة (AST) وطبقة تداخل أصلية، مما يسمح للمطورين بربط أنواع ووظائف Rust ببيئة برمجة نصية للتواصل ثنائي الاتجاه.

ما هي الميزات الرئيسية لـ rhaiscript/rhai؟

الميزات الرئيسية لـ rhaiscript/rhai هي: AST-Based Execution, Embedded Scripting Engines, Embedded Scripting for Rust, Native Type Mappings, Global Function Registrations, Native Type Bridges, Parsed AST Caching, AST Optimizations.

ما هي البدائل مفتوحة المصدر لـ rhaiscript/rhai؟

تشمل البدائل مفتوحة المصدر لـ rhaiscript/rhai: dop251/goja — Goja is a JavaScript engine and ECMAScript compliant interpreter implemented entirely in Go. It serves as an embedded… alibaba/qlexpress — QLExpress is a dynamic scripting engine and expression language for the Java platform. It functions as a runtime… lunet-io/scriban — Scriban is a .NET text templating engine and embedded scripting language used for dynamic text generation. It… yuin/gopher-lua — Gopher-lua is a complete implementation of the Lua language and its standard libraries written natively in Go. It… sebastienros/jint — Jint is a JavaScript interpreter for the .NET ecosystem that executes code without requiring a browser or Node.js… patriksimek/vm2 — vm2 is a Node.js JavaScript sandbox and runtime virtualizer designed to execute untrusted code. It functions as a…