turing-lib

Crates.ioturing-lib
lib.rsturing-lib
version2.1.6
sourcesrc
created_at2023-03-27 18:59:55.307132
updated_at2024-01-20 09:41:30.852323
descriptionTuring library for Rust
homepage
repositoryhttps://github.com/turing-marcos/turing-lib
max_upload_size
id822385
size76,759
Marcos GutiƩrrez Alonso (margual56)

documentation

README

Turing Machine Backend Library

A powerful and efficient Turing Machine backend library written in Rust! This library contains the essential components, compiler, and abstractions needed to create, run, and manage Turing Machines.

Demo

Check out the online demo (here is the code)

Features

  • Efficient Turing Machine implementation
  • Compiler for custom Turing Machine code
  • Abstractions to create and modify Turing Machines programmatically
  • Support for both deterministic and non-deterministic Turing Machines
  • Cross-platform compatibility

Installation

Add the following to your Cargo.toml file under [dependencies]:

turing_lib = "^2.1"

or

turing_lib = { git = "https://github.com/turing-marcos/turing-lib/" }

for the git version.

Then, run cargo build to download and compile the library.

Usage

To use the Turing Machine Backend Library in your Rust project, simply import it:

use turing_lib::TuringMachine;

fn main() {
    let unparsed_file = fs::read_to_string(&"./some_file").expect("cannot read file");

    let (tm, warnings) = match TuringMachine::new(&unparsed_file) {
        Ok(t) => t,
        Err(e: CompilerError) => {
            handle_error(e, file);
            std::process::exit(1);
        }
    };
}

Refer to the API documentation for detailed information on the available methods and structures.

Examples

You can find examples on how to use this library in the examples folder of this repository.

Contributing

We welcome contributions! Feel free to submit pull requests, issues, or suggestions. Please follow the contributing guidelines

Commit count: 13

cargo fmt