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

Wasm support #767

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 3.6)
(lang dune 3.11)

(name eliom)
(maintainers [email protected])
Expand Down
2 changes: 1 addition & 1 deletion eliom.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "http://ocsigen.org/eliom/"
bug-reports: "https://github.com/ocsigen/eliom/issues"
depends: [
"dune" {>= "3.6"}
"dune" {>= "3.11"}
"ocaml" {>= "4.08.0"}
"ocamlfind"
"ppx_deriving"
Expand Down
4 changes: 3 additions & 1 deletion src/lib/client/dune
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
lwt_react ocsigenserver.baselib.base cohttp tyxml
reactiveData)
(foreign_stubs (language c) (names eliom_stubs))
(js_of_ocaml (javascript_files eliom_client.js)))
(js_of_ocaml
(javascript_files eliom_client.js)
(wasm_files eliom_client.wat)))

(include dune.client)

Expand Down
4 changes: 2 additions & 2 deletions src/lib/client/eliom_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//Provides: caml_unwrap_value_from_string
//Requires: caml_failwith, caml_marshal_constants
//Requires: caml_int64_float_of_bits, caml_int64_of_bytes, caml_new_string
//Requires: caml_jsbytes_of_string
//Requires: caml_jsbytes_of_string, caml_callback
var caml_unwrap_value_from_string = function (){
function StringReader (s, i) { this.s = caml_jsbytes_of_string(s); this.i = i; }
StringReader.prototype = {
Expand Down Expand Up @@ -222,7 +222,7 @@ var caml_unwrap_value_from_string = function (){
if (v[0] === 0 && size >= 2 &&
v[size] instanceof Array && v[size].length == 3 &&
v[size][2] === intern_obj_table[2] /*unwrap_mark*/) {
var unwrapped_v = apply_unwrapper(v[size], v);
var unwrapped_v = caml_callback(apply_unwrapper, [v[size], v]);
if (unwrapped_v === 0) {
// No unwrapper is registered, so replace the unwrap
// marker v[size] by a late_unwrap marker
Expand Down
Loading
Loading