The purpose of this project is to show how Rust can talk with PowerBASIC generated DLLs.
You will need PowerBASIC for Windows version 10.04 to compile the DLL and Rust to call it.
- If you are interested in this repo, you probably already have PowerBASIC for Windows.
- 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 PowerBASIC:
- 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
- Open
pblib/pblib.basin PBEdit and press Ctrl+M - If you think it did nothing, it did - PowerBASIC is really a blazingly fast compiler
- The DLL will be automagically put to
pblib-test/target/releaseaspblib.dll
- Go to
pblib-testdirectory - Execute
cargo run --releasein the root directory of this repo - go to
pblib-test/target/releaseand runpblib-test.exe
I strongly recommend Sublime Text 3 for Rust editing. It is very elegant. Just boost it with rust-enhanced plugin.