this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Copy cmis from OCaml install when building.

+27 -20
+11 -1
example/stdlib/dune
··· 1 1 (copy_files 2 2 (alias all-js) 3 3 (mode (promote (until-clean))) 4 - (files ../../src/worker/static/stdlib/*)) 4 + (files %{ocaml-config:standard_library}/*.cmi)) 5 + 6 + (copy_files 7 + (alias all-js) 8 + (mode (promote (until-clean))) 9 + (files %{ocaml-config:standard_library}/unix/*.cmi)) 10 + 11 + (copy_files 12 + (alias all-js) 13 + (mode (promote (until-clean))) 14 + (files %{ocaml-config:standard_library}/str/*.cmi))
+6 -2
src/worker/static/dune
··· 11 11 12 12 (rule 13 13 (target static_files.ml) 14 - (deps (glob_files stdlib/*.cmi)) 15 - (action (run ocaml %{dep:gen_static.ml}))) 14 + (deps 15 + (glob_files %{ocaml-config:standard_library}/*.cmi) 16 + (glob_files %{ocaml-config:standard_library}/unix/*.cmi) 17 + (glob_files %{ocaml-config:standard_library}/str/*.cmi)) 18 + (action (run ocaml %{dep:gen_static.ml} %{deps}))) 19 +
+10 -17
src/worker/static/gen_static.ml
··· 1 1 #use "topfind" ;; 2 2 #require "unix";; 3 3 4 - 5 - let rec iter_cmi ~f dir_handle = 6 - match Unix.readdir dir_handle with 7 - | exception End_of_file -> () 8 - | file -> 9 - if Filename.extension file = ".cmi" then 10 - f file; 11 - iter_cmi ~f dir_handle 12 - 13 4 let () = 14 - let cwd = Unix.getcwd () in 15 - let stdlib = Filename.concat cwd "stdlib" in 16 5 let out = open_out "static_files.ml" in 17 6 18 7 Printf.fprintf out "open Protocol\nlet stdlib_cmis = ["; 19 - let dir = Unix.opendir stdlib in 20 - iter_cmi ~f:(fun file -> 21 - let fullpath = Filename.concat stdlib file in 22 - let module_name = Filename.basename file |> String.capitalize_ascii |> Filename.remove_extension in 23 - Printf.fprintf out "{sc_name=%S; sc_content=[%%blob %S]};" module_name fullpath) dir; 24 - Printf.fprintf out "]\n"; 8 + for i = 1 to Array.length Sys.argv - 1 do 9 + let fullpath = Sys.argv.(i) in 10 + let module_name = 11 + Filename.basename fullpath 12 + |> String.capitalize_ascii 13 + |> Filename.remove_extension 14 + in 15 + Printf.fprintf out "{sc_name=%S; sc_content=[%%blob %S]};" module_name fullpath 16 + done; 17 + Printf.fprintf out "]\n"; 25 18 26 19 close_out out
src/worker/static/stdlib/arith_status.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/event.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/std_exit.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Arg.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Array.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__ArrayLabels.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Atomic.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Bigarray.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Bool.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Buffer.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Bytes.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__BytesLabels.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Callback.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Char.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Complex.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Condition.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Digest.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Domain.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Dynarray.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Effect.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Either.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Ephemeron.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Filename.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Float.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Format.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Fun.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Gc.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Genlex.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Hashtbl.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__In_channel.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Int.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Int32.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Int64.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Lazy.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Lexing.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__List.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__ListLabels.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Map.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Marshal.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__MoreLabels.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Mutex.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Nativeint.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Obj.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Oo.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Option.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Out_channel.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Parsing.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Pervasives.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Printexc.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Printf.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Queue.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Random.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Result.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Scanf.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Semaphore.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Seq.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Set.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Stack.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__StdLabels.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Stream.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__String.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__StringLabels.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Sys.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Type.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Uchar.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Unit.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/stdlib__Weak.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/str.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/thread.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/topdirs.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/unix.cmi

This is a binary file and will not be displayed.

src/worker/static/stdlib/unixLabels.cmi

This is a binary file and will not be displayed.