Skip to content

petrSchreiber/thinbasic_rusty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thinbasic_rusty

Sample module template for ThinBASIC module in Rust to enable the community to create safe, high-performance extensions for our precious interpreter.

The main goal is to provide example showing how to reach for thinCore functions and some really minimal examples of module function implementation.

The thinCore interface is work in progress and not yet complete.

Let's get started

You will need Rust and thinBasic Core SDK to compile the module and ThinBASIC to call it.

Installing Rust

  • Download and install the Build Tools for Visual Studio.
  • Install Rust via Rustup. Please customize the installation to ensure 32 bit pipeline currently needed by ThinBASIC:
    • Run the rustup-init.exe
    • Press 2 to alter the default settings
    • For Default host triple? enter i686-pc-windows-msvc
    • For Default toolchain? enter stable
    • For Modify PATH variable? enter y
    • Proceed with installation with 1

Installing thinBasic Core SDK

Retrieving thinBasic Core SDK is as simple as cloning the thinBasic Core SDK. Once the API stabilises a bit, it will be available as crate from crates.io.

Installing ThinBASIC

A bit more basic indeed. Just download the installer of the bleeding edge version.

How to make the module?

  • Checkout this repo and GOTO root directory (where this README is).
  • Open console and run the cargo build --release command.
  • thinbasic_rusty.dll will appear in target/release

How to test the DLL?

  • Copy the dll to thinBasic/Mod directory
  • Run the script tests/test_module.tbasic.

IDE recommendations

I strongly recommend Sublime Text 3 for Rust editing. It is very elegant. Just boost it with rust-enhanced plugin.

For ThinBASIC, grab ThinAIR, which is part of the default installation. Made with love.

About

Sample module template for ThinBASIC module in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages