Browse Source

first commit

master
zapashcanon 10 months ago
commit
a1dd6e7e0f
Signed by: zapashcanon GPG Key ID: 8981C3C62D1D28F1
8 changed files with 39 additions and 0 deletions
  1. +3
    -0
      .gitignore
  2. +8
    -0
      LICENSE.md
  3. +1
    -0
      dune-project
  4. +17
    -0
      src/dune
  5. +2
    -0
      src/jsexec.ml
  6. +3
    -0
      src/lib.ml
  7. +2
    -0
      src/mlexec.ml
  8. +3
    -0
      src/unix.js

+ 3
- 0
.gitignore View File

@ -0,0 +1,3 @@
_build
*.install
*.merlin

+ 8
- 0
LICENSE.md View File

@ -0,0 +1,8 @@
The ISC License (ISC)
=====================
Copyright © 2020, Léo Andrès
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

+ 1
- 0
dune-project View File

@ -0,0 +1 @@
(lang dune 2.4)

+ 17
- 0
src/dune View File

@ -0,0 +1,17 @@
(library
(name lib)
(modules lib)
(js_of_ocaml
(javascript_files unix.js))
(libraries unix))
(executable
(name mlexec)
(libraries lib)
(modules mlexec))
(executable
(name jsexec)
(libraries lib)
(modules jsexec)
(modes js))

+ 2
- 0
src/jsexec.ml View File

@ -0,0 +1,2 @@
let () =
Lib.f ()

+ 3
- 0
src/lib.ml View File

@ -0,0 +1,3 @@
let f () =
let res = Unix.times () in
Format.printf "got `%f`@." res.tms_stime

+ 2
- 0
src/mlexec.ml View File

@ -0,0 +1,2 @@
let () =
Lib.f ()

+ 3
- 0
src/unix.js View File

@ -0,0 +1,3 @@
function unix_times () {
return BLOCK(0, 0, 0, 0)
}

Loading…
Cancel
Save