~sircmpwn/hello-mercury

6f16125fee5d7808c5d071a8a98e5afdc4f00266 — Drew DeVault 1 year, 7 months ago master
Initial commit
5 files changed, 52 insertions(+), 0 deletions(-)

A .gitignore
A COPYING
A Makefile
A README.md
A cmd/hello/main.ha
A  => .gitignore +3 -0
@@ 1,3 @@
/.boot.iso
/.isodir
/hello

A  => COPYING +19 -0
@@ 1,19 @@
Copyright (c) 2023 Drew DeVault

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

A  => Makefile +13 -0
@@ 1,13 @@
.POSIX:
.SUFFIXES:

TARGET=hello
include /usr/share/mercury/driver.mk

hello: cmd/hello/main.ha
	$(HARE) build $(HAREFLAGS) -o $@ $<

clean: mercury-clean
	rm -f hello

.PHONY: all clean

A  => README.md +12 -0
@@ 1,12 @@
# Hello Mercury!

This is a simple example driver built against the [Mercury][0] driver
environment for [Helios][1].

[0]: https://git.sr.ht/~sircmpwn/mercury
[1]: https://git.sr.ht/~sircmpwn/helios

## Usage

To build, use `make`. To build and run the demo in a virtual machine, use `make
run`. Press Ctrl+C to stop the virtual machine.

A  => cmd/hello/main.ha +5 -0
@@ 1,5 @@
use log;

export fn main() void = {
	log::println("Hello Mercury!");
};