Skip to main content

Crate inline_java_core

Crate inline_java_core 

Source
Expand description

Core runtime support for inline_java.

This crate is an implementation detail of inline_java_macros. End users should depend on inline_java instead of this crate directly.

Public items:

  • JavaError — error type returned by run_java and by the java! / java_fn! macros at program runtime.
  • run_java — compile (if needed) and run a generated Java class.
  • expand_java_args — shell-expand an option string into individual args.
  • cache_dir — compute the deterministic temp-dir path for a Java class.
  • detect_java_version — probe javac -version and return the major version.

Enums§

JavaError
All errors that java! and java_fn! can return at runtime (and that ct_java! maps to compile_error! diagnostics at build time).

Functions§

base_cache_dir
Resolve the root directory used to cache compiled .class files.
cache_dir
Compute the deterministic cache-dir path used to store compiled .class files.
detect_java_version
Detect the installed Java major version by running javac -version.
expand_java_args
Shell-expand raw (expanding env vars and ~), then split into individual arguments (respecting quotes). Returns an empty vec if raw is empty.
run_java
Compile (if needed) and run a generated Java class, returning raw stdout bytes.