Skip to content

🔥🐻 A complete Lua programming environment in Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

aleksanderwlodarczyk/torchbear

 
 

Repository files navigation

torchbear logo
This Project is Currently in Stealth Mode.
please do not post a news story until v1 is released very shortly.
thank you.

Travis Build Status Appveyor Build Status Dependencies torchbear Crate Download Total
Actively Maintained Contributions Welcome PRs Welcome License: MIT/Apache Chat

Torchbear gives you power of Rust with the simplicity of Lua. You can use it for web automation, embedded programming, data analysis, and anything else you can imagine.

You don't need to learn Rust to use Torchbear, and Lua is a very simple language. You can Learn in Lua 15 minutes. Below is a list of additional functionality in Torchbear, and you can also browse the bindings functions documentation, which is automatically generated using a Torchbear code map app.

Built-in Modules

Native

  • rlua completely safe Lua 5.3.5 with traceback error messages
  • Actix Web HTTP/1.x and HTTP/2.0 web servers and clients

Crypto

  • Libsodium cryptographic signing and verifying, and encrypting and decrypting
  • Blake2 cryptographic hash function written in pure Rust
  • Checksumdir compute deterministic hash of a directory

System

App

  • Tera Jinja template rendering
  • Comrak Markdown to HTML outputting
  • Tantivy schema building, document adding/updating/deleting, and searching
  • Git cloning, pulling, repo creation, staging, committing, and log access (builtin, no git dependency)

Strings

  • UUID-rs UUID generation and verification
  • ulid Universally Unique Lexicographically Sortable Identifier
  • Heck case conversions
  • regex matching and replacing
  • MIME type guessing

Text

  • Serde YAML and JSON serializing/deserializing
  • SCL simple, safe configuration language serializing/deserializing
  • Diff strings and files, and produce unidiff outputs
  • Patch text files with a unidiff input to get a second text output
  • Select-rs HTML scraping

Archive

  • Zip file decompression
  • Tar file decompression
  • xz lzma file decompression

Install

Torchbear comes as a single executable, making it very easy to install. Here's a simple command to install it:

 curl https://git.io/fpcV6 -sSfL | bash

Our installer gives you the latest version, which is also available on Torchbear's GitHub releases page, so you can download the zip file for your operating system and hardware architecture and unzip the executable wherever is most convenient for you. Our install script is much easier though; you can use it by copying and pasting that line into your terminal, then you'll be able to run torchbear in any of your apps.

What is a terminal?

If you haven't heard of a terminal before, here's a 1 min intro to what is a terminal window. On Windows, Android, and MacOS, we've tested with these tools that make a very nice user experience:

Windows: install Cmder Full.

Android: install Termux.

MacOS: comes mostly ready, but Homebrew has additional tools.

Uninstall

curl https://git.io/fpcV6 -sSfL | bash -s -- --uninstall

or, if you have install.sh already downloaded:

bash install.sh --uninstall

Examples

Hello World App

  • in init.lua

print("hello from Torchbear")

  • run torchbear

Simple Webserver · also supports TLS

Machu Picchu · general-purpose package manager

File Witness · code signing app

Gut · simple version control system

Lighttouch · application framework, for web development and much more

Lua Module Map · Rust/Lua code diagram visualization

Contributions wanted

Torchbear extends Rust's growing ecosystem of libraries. Developers are welcomed to make small changes as well as high impact contributions, like adding bindings. There are many examples to learn from in the bindings directory, each with an interesting history. You'll learn a Rust library's API inside and out, and you'll put another tool into the hands of a growing userbase.

If you just want to add a 'review', you're more than welcomed to do that too. Just add this "issue label" (type/review) and it won't get in anyone's way. This will help us understand Torchbear from your point of view.

About

🔥🐻 A complete Lua programming environment in Rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 94.3%
  • Shell 4.4%
  • Lua 1.2%
  • Dockerfile 0.1%