awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
scriban avatar

scriban/scriban

0
View on GitHub↗
3,905 星标·405 分支·C#·BSD-2-Clause·5 次浏览scriban.github.io↗

Scriban

Scriban 是一个用于动态文本生成的文本模板库和 .NET 脚本引擎。它既是一个模板处理器,也是一个安全的脚本沙箱,通过限制对象暴露来提供安全的执行环境,从而防止未经授权的代码执行。该项目还包含一个抽象语法树模板解析器,支持对模板进行程序化分析和修改。

该引擎内置了专门的 Liquid 模板引擎及兼容模式,能够解析、执行并转换以 Liquid 语法编写的模板。其独特之处在于成员暴露过滤系统,允许开发者重命名、隐藏或过滤对象属性,从而控制模板内的数据访问方式。

该库涵盖了广泛的功能,包括异步模板渲染、条件逻辑和集合迭代。它提供了用于数据操作的内置工具,如数学运算、JSON 转换、日期时间算术,以及基于正则表达式的强大文本处理功能。开发者还可以通过定义自定义函数和集成外部类来进一步扩展引擎功能。

该项目提供了一个安全的 API 接口,支持通过 Native AOT 发布为原生二进制文件。

Features

  • Dynamic Text Generation - Uses a .NET scripting engine to produce flexible text output based on data and custom logic.
  • .NET Scripting Engines - Implements a lightweight scripting engine for executing custom logic and dynamic expressions within .NET applications.
  • Template Rendering Engines - Evaluates compiled templates against data contexts to produce final dynamic text output.
  • Template - Converts source text into a visitable abstract syntax tree for programmatic template analysis and modification.
  • Runtime Member Visibility Filtering - Uses boolean rules to determine which public instance fields and properties are visible to the template engine.
  • Template AST Analysis - Converts text templates into abstract syntax trees for programmatic analysis and modification.
  • AST-Based Template Parsing - Converts template source text into a visitable abstract syntax tree for programmatic analysis and round-trip text generation.
  • Embedded Scripting Logic - Runs scripts containing variables and blocks to manipulate data and control text flow.
  • Function Definitions - Enables the creation of anonymous or parametric functions to encapsulate reusable logic and computations within templates.
  • Text Templating Engines - Renders text templates using conditional logic, loops, and data-binding expressions.
  • Execution Sandboxes - Provides a secure execution environment that restricts object exposure to prevent unauthorized code execution.
  • Object Exposure Controls - Limits access to host objects using sanitized data structures to prevent unauthorized code execution within the sandbox.
  • Scripting Sandboxes - Provides a secure execution environment that restricts host system access via whitelists to prevent unauthorized code execution.
  • Runtime Access Controls - Controls which properties and methods are accessible within the sandbox for safe evaluation.
  • Liquid - Evaluates templates written in legacy Liquid syntax to support migration without requiring manual rewriting.
  • Text Template Rendering - Processes templates with logic and expressions to produce dynamic text output.
  • Template Logic Customization - Extends the engine with proprietary functions and filtered object exposure to control rendering.
  • Data Manipulation - Transforms strings, arrays, and dates using built-in functions for data processing.
  • Collection Iteration - Loops through arrays or numeric ranges using for and while statements within templates.
  • Structured Data Manipulation - Creates and modifies objects and arrays using dot notation and zero-based indexing.
  • JSON Serializers - Serializes objects to JSON format and transforms JSON strings back into objects.
  • AST to Source Conversion - Generates a textual representation from a syntax tree while preserving or removing whitespace.
  • External Class Bindings - Integrates external classes and delegates to extend the functional capabilities of the template engine.
  • AOT-Compatible Libraries - Provides a restricted API surface that avoids dynamic reflection to enable publishing as a native binary via Native AOT.
  • AOT-Compatible Rendering - Provides a safe API surface that avoids runtime reflection to support native ahead-of-time compilation.
  • Template Extensions - Expands available template capabilities by adding custom logic and functions to the execution context.
  • Conditional Logic - Controls execution flow using boolean comparisons, if-else statements, and switch blocks.
  • Data Type Manipulators - Processes strings, arrays, dates, and numbers using built-in functions for calculations.
  • Runtime Template Expressions - Executes custom logic within templates using code blocks and expression statements.
  • Expression Piping - Implements a pipe operator that passes the output of one expression directly into another for sequential data transformations.
  • Multi-Syntax Parsing Support - Parses scripts using different language specifications to enable migration and compatibility between formats.
  • Object Reflection Utilities - Retrieves keys, values, and types from data objects to determine their structure.
  • Script Variable Management - Stores and retrieves data using global and local variables to pass information through scripts.
  • Scripting Environment Extensions - Binds external functions and objects into the execution environment to add specialized capabilities.
  • Scoped Execution Contexts - Resolves variables against a specific object using scoped blocks to change the current execution context.
  • General Array Operations - Provides functions for sorting, reversing, and joining array elements within templates.
  • Arithmetic Operations - Performs basic arithmetic, rounding, and random number generation.
  • Abstract Syntax Tree Parsing - Converts source text into a visitable abstract syntax tree for programmatic analysis and modification.
  • Asynchronous Execution Models - Implements non-blocking operations during template processing to maintain responsiveness during high-latency data fetches.
  • Dynamic Expression Evaluators - Evaluates runtime expressions by resolving variables and components to produce dynamic output.
  • Template Control Flow - Executes loops and conditional logic to dynamically determine which content to render.
  • Template Value Piping - Manipulates template values using built-in operations chained through a pipe operator.
  • Compatibility Mode Parsing - Supports interchangeable parsing modes to maintain compatibility with legacy scripts and different language specifications.
  • Asynchronous Template Rendering - Processes templates using non-blocking operations to maintain stability during heavy concurrent traffic.
  • Script Conversions - Provides a dedicated conversion tool to transform scripts from Liquid format to Scriban syntax.

Star 历史

scriban/scriban 的 Star 历史图表scriban/scriban 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Scriban 的开源替代方案

相似的开源项目,按与 Scriban 的功能重合度排序。
  • lunet-io/scribanlunet-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
  • mouredev/hello-javamouredev 的头像

    mouredev/hello-java

    4,304在 GitHub 上查看↗

    This project is a collection of instructional resources and curriculum materials designed to teach the Java language. It provides a structured programming course, a fundamentals guide, and an object-oriented programming tutorial, supported by a series of practical coding exercises and implementation challenges. The curriculum focuses on implementing object-oriented patterns, including inheritance, polymorphism, and abstraction. It covers the creation of classes, the use of interfaces to define behavioral contracts, and the application of access modifiers to control data visibility. The educa

    Javacursojavapoo
    在 GitHub 上查看↗4,304
  • gopl-zh/gopl-zh.github.comgopl-zh 的头像

    gopl-zh/gopl-zh.github.com

    4,958在 GitHub 上查看↗

    This project is a Chinese translation of a comprehensive guide to the Go programming language. It serves as a localized educational resource and technical manual designed to provide guidance on language syntax, design, and software development. The resource covers a broad range of Go language education, including the implementation of programming patterns and system design. It includes translated lessons and examples that focus on core language features such as concurrency and the use of interfaces. The content spans various capability areas, including language fundamentals, data modeling, r

    Goprogramming-language
    在 GitHub 上查看↗4,958
  • rhaiscript/rhairhaiscript 的头像

    rhaiscript/rhai

    5,453在 GitHub 上查看↗

    Rhai is an embedded scripting engine and dynamically typed language designed for integration into Rust applications. It functions as an abstract syntax tree compiler and native interop layer, allowing developers to map Rust types and functions into a scripting environment for bidirectional communication. The project serves as a framework for creating customizable domain-specific languages. It allows for the definition of custom operators, syntax, and restricted execution environments, enabling the creation of specialized languages with tailored functional sets. The engine covers a broad rang

    Rustembeddedembedded-scripting-languageno-std
    在 GitHub 上查看↗5,453
查看 Scriban 的所有 30 个替代方案→

常见问题解答

scriban/scriban 是做什么的?

Scriban 是一个用于动态文本生成的文本模板库和 .NET 脚本引擎。它既是一个模板处理器,也是一个安全的脚本沙箱,通过限制对象暴露来提供安全的执行环境,从而防止未经授权的代码执行。该项目还包含一个抽象语法树模板解析器,支持对模板进行程序化分析和修改。

scriban/scriban 的主要功能有哪些?

scriban/scriban 的主要功能包括:Dynamic Text Generation, .NET Scripting Engines, Template Rendering Engines, Template, Runtime Member Visibility Filtering, Template AST Analysis, AST-Based Template Parsing, Embedded Scripting Logic。

scriban/scriban 有哪些开源替代品?

scriban/scriban 的开源替代品包括: lunet-io/scriban — Scriban is a .NET text templating engine and embedded scripting language used for dynamic text generation. It… mouredev/hello-java — This project is a collection of instructional resources and curriculum materials designed to teach the Java language.… gopl-zh/gopl-zh.github.com — This project is a Chinese translation of a comprehensive guide to the Go programming language. It serves as a… rhaiscript/rhai — Rhai is an embedded scripting engine and dynamically typed language designed for integration into Rust applications.… inkle/ink — Ink is an interactive narrative scripting language, a JSON narrative compiler, and a narrative engine runtime. It… janet-lang/janet — Janet is a Lisp-based dynamic programming language featuring a register-based bytecode virtual machine and an…