oxcaml
БесплатноБез исполняемых скриптовНе проверенWorking with the OxCaml extensions to OCaml. Use when the oxcaml compiler is available and you need high-performance, unboxing, stack allocation…
от avsm★ 41 звезда на GitHubОб этом скилле
You are writing code for the OxCaml compiler, a performance-focused fork of OCaml with Jane Street extensions. This guide covers OxCaml-specific features only; standard OCaml is assumed.
Current target: OxCaml 5.4.0-ox9 — oxcaml-compiler.5.4.0-ox9
/ ocaml-variants.5.4.0+ox, on the OCaml 5.4 base
(ocamlopt -version prints 5.4.0+ox for every ox release; the exact
check is opam var oxcaml-compiler:release). The previous target was
5.2.0minus-39 (OCaml 5.2 base).
Migrating a project from minus-39? Follow MIGRATION-39-ox9.md: step-by-step guide, error-message lookup table, before/after code checked on both compilers, forms that build on both.
Change history, newest first: CHANGES-39-ox9.md
(5.2.0minus-39 → 5.4.0-ox9: minus-40, the upstream OCaml 5.4
merge, ox1 … ox9), CHANGES-38-39.md,
CHANGES-31-38.md,
CHANGES-25-31.md,
CHANGES-23-25.md.
Quick Upgrade Flags (minus-39 → ox9)
When a build fails after a bump from minus-39, check these first (most common first; the fix for each and an ordered checklist are in MIGRATION-39-ox9.md):
int64#,int32#,nativeint#,float32#are gone →int64_u,int32_u,nativeint_u,float32_u("The type int64 has no unboxed version. Hint: Did you mean int64_u?"). Literals (#42L),float#/int8#/int#/…, and"%…#…"primitive names are unchanged.int64_u box≠int64.- Rebuild everything, ppx rewriters and tools included (magic numbers
578 → 586); Jane Street libraries move to
v0.18~preview.133.03+642. effectis a keyword → rename identifiers or pass-keywords 5.2.- Tooling gaps: no odoc for ox9 (
dune build @doccannot work);ocamlformat 0.29.0+oxrejects aversion = …line in.ocamlformatand cannot parse| effectpatterns,overwrite_orval poly_; on arm64ocaml_simdneeds aCPATHworkaround to install (MIGRATION-39-ox9.md step 0). fst p/snd pon a local pair in tail position is an error: bind the result, add[@nontail], or useexclave_(section 2).type ('a : any) t = { x : 'a }needs-extension layouts_beta(minus-39 silently narrowed the annotation).- All-void constructors (
A of unit#) need[@immediate_all_void_constructor]. - New default-on warnings: 181
imprecise-kind-annotation, 183/184 kind modifiers, 220redundant-modality(@@ global aliased,mutable f : t @@ aliased); 211 renamedmod-by-top→redundant-modifier(use-211); 189 → 75. Effect.performraises anunsafe_effectsalert → useEffect.Safe.perform.{ t with … }may not implicitly copy an[@atomic]field.- Integer literals at max+1 (
128s,32768S,9223372036854775808L, …) are errors — they used to wrap to the minimum. compiler-libs.commonwas split: addcompiler-libs.frontendforPath/Types/Env/Typedtree/….- SIMD load/store primitives on
float arrayremoved; AVX-512 types need-extension simd_beta. - Runtime 4 retired:
--disable-runtime5is a configure error. - Error messages no longer double-quote identifiers in uncoloured output (matters when grepping compiler output or comparing against older docs) and many were reworded → re-promote expect tests.
- C stubs:
caml_failure_exnremoved (usecaml_exception_failure_value);caml_callback_res/caml_resultsupersede the_exnvariants (which still compile).
Detailed Guides
| Feature | Guide |
|---|---|
| Modes (local, unique, once, portable, contended) | SKILL-MODES.md |
| Stack Allocation (local_, stack_, exclave_) | SKILL-STACK-ALLOCATION.md |
| Unboxed Types (float#, int64_u, mixed blocks) | SKILL-UNBOXED.md |
| Kinds (value, float64, bits32, kind products) | SKILL-KINDS.md |
| Uniqueness (unique/aliased, once/many) | SKILL-UNIQUENESS.md |
| Comprehensions (list/array builders) | SKILL-COMPREHENSIONS.md |
| SIMD (vector types, SSE/AVX intrinsics) | SKILL-SIMD.md |
| Templates (ppx_template, mangling) | SKILL-TEMPLATES.md |
| Zero-Alloc ([@zero_alloc] checking) | SKILL-ZERO-ALLOC.md |
| Base Library (OxCaml extensions) | SKILL-BASE.md |
| Core Library (OxCaml extensions) | SKILL-CORE.md |
1. Modes
Modes track runtime properties of values. Each mode axis is independent.
| Axis | Values | Default | Purpose |
|---|---|---|---|
| Locality | local, global |
global |
Where value lives (stack vs heap) |
| Uniqueness | unique, aliased |
aliased |
Number of references |
| Linearity | once, many |
many |
How often closures can be called |
| Portability | portable, corruptible, `share |
Установить oxcaml в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл oxcaml?
Working with the OxCaml extensions to OCaml. Use when the oxcaml compiler is available and you need high-performance, unboxing, stack allocation, data-race-free parallelism
Как установить скилл oxcaml?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл oxcaml запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic