working mozart2 hello world

This commit is contained in:
2025-08-20 14:53:16 +02:00
commit f7922a4996
6 changed files with 67 additions and 0 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

7
Makefile Normal file
View File

@@ -0,0 +1,7 @@
build:
ozc -c $(OZ_SRC)
run:
make build
echo "make: built successfully"
ozengine $(OZ_SRC)f

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1755615617,
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

24
flake.nix Normal file
View File

@@ -0,0 +1,24 @@
{
description = "mozart2 for writing oz";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [
mozart2-binary
];
shellHook = ''
echo "enjoy m*oz*art2"
'';
};
};
}

8
main.oz Normal file
View File

@@ -0,0 +1,8 @@
functor
import
System
Application
define
{System.show 'hello world'}
{Application.exit 0}
end

BIN
main.ozf Normal file

Binary file not shown.