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

getting started clues? #1

Open
dckc opened this issue Mar 30, 2024 · 2 comments
Open

getting started clues? #1

dckc opened this issue Mar 30, 2024 · 2 comments

Comments

@dckc
Copy link

dckc commented Mar 30, 2024

Hi. I'm interested to try this out, but my working knowledge of ocaml tooling has faded.

Starting from a basic Ubuntu installation, how would I run the example in the README?

p.s. I'd actually prefer to start from nix, but I suspect that complicates things.

@talex5
Copy link
Contributor

talex5 commented Apr 2, 2024

Based on the old instructions at ocaml-multicore/eio#680 (comment), the example should build with:

git clone https://github.com/ocaml-multicore/eio_js.git
cd eio_js
opam install --deps-only -t .
opam install js_of_ocaml-ppx
dune build @default

The run a web-server (e.g. docker run --rm -it -p8080:80 -v (pwd)/_build/default/lib_js_of_ocaml_eio/examples/boulderdash/:/usr/share/nginx/html:ro nginx) and browse to http://localhost:8080.

For me, it then fails with runtime.caml_domain_dls_compare_and_set is not a function, but that's probably because I'm using a beta release of OCaml.

@dckc
Copy link
Author

dckc commented Apr 2, 2024

neglected to Activate the opam switch

the opam stuff worked, but I got...

$ dune build @default
Command 'dune' not found

ah...

$ eval $(opam env)

mdx not automatically installed?

next hiccup:

$ dune build @default
File "lib_eio_js_backend/tests/dune", line 1, characters 0-70:
1 | (mdx
2 |   (package eio_js_backend)
3 |   (deps
4 |     (package eio_js_backend)))
Error: Library "mdx.top" not found.
-> required by _build/default/lib_eio_js_backend/tests/mdx_gen.bc
-> required by alias lib_eio_js_backend/tests/all
-> required by alias lib_eio_js_backend/tests/default
File "lib_eio_js_backend/tests/dune", line 1, characters 0-70:
1 | (mdx
2 |   (package eio_js_backend)
3 |   (deps
4 |     (package eio_js_backend)))
Error: Program ocaml-mdx not found in the tree or in PATH
 (context: default)
Hint: opam install mdx
Warning: integer overflow: integer 0xe9846af9b1a615d (1051668233026429277) truncated to 0x9b1a615d (-1692769955); the generated code might be incorrect.
Warning: integer overflow: integer 0xe9846af9b1a615d (1051668233026429277) truncated to 0x9b1a615d (-1692769955); the generated code might be incorrect.

ok... let's try the opam install mdx hint... worked.

winning

image

image

Thanks!

IOU a PR to add something like this to the README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants