OCAMLMKTOP(1)

✨ OCAMLMKTOP ✨

ok so real talk, this is the ocamlmktop(1) page from the General Commands Manual and it's basically the build-your-own-toplevel situation πŸ’… like you know how the OCaml toplevel is a thing? this lets you make your own one. obsessed.


πŸŽ€ NAME πŸŽ€

ocamlmktop β€” building custom toplevel systems, bestie. that's the whole vibe.


🌸 SYNOPSIS 🌸

ocamlmktop [ -v|-version|-vnum ] [ -cclib libname ] [ -ccopt option ] [
-custom ] [ -o exec-file ] [ -I lib-dir ] filename ...

like literally that's it, that's the whole incantation ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the ocamlmktop(1) command builds OCaml toplevels that contain user code preloaded at start-up. translation: you walk in, the toplevel already knows your stuff. no cap, it's giving "I brought my own code to the party" 🫢

the way it works: ocamlmktop(1) takes as argument a set of x.cmo and x.cma files, and links them with the object files that implement the OCaml toplevel. that's the main character energy right there πŸ‘‘

and if you pass the -custom flag, C object files and libraries (.o and .a files) can also be given on the command line, and they get linked in the resulting toplevel. highkey fancy πŸ’–


πŸ’… OPTIONS πŸ’…

these are the command-line options recognized by ocamlmktop(1). every single one, we're not skipping, periodt.

  • -v β€” print the version string of the compiler and exit. that's it, that's the whole job πŸŽ€
  • -vnum or -version β€” print the version number of the compiler in short form and exit. short queen behavior ⭐
  • -cclib -llibname β€” pass the -llibname option to the C linker when linking in "custom runtime" mode (see the corresponding option for ocamlc(1).). yes bestie, go read that page too, iykyk πŸ¦‹
  • -ccopt β€” pass the given option to the C compiler and linker, when linking in "custom runtime" mode. see the corresponding option for ocamlc(1). πŸ”₯
  • -custom β€” link in "custom runtime" mode. see the corresponding option for ocamlc(1). again!! go look πŸ‘€
  • -I directory β€” add the given directory to the list of directories searched for compiled interface files (.cmo and .cma). it's a whole search path moment 🌈
  • -o exec-file β€” specify the name of the toplevel file produced by the linker. the default is a.out, which is… the classic. the iconique default. if you don't name it, it's a.out. no notes πŸ’€

🧚 SEE ALSO 🧚

  • ocamlc(1) β€” like literally go read it, it's the sibling page and it has the deets on the "custom runtime" stuff mentioned above πŸ’œ

ok final vibe check: if you're linking in "custom runtime" mode, remember -cclib, -ccopt and -custom all point you back at ocamlc(1) for the real explanation. i'm not making up behavior, i'm just the messenger 🫢

🌸 and that's the page!! brought to you by OCAMLMKTOP(1) β€” General Commands Manual, same title up top, same title down at the bottom, we're consistent like that πŸ’– go build a toplevel, bestie, you're gonna slay βœ¨πŸŽ€

πŸ“¦ where this page comes from