This commit is contained in:
xenia 2024-04-23 14:30:25 -04:00
parent 3d5b5aa245
commit 225eb9be6d
8 changed files with 24 additions and 7 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
export OCAMLRUNPARAM=b

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# bk910x
meow

View File

@ -1,4 +1,5 @@
(executable
(public_name bk910x)
(name main)
(libraries eio_main bk910x))
(preprocess (pps xlog.ppx))
(libraries bk910x eio_main xlog))

View File

@ -1,8 +1,17 @@
open Eio.Std
[%%xlog_import]
let () =
Xlog.init_pretty_writer stdout
~min_level:Xlog.DEBUG
let main ~env =
ignore env;
[%xlog info "meow meow meow"];
try
failwith "meow"
with e -> [%xlog exn e "oop's"]
let main out =
Eio.Flow.copy_string "Hello, world!\n" out
let () =
Eio_main.run @@ fun env ->
main (Eio.Stdenv.stdout env)
main ~env

1
lib/bk910x.ml Normal file
View File

@ -0,0 +1 @@
module Eio_serial = Eio_serial

View File

@ -1,3 +1,4 @@
(library
(name bk910x)
(libraries eio))
(public_name bk910x)
(libraries eio xlog))

0
lib/eio_serial.ml Normal file
View File

View File

@ -5,6 +5,7 @@
buildDunePackage,
eio,
eio_main,
xlog,
ocaml,
dune_3,
@ -29,7 +30,7 @@ in buildDunePackage rec {
minimalOCamlVersion = "5.1";
dontStrip = true;
propagatedBuildInputs = [ eio eio_main ];
propagatedBuildInputs = [ eio eio_main xlog ];
nativeBuildInputs = lib.optionals enableShell [
ocaml dune_3 odoc utop