Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use ocaml modern build system #16

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ml-proto/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_build
main.native

setup.data
setup.log
5 changes: 5 additions & 0 deletions ml-proto/.merlin
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PKG bigarray

S src

B _build/src
11 changes: 11 additions & 0 deletions ml-proto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ ocamlbuild -libs bigarray main.native

and get an executable named `src/main.native`.

#### Optional: Oasis

If you have oasis installed, either via `opam` or [built from source](http://oasis.forge.ocamlcore.org/), in the base directory (`ml-proto`) you can run:

```
oasis setup
```

And it will automatically generate the necessary build files, etc.

Add (experimental) dependencies as you normally would, by including them in the `BuildDepends` section, but do not push back these changes to the `_oasis` file please. See [this tutorial](https://ocaml.org/learn/tutorials/setting_up_with_oasis.html) on how to use oasis for fun and adventure.

### Building on Windows

Expand Down
21 changes: 21 additions & 0 deletions ml-proto/_oasis
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
OASISFormat: 0.4
Name: ml-proto
Version: 0.1
Synopsis: This repository implements a prototypical reference interpreter
for WebAssembly
Description: It is written for clarity and simplicity, not speed (although it should be reasonably fast). Hopefully, it can be useful as a playground for trying out ideas and a device for nailing down the exact semantics. For that purpose, the code is written in a fairly declarative, "speccy" way.
Authors: WebAssembly Authors
License: Apache-2.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am assuming license stated here is for WebAssembly? Is it Apache 2?

Plugins: META (0.4), DevFiles (0.4)

Executable "wasm"
Path: src
BuildTools: ocamlbuild
MainIs: main.ml
CompiledObject: best
BuildDepends:
bigarray

Test "all-tests"
Command: ./runtests.py