Skip to content
Merged
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
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM alpine:3.21 AS build
# Install system dependencies
RUN apk -U upgrade --no-cache && apk add --no-cache \
# to download and install Dune Developer Preview with alpine:3.21
build-base patch tar ca-certificates git rsync curl sudo bash \
libx11-dev nano coreutils xz \
build-base patch tar ca-certificates git \
libx11-dev coreutils xz curl bash \
autoconf \
curl-dev \
gmp-dev \
Expand All @@ -13,10 +13,12 @@ RUN apk -U upgrade --no-cache && apk add --no-cache \
oniguruma-dev \
openssl-dev

# Install Dune Developer Preview
RUN curl -fsSL https://get.dune.build/install | sh
RUN /bin/bash -c 'source "/root/.local/share/dune/env/env.bash"'
ADD https://get.dune.build/2025-07-17/x86_64-unknown-linux-musl/dune-2025-07-17-x86_64-unknown-linux-musl.tar.gz .
RUN tar xzf dune-2025-07-17-x86_64-unknown-linux-musl.tar.gz
RUN mkdir -p /root/.local/bin \
&& mv dune-2025-07-17-x86_64-unknown-linux-musl/dune /root/.local/bin/
ENV PATH="/root/.local/bin:$PATH"
RUN dune --version

# Build project
WORKDIR "/root/ocaml.org"
Expand Down
6 changes: 4 additions & 2 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ cd OCaml.org

Ensure you have [Dune Developer Preview](https://preview.dune.build) installed. Dune will manage the OCaml compiler along with all of the OCaml packages needed to build and run the project. By this point, we should all be using some Unix-like system (Linux, macOS, WSL2). We assume you are using the most recent version of Dune Developer Preview.

If you would like to build using Dune installed via `opam`, make sure to remove the `dune.lock/` directories and use the same build commands present in the Makefile, skipping `dune pkg lock`.

### Running the Server

From the root of your project, you can just build and run the project with

```
```bash
make start
```

Expand Down Expand Up @@ -110,7 +112,7 @@ before they get merged.

OCaml.org is using an pinned version of `opam-repository`. This is intended to protect the build from upstream regressions. The opam repository is specified in one place:

```
```bash
dune-workspace
```

Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fmt: ## Format the codebase with ocamlformat
dune build --root . --auto-promote @fmt

.PHONY: watch
watch: ## Watch for the filesystem and rebuild on every change
watch: dune.lock ## Watch for the filesystem and rebuild on every change
dune build @run -w --force --no-buffer

.PHONY: utop
Expand All @@ -49,8 +49,9 @@ utop: ## Run a REPL and link with the project's libraries

.PHONY: scrape_ocaml_planet
scrape_ocaml_planet: dune.lock ## Generate the po files
dune build --root . tool/ood-gen/bin/scrape.exe planet
dune build --root . tool/ood-gen/bin/scrape.exe video
dune build --root . tool/ood-gen/bin/scrape.exe
dune exec --root . tool/ood-gen/bin/scrape.exe planet
dune exec --root . tool/ood-gen/bin/scrape.exe video

.PHONY: scrape_changelog
scrape_changelog:
Expand Down
2 changes: 1 addition & 1 deletion playground/asset/merlin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion playground/asset/worker.min.js

Large diffs are not rendered by default.