Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
22c48ce
Rename user-facing source files: remove eliom_ prefix
balat Mar 27, 2026
798f5e7
Update all references to use new module names
balat Mar 27, 2026
cae9310
Add Eliom wrapper module and update dune configuration
balat Mar 27, 2026
b0cc253
Add eliom.compat.server and eliom.compat.client libraries
balat Mar 27, 2026
9d94bbd
Modernize app.exe template
balat Mar 27, 2026
a4156c7
Migrate app.lib and basic.ppx templates to new module names
balat Mar 27, 2026
dc644ea
Update api.odocl, indexdoc, filelist and _tags for renamed modules
balat Mar 27, 2026
0966a74
Use Content.Html.T as Tools.Make parameter
balat Apr 30, 2026
c5900b5
Format ppx_eliom_utils.ml
balat Mar 27, 2026
fe4db0f
Wrap eliom modules under the Eliom.X namespace
balat Mar 27, 2026
0096118
Rename Eliom_client_value to Client_value
balat Mar 28, 2026
6e901f1
Rename Eliom_syntax to Syntax
balat Mar 28, 2026
6786aeb
Fix PPX client to use eliom_expr for Eliom_client_core references
balat Mar 28, 2026
3175bb7
Rename Eliom_client_core to Client_core
balat Mar 28, 2026
cd74a18
Use check_internal() accessor consistently in ppx_eliom_utils
balat Mar 28, 2026
ccf6ff7
Fix client PPX: use eliom_expr for get_injection to support wrapped m…
balat Mar 28, 2026
a6a67f0
Update Eliom.run references to Eliom.App.run in docs and templates
balat Mar 28, 2026
f7fb090
Move eliom-compat to a separate opam package
balat May 29, 2026
4d23021
ocamlbuild build: pass -internal to PPX invocations
balat May 29, 2026
784c10c
api.odocl: update module names
balat May 29, 2026
f5c8b4f
Replace ocamlbuild with shell script for wikidoc generation
balat May 29, 2026
a3b5ade
Remove eliom.ocamlbuild plugin and legacy build system
balat Mar 28, 2026
3ad310a
Add -internal-prefix flag to PPX for wrapped dependent libraries
balat Mar 28, 2026
9721cf1
.gitignore: ignore local untracked files; track eliom.opam.template
balat Mar 28, 2026
3637699
Rename Eliom_common to Common
balat Mar 28, 2026
aefc4aa
Rename all internal modules: remove eliom_/eliommod_ prefixes
balat Mar 31, 2026
ea1ee7e
Update indexdoc files with new module names
balat Mar 31, 2026
59e7aee
Run dune fmt
balat Mar 31, 2026
497dc81
Migrate to wrapped ocsigenserver module names
balat Apr 9, 2026
56d7836
Move sources into Eliom/ subdir for (include_subdirs qualified)
balat Apr 9, 2026
7e35977
Install distillery templates at lib/eliom/templates/<name>/
balat Apr 30, 2026
9203fda
Fix is_site_available: require non-empty sitedata stack during init
balat Apr 30, 2026
dc48eba
CHANGES: document the modernize work for 13.0
balat Apr 30, 2026
884e7f8
Common: rename Eliom_* exceptions to short forms
balat Apr 30, 2026
756cd25
Use short exception names internally in Common
balat Apr 30, 2026
f820a50
Update mli doc references to short exception name
balat Apr 30, 2026
d9fee2c
README: document make wikidoc workflow
balat May 1, 2026
2e2999e
Bump version to 13.0.0
balat May 29, 2026
ea25239
Update README Getting started example to new Eliom.Xxx namespace
balat May 29, 2026
5e67b34
Mark version as 13.0~dev (pre-release)
balat May 29, 2026
4eab42e
doc: update manual references to the new Eliom.Xxx module names
balat Jun 22, 2026
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ src/**/*.odocl
ocsigen.org-data

_opam

# Local files (not part of the project)
AGENTS*.md
instructions
2026-*.md
69 changes: 61 additions & 8 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,16 +1,69 @@
===== dev =====
* Compatibility with OCaml 5.5
(Outcometree's Otyp_object replaced open_row with a row field, and out_type
gained Otyp_external and Otyp_functor)
* Compatibility with js_of_ocaml 6.4
(getElementsByTagName now returns a Dom.collection, and Dom_html gained a
`listener` value that shadowed a local binding)
===== 13.0~dev =====
* Module namespace modernization
** Public modules are now accessed as Eliom.Service, Eliom.Content,
Eliom.Parameter, Eliom.Registration, Eliom.Client, ... instead of
the legacy flat Eliom_xxx prefix. Implemented with
(include_subdirs qualified) + (wrapped false) in dune.
** Eliom_common is now Eliom.Common; most internal modules lost
their eliom_/eliommod_ prefix as well (Content_core, Mod_main,
Mod_pagegen, ...). A few names are kept as-is for conflict
reasons (Eliom_form, Eliom_lazy, Eliom_react, Eliom_uri).
** New eliom-compat opam package: provides the legacy Eliom_xxx
module names as include-aliases of the new Eliom.Xxx modules,
to ease migration of existing code.
** BREAKING: Eliom.run is now Eliom.App.run (the auto-generated
wrapper module cannot contain val declarations).
* Eliom.Content.Html.T
** New named module type for the Tyxml HTML signature shared by F
and D, with Eliom's LINKS_AND_FORMS extensions. Use it as the
parameter signature of functors that need to abstract over the
F/D choice, instead of [module type of Content.Html.F]. The
latter triggers an OCaml strengthening bug in wrapped libraries.
Tools.Make, Ot.Icons.Make and the os_template Make functor all
use it.
* Distillery template install path
** Eliom's three templates (app.exe, app.lib, basic.ppx) are now
installed at lib/eliom/templates/<name>/ via the standard dune
(install (section lib_root) ... (with_prefix ...)) pattern.
Third-party packages (e.g. ocsigen-start) that ship templates
are expected to install at the same location.
* Build system
** Migrated to wrapped ocsigenserver module names (Ocsigen.Server,
Ocsigen.Extensions, Ocsigen.Request, Ocsigen.Response,
Ocsigen.Config, Ocsigen_base.Lib, Ocsigen_http.Header, ...).
** PPX gained -internal and -internal-prefix flags for compiling
wrapped libraries.
** Removed the eliom.ocamlbuild plugin and the legacy topkg/pkg
build artifacts. API documentation is now generated by
build/gen_wikidoc.sh (ocamldoc + wikidoc, no ocamlbuild
dependency); run via [make wikidoc].
* Exception renames
** Common.Eliom_site_information_not_available is now
Common.Site_information_not_available, Common.Eliom_do_redirection
is now Common.Do_redirection, and Common.Eliom_do_half_xhr_redirection
is now Common.Do_half_xhr_redirection. The old names are kept as
backwards-compatible aliases (exception X = Y).
** The internal client exception
Request_info.Eliom_no_raw_post_data_on_client was renamed to
No_raw_post_data_on_client (no alias kept, as it was not exposed).
* Bug fixes
** Syntax.is_site_available now checks that the sitedata stack is
actually non-empty during initialisation, instead of just
relying on Ocsigen.Extensions.during_initialisation. Fixes a
crash on startup
(Eliom_site_information_not_available "get_current_sitedata")
exposed by the new module link order: PPX-inserted top-level
close_server_section calls in extension-linked .eliom files
(Service_base, Content, Tools, ...) now correctly route their
compilation-unit data into !global_data when no site is active,
matching the design intent stated in the comment on
get_global_data.

===== 12.0 =====
* Eliom_lib
** Deprecated logging functions were removed (#821)
These are: debug_exn, debug, error, error_any, jsdebug
* Full WASM support: build system and sending either js or wasm depending on the browser
* Full WASM support: build system and sending either js or wasm depending on the browser
* Use Log instead of Lwt_logs

===== 11.1 =====
Expand Down
35 changes: 5 additions & 30 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,41 +1,16 @@
### Building
BEST=$(if $(shell command -v ocamlopt 2> /dev/null),native,byte)
BUILDER=_build/build/build.$(BEST)

.PHONY: all
all:
dune build

### Doc
.PHONY: doc wikidoc doc man alldoc
DOCS_DIR=src/lib/client src/lib/server src/ocamlbuild src/ppx
DOCS_HTML=$(addsuffix /api.docdir/index.html,$(DOCS_DIR))
DOCS_WIKI=$(addsuffix /api.wikidocdir/index.wiki,$(DOCS_DIR))
DOCS_MAN= src/lib/client/api.mandocdir/man.3oc \
src/lib/server/api.mandocdir/man.3os \
src/ocamlbuild/api.mandocdir/man.3o \
src/ppx/api.mandocdir/man.3o
.PHONY: wikidoc doccp
API_DIR=_build/doc/dev/api
doc: $(BUILDER)
$(BUILDER) $(DOCS_HTML)
wikidoc: $(BUILDER)
$(BUILDER) $(DOCS_WIKI)
man: $(BUILDER)
$(BUILDER) $(DOCS_MAN)
alldoc: man wikidoc doc

doccp: alldoc
mkdir -p $(API_DIR)/server $(API_DIR)/client $(API_DIR)/ocamlbuild $(API_DIR)/ppx
cp -Rf _build/src/lib/server/api.wikidocdir/*.wiki $(API_DIR)/server/
cp -Rf _build/src/lib/client/api.wikidocdir/*.wiki $(API_DIR)/client/
cp -Rf _build/src/ocamlbuild/api.wikidocdir/*.wiki $(API_DIR)/ocamlbuild/
cp -Rf _build/src/ppx/api.wikidocdir/*.wiki $(API_DIR)/ppx/
cp -Rf doc/index.wiki $(API_DIR)/
wikidoc:
bash build/gen_wikidoc.sh all

$(BUILDER): $(wildcard build/*.ml)
ocamlbuild -no-plugin -I src/ocamlbuild -no-links -use-ocamlfind build/build.$(BEST) 1> /dev/null
ocaml pkg/build.ml manpage=false native=true native-dynlink=true
builder: $(BUILDER)
doccp: wikidoc
cp -Rf doc/index.wiki $(API_DIR)/

### Cleaning ###
.PHONY: clean distclean
Expand Down
25 changes: 0 additions & 25 deletions README.build

This file was deleted.

48 changes: 33 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ Defining a service on path `/foo`, taking any GET parameters:

```ocaml
let myservice =
Eliom_service.create
~path:(Eliom_service.Path ["foo"])
~meth:(Eliom_service.Get (Eliom_parameter.any))
Eliom.Service.create
~path:(Eliom.Service.Path ["foo"])
~meth:(Eliom.Service.Get (Eliom.Parameter.any))
()

let () =
Eliom_registration.Html.register ~service:myservice
Eliom.Registration.Html.register ~service:myservice
(fun get_params () ->
Lwt.return
Eliom_content.Html.F.(html (head (title (txt "")))
Eliom.Content.Html.F.(html (head (title (txt "")))
(body [h1 [txt "Hello"]])))
```

Inserting a link towards that service, with parameters:

```ocaml
Eliom_content.Html.D.a ~service:myservice [txt "Home"] [("param1", "v1"); ("param2", "v2")]
Eliom.Content.Html.D.a ~service:myservice [txt "Home"] [("param1", "v1"); ("param2", "v2")]
```

Event handlers are written in OCaml:
Expand Down Expand Up @@ -90,29 +90,47 @@ let%client () =
Saving session data on the server using Eliom references:

```ocaml
let%server r = Eliom_reference.eref ~scope:Eliom_common.default_session_scope 0
let%server r = Eliom.Reference.eref ~scope:Eliom.Common.default_session_scope 0

let%server f () =
let%lwt v = Eliom_reference.get r in
Eliom_reference.set r (v + 1);
let%lwt v = Eliom.Reference.get r in
Eliom.Reference.set r (v + 1);
...

```
Where scope can be:
* `Eliom_common.default_session_scope` (different value for each browser),
* `Eliom_common.default_process_scope` (different value for each tab),
* `Eliom_common.default_group_scope` (different value for each user),
* `Eliom_common.site_scope` (value for the whole site),
* `Eliom_common.global_scope` (global value for the whole server).
* `Eliom.Common.default_session_scope` (different value for each browser),
* `Eliom.Common.default_process_scope` (different value for each tab),
* `Eliom.Common.default_group_scope` (different value for each user),
* `Eliom.Common.site_scope` (value for the whole site),
* `Eliom.Common.global_scope` (global value for the whole server).
Eliom references are persistant if you add optional parameter `~persistent`
to function `Eliom_reference.eref`.
to function `Eliom.Reference.eref`.

## Learning Eliom

More documentation [here](https://ocsigen.org/tuto/latest/manual/basics).

Write your first Web and mobile application with Eliom using [Ocsigen Start](https://ocsigen.org/ocsigen-start)

## Generating API documentation

Wiki API pages are generated from the `.mli` files using `ocamldoc`
and the [wikidoc](https://github.com/ocsigen/wikidoc) plugin:

```
make wikidoc
```

Output goes to `_build/doc/dev/api/{server,client}/`.

The wiki files are published on the [wikidoc branch] under
`doc/dev/api/{server,client}/`. To update the published documentation,
copy the generated `.wiki` files to a checkout of the `wikidoc` branch
and commit.

[wikidoc branch]: https://github.com/ocsigen/eliom/tree/wikidoc/doc/dev/api

## Authors

* Vincent Balat
Expand Down
1 change: 0 additions & 1 deletion _tags

This file was deleted.

1 change: 0 additions & 1 deletion build/_tags

This file was deleted.

96 changes: 0 additions & 96 deletions build/build.ml

This file was deleted.

Loading