File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -890,7 +890,9 @@ module Memory = struct
890890end
891891
892892module Constant = struct
893- let string_length_threshold = 100
893+ (* dune-build-info use a 64-byte placeholder. This ensures that such
894+ strings are encoded as a sequence of bytes in the wasm module. *)
895+ let string_length_threshold = 64
894896
895897 let store_in_global ?(name = " const" ) c =
896898 let name = Code.Var. fresh_n name in
@@ -991,7 +993,7 @@ module Constant = struct
991993 return (Const_named (" str_" ^ s), W. StructNew (ty, [ GlobalGet (V x) ]))
992994 | String s ->
993995 let * ty = Type. string_type in
994- if String. length s > string_length_threshold
996+ if String. length s > = string_length_threshold
995997 then
996998 let name = Code.Var. fresh_n " string" in
997999 let * () = register_data_segment name ~active: false [ DataBytes s ] in
You can’t perform that action at this time.
0 commit comments