# DWXScript **Repository Path**: jsp007/DWXScript ## Basic Information - **Project Name**: DWXScript - **Description**: No description available - **Primary Language**: Pascal - **License**: MPL-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-13 - **Last Updated**: 2026-08-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DWXScript DWXScript is an object-oriented scripting engine for **Delphi**, inspired by the [Delphi language](http://en.wikipedia.org/wiki/Embarcadero_Delphi) and extended with features from other Pascal dialects such as [Free Pascal](http://www.freepascal.org/) and [Prism](http://prismwiki.codegear.com/en/Main_Page). It also introduces several modern Pascal extensions of its own, designed to make scripting more flexible, powerful, and intuitive. DWXScript is **forked from** [DWScript by delphitools.info](https://www.delphitools.info/dwscript/) and has been enhanced for **cross-platform compatibility** across: - 🪟 **Windows** - 🍎 **macOS** - 🐧 **Linux** including full support for the **Lazarus IDE**. --- ## ✨ Features - Fully object-oriented Pascal scripting engine. - Compatible with Delphi and Lazarus environments. - Cross-platform: works seamlessly on Windows, macOS, and Linux. - Extensible architecture for integrating custom classes, functions, and libraries. - Support for Unicode strings, records, dynamic arrays, RTTI, and class helpers. - Easy integration with Delphi or Lazarus applications. - Lightweight runtime with optional JIT compilation. - Built-in debugging and expression evaluation support. --- ## 🧩 Goals of DWXScript The primary goal of DWXScript is to **extend the reach of DWScript** to all major desktop platforms while maintaining compatibility with both **Delphi** and **Free Pascal (FPC)** environments. It aims to provide a unified scripting solution for developers building modern cross-platform applications in Object Pascal. Key objectives include: - ✅ **Cross-platform support** through FPC and Lazarus. - ✅ **Improved modularity** for embedding in desktop and server applications. - ✅ **Enhanced performance** and runtime stability. - ✅ **Modernized language extensions** inspired by newer Pascal dialects. --- ## 🛠️ Installation ### Prerequisites To build and use DWXScript, you need one of the following: - **Delphi 11+** (Windows) - **Lazarus IDE 3.0+** (Windows, macOS, Linux) - **Free Pascal Compiler (FPC) 3.2.2+** ### Steps 1. Clone this repository: ```bash git clone https://github.com//dwxscript.git cd dwxscript ``` 2. Open the project in **Delphi** or **Lazarus**: - In Delphi: open `DWXScript.dproj` - In Lazarus: open `DWXScript.lpi` 3. Build the library or demo project for your platform. 4. Include the compiled units or library in your application. --- ## ⚙️ Example Usage Here’s a simple example showing how to use DWXScript in a Delphi or Lazarus application: ```pascal uses dwsCompiler, dwsExprs, dwsComp; procedure RunScript; var Compiler: TdwsCompiler; ProgramObj: IdwsProgram; Exec: IdwsProgramExecution; begin Compiler := TdwsCompiler.Create(nil); try ProgramObj := Compiler.Compile('PrintLn("Hello from DWXScript!");'); Exec := ProgramObj.Execute; finally Compiler.Free; end; end; ``` --- ## 🧪 Cross-Platform Notes ### Windows DWXScript builds natively with **Delphi** or **Lazarus** on Windows. Ensure your project uses Unicode mode and that the required runtime units are in your search path. ### macOS & Linux DWXScript supports **Free Pascal** and **Lazarus** for full native compilation. Use the following compiler options for best compatibility: ```bash -fPIC -dFPC -dUSE_LINUX ``` When building shared libraries, ensure you link dynamically against system libraries. --- ## 🔍 Roadmap - [ ] Complete FPC/Lazarus integration for all units. - [ ] Add CEF-based (Chromium) sample showing DWXScript in a hybrid GUI app. - [ ] Integrate DWXScript into Docker-based build pipelines. - [ ] Implement modern RTTI reflection for dynamic types. - [ ] Add WebAssembly backend exploration. --- ## 🪪 Licensing DWXScript is released under the **Mozilla Public License 1.1 (MPL 1.1)**. In summary, this means: - You may freely use DWXScript in **open-source or commercial projects**. - Any application using or compiled with DWXScript must **prominently credit DWXScript** (e.g., in your “About” screen or documentation) and **include or link to the DWXScript source**. - Any modifications to DWXScript’s source must be made **public under the same license**. If you cannot or prefer not to meet these requirements, contact the maintainers to discuss **alternative licensing options**. --- ## 🤝 Contributing Contributions are welcome! To contribute: 1. Fork the repository. 2. Create a new branch (`feature/my-new-feature`). 3. Commit and push your changes. 4. Submit a Pull Request. Please ensure your changes include appropriate tests and documentation. --- ## 🧾 Credits DWXScript is based on the original **DWScript** project by [Eric Grange](https://www.delphitools.info/) and the DelphiTools team. This fork extends compatibility and modernizes the build environment for multi-platform use. --- ## 🌐 Links - [Original DWScript](https://www.delphitools.info/dwscript/) - [Free Pascal](https://www.freepascal.org/) - [Lazarus IDE](https://www.lazarus-ide.org/) - [Delphi](https://www.embarcadero.com/products/delphi) --- © 2025 DWXScript Contributors. All rights reserved.