Skip to content
 
 

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LynxScript

Rust Cargo

GitHub stars GitHub forks GitHub issues GitHub license

The blazingly fast CatWeb programming language with simple syntax.

Overview

LynxScript is an experimental CatWeb scripting language implemented in Rust. It provides a way for more advanced CatWeb site developers to write code without the blocks and only text.

Features

  • Custom Scripting Language: Defines its own syntax and semantics for expressive scripting.
  • High Performance: Built with Rust for efficiency and speed, suitable for various scripting tasks.
  • Friendly Error Diagnostics: Utilizes ariadne to produce clear, colored, and helpful error messages for syntax and runtime issues, enhancing the developer experience.
  • Robust Parsing: Employs the chumsky parser combinator library for flexible and powerful language parsing capabilities.
  • Command-Line Interface: Offers an easy-to-use CLI for executing LynxScript files directly from your terminal with no extra setup needed.

Quick Start

Prerequisites

Installation

  1. Clone the repository Begin by cloning the LynxScript repository to your local machine:

    git clone https://github.com/gaxolotl/LynxScript.git
    cd LynxScript
  2. Build the project Compile the project. This command will create a debug executable.

    cargo build

    The compiled executable will be located at ./target/debug/lynxscript.

  3. Install the CLI tool (optional, for global access) To make lynxscript globally available on your system's PATH, you can install it using Cargo:

    cargo install --path .

    After this, you can run lynxscript from any directory in your terminal.

Usage

Once LynxScript is built or installed, you can use the lynxscript command to execute your .lynx script files. Use the lynxscript --help command for all available commands.

Basic Execution

To run a LynxScript file:

# If installed globally via `cargo install --path .`:
lynxscript <path-to-your-script>.lynx

# If running from the repository directory (after `cargo build`):
./target/debug/lynxscript <path-to-your-script>.lynx

Examples

(TODO: provide more examples as the codebase grows)

# Example 1: Running a basic script
# Assuming you have a file named `hello.lynx` with simple LynxScript code:
# print("Hello, LynxScript!");
lynxscript hello.lynx
# Expected output (demonstrative): Hello, LynxScript!

# Example 2: Inspecting a script (conceptual)
# If LynxScript includes a subcommand for syntax checking or linting:
# lynxscript check my_complex_script.lynx
# Expected output: (Diagnostic messages or success indication)

Development

Building the Project

To compile the project for development:

cargo build

For an optimized, production-ready build:

cargo build --release

The release executable can be found at ./target/release/lynxscript.

Running Tests

If the project includes unit or integration tests (common in Rust projects), you can execute them with Cargo:

cargo test

License

This project is licensed under the MIT License - see the LICENSE file for full details.

Acknowledgments

  • Original author and creator of LynxScript: pickaxe828
  • Built with the blazing fast Rust
  • Command-line interface parsing powered by clap library
  • Language parsing logic made possible by chumsky parser combinator library
  • Enhanced error reporting thanks to the diagnostics provided by ariadne

⭐ Star this repo if you find it helpful!

Made with ❤️ by pickaxe828 and the contributors

About

fork because i need to make pr so tuff ik

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages