Developer Mode
Developer mode builds the Julia C++ wrapper from the sources in this repo under lib/cunumeric_jl_wrapper, instead of downloading a prebuilt cunumeric_jl_wrapper_jll. Use it when you change the wrapper or debug the C-API boundary.
When to use it
- You edited C++ or CxxWrap code under
lib/cunumeric_jl_wrapper/and need a new.so.
- You want faster edit-and-rebuild cycles on the wrapper without waiting on a JLL release.
Ordinary Julia-only changes under src/ do not require developer mode. Restart or re-using as usual.
Enable developer mode
From an environment that can load CNPreferences (the docs project or a development checkout of cuNumeric.jl):
using CNPreferences
CNPreferences.use_developer_mode()This builds the wrapper against the prebuilt cupynumeric_jll binary.
Preferences are written to LocalPreferences.toml. Restart Julia after changing the mode.
Rebuild the wrapper after changes
After editing files under lib/cunumeric_jl_wrapper/ (or after switching into developer mode for the first time):
using Pkg
Pkg.build("cuNumeric")That runs deps/build.jl, which in developer mode:
Resolves the prebuilt cuPyNumeric binary
Builds or updates the CxxWrap dependencies as needed
Compiles
lib/cunumeric_jl_wrapperviascripts/build_cpp_wrapper.shintolib/cunumeric_jl_wrapper/build/Points the package at that local library (artifact override)
Restart Julia to load the rebuilt shared library.
If the build fails, check CMake / g++ (C++20) / CUDA toolkit availability as described on Build Modes. Build logs from the helper scripts are written under deps/.
Recreating or moving the repository can leave a libcxxwrap CMake export in the Julia depot pointing at deleted headers. Pkg.build("cuNumeric") checks the exported header and library paths before reusing that build and rebuilds it when stale. It also records the Julia version and executable path: changing either forces a rebuild. Older builds without this Julia marker are rebuilt once. No manual checkout or depot cleanup is needed. The installer retains your manifest and developed JLL checkout, recreating only its generated override/ directory. Check deps/libcxxwrap_check.log, deps/libcxxwrap.log, and deps/libcxxwrap.err if this repair fails.
Typical edit loop
1. Edit lib/cunumeric_jl_wrapper/...
2. Pkg.build("cuNumeric")
3. Restart Julia
4. using cuNumericSwitch back to JLLs
When you no longer need a local wrapper:
using CNPreferences
CNPreferences.use_jll_binary()Restart Julia. You do not need Pkg.build for pure JLL mode (the build script exits early).
Related pages
Build Modes: prebuilt and developer wrapper modes
CNPreferences: preference defaults and function reference
Debugging: fusion and lifetime printers while developing
Internals: how fusion and
@acceleratework