

Posts tagged with :github:














bin_creator
program (part of Rusty-Man Computer) by letting it accept multi-line input, because that's the format you get when you copy memory data from the online LMC simulator. This should make it much more convenient to use (previously, you had to manually remove the newlines). This involved learning how to get the last two digits of a string in Rust, which is a bit more involved than it sounds (I got away with line.chars().rev().take(2).collect::<String>()
)
I also wrote a script (build_binaries.sh
) to use cross
to cross-compile my code for 3 different target platforms, and then copy the generated binaries into a single folder to make them easy to upload to GH Releases.
Naturally, I used that script to publish my first release that contains pre-compiled binaries for multiple platforms, which you can read about at github.com/RandomSearch18/rusty_man_computer/releases/tag/v0.4.0
Next, I want to start work on an assembler tool to add to the project :D






cross
(Github) to compile the code for various platforms. (Of course, users can still run the Rust compiler themselves if they wish.) This is an important step for distributing my program and making it accessible to more people.
I also added 14 more tests to the code, which test that each individual instruction works correctly. This should make it easy to pin down any regressions during development in the future.



cross
, working towards perhaps releasing a stable version. But for now, it's 7pm, and I should really be revising for my Physics mock tomorrow morning. Cya!














clap
crate, and used it to implement a new --output-only
option that should help make the emulator more suitable for practical purposes. I also set up a Github Action to automatically build my code every time I commit/merge to master
, so I know that my code compiles.
I published today's changes as v0.3.0. Tomorrow, I want to write some tests for the program :)



Vec<[char; 4]>
, toyed with the idea of a Vec<String>
, before deciding to go back to a simple String
and only split it into lines when rendering the output. A challenge came from trying to work out how the LMC simulator decides when to insert a line break: numbers on their own are always on their own line, but numbers with some letters after them all end up on the same line... but if I just print a 1
and a Space a bunch of times, there's a new line in between each iteration...
I'm still trying to wrap my head around the logic for those line breaks, so I haven't finished "fixing" my output-printing code, but the work-in progress commit is on GitHub.


