Skip to content

v0.3.0

Compare
Choose a tag to compare
@vascocosta vascocosta released this 13 Apr 12:16
· 14 commits to main since this release

Changes:

  • Add emulator command
  • Add add command
  • Refactor into a library crate

This is an important release which adds significant new features and marks a major refactoring of the code.

The emulator command allows to easily run an instance of the fab-agon-emulator to test the current code in your project. After generating the final BASIC file with bargo build, you can now run bargo emu. Behind the scenes bargo will copy your BASIC program into the emulator folder (set in Bargo.toml), generate a special autoexec.txt in the emulator and spawn an instance of the emulator that runs your code.

The add command allows to easily add a dependency to Bargo.toml. As previously, you can manually edit Bargo.toml and update your dependencies, but now you can also simply run bargo add my_dep.bas. Obviously don't forget to actually create src/my_dep.bas.

At last, but definitely not the least, I've made some considerable refactoring work, to move most of the code into a library crate alongside bargo's binary crate. This one concerns only Rust users out there who might consider using this crate in their own projects. This library crate provides the BargoCommand trait, defining common behaviour for all the commands I'm creating. Anyone wishing to extend bargo with new commands can implement this trait. Additionally there's a Config type to handle Bargo.toml.