Skip to content

ramate-io/fuste

Repository files navigation

Robles

A pluggable virtual machine for constrained environments.

Fuste

Fuste is a programmability adapter and virtual machine stack designed for integration with Robles, Ramate's implementation of BFA protocols.

Note

Currently, Fuste implements only the RV32I ISA. Since Fuste is intended as a programmability stack and does not ultimately have general opinions about the ISA, we may choose to implement other ISAs as Fuste virtual machines in the future.

Getting started

  1. Review the programs in the tests/toolchain workspace before you begin writing your own.
  2. Ensure you have built fubox and that is available on your PATH.
  3. Configure a workspace with the desired env/fuste crates.
  4. Configure the toolchain similar to tests/toolchain. You can change the memory layout in the linker script if you like.
  5. Write your program:
#![no_std]
#![no_main]
use fuste::println;

pub fn add(a: u32, b: u32) -> u32 {
	a + b
}

fuste::entry! {
	fn main() -> Result<(), ()> {
		let mut j = 0;
		for i in 0..10 {
			assert_eq!(i, i);
			j += i;
			j = add(j, i);
			println!("Hello, world!");
			println!("i: {}, j: {}", i, j);
		}

		Ok(())
	}
}
  1. Run!
cargo run --target riscv32i-ramate-fuste-elf.json -p my-fuste-program

Environment

env/fuste provides the following:

  • fuste-ecall for defining basic ecall interrupt APIs with an implementing machine.
  • fuste-exit for defining program termination interrupts.
  • fuste-write for making one-way writes to a system. println! is implemented using fuste-write.
  • fuste-channel for opening a kernel channel with a stack-allocated buffer. Network requests are implemented using fuste-channel.
  • fuste includes all of the above for those who want a complete stack-based set of symbols.
  • fuste-galloc defines a global heap allocator for those interested in writing heap programs. It is not in fuste because--owing to the highly constrained targets for the virtual machine--purely stack-based programs are preferred.

fubox currently implements a debugging form of the fuste environment.

Contributing

Task Description
Upcoming Events High-priority event issues with planned completion dates.
Release Candidates Feature-complete versions linked to events.
Features & Bugs High-priority feature and bug issues.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published