| Crates.io | tibrs |
| lib.rs | tibrs |
| version | 0.1.3 |
| created_at | 2024-01-09 16:57:30.014865+00 |
| updated_at | 2024-04-17 19:02:30.65769+00 |
| description | Provides functionality to compile and decompile tibasic source for TI graphing calculators |
| homepage | https://github.com/erwijet/tibrs |
| repository | https://github.com/erwijet/tibrs |
| max_upload_size | |
| id | 1094226 |
| size | 72,457 |
A library and CLI for compimling and decompiling TI-BASIC to and from an 8xp outside of TI-CONNECT.
# add this crate to your project
$ cargo add tibrs
# install `tibc` binary
$ cargo install tibrs --bins
$ tibc --help # confirm installation
fn main() -> {
let source = fs::read_to_string("~/path/to/source.tib").unwrap();
let tokens: Vec<tibrs::TibToken> = tibrs::parse_str(source).unwrap();
let buf: Vec<u8> = compile(tokens, "DEMONAME".as_bytes()).unwrap();
fs::write("~/path/to/DEMONAME.8xp", buf).unwrap();
}
Note: when compiling 8xp files, tibc will infer the embedded PRGM var name from the first 8 letters of the outfile name, capitilized.
$ cargo install tibrs --bin tibc
# compile
$ tibc --compile --outfile DEMONAME.8xp source.tib
# decompile
$ tibc --decompile --outfile decomp.tib DEMONAME.8xp
This binary implementation was based off the highly useful Merthsoft TI Linkguide.