Basic (pun intended) example of interop between ThinBASIC and Rust via DLL to enable the community to create safe, high-performance extensions for our precious interpreter.
The main goal is to provide examples of passing of various ThinBASIC data types to and back from Rust.
You will need Rust, to compile the DLL and ThinBASIC to call it.
- 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
A bit more basic indeed. Just download the installer of the bleeding edge version.
- Checkout this repo and GOTO root directory (where this README is).
- Fire up a console and cast the spell
cargo build --release
. - You will hear a wolf howl and the DLL will appear in
target/release
Run the script test/test_lib.tbasic.
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.