|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://raw.githubusercontent.com/oracle/graal/master/docs/reference-manual/native-image/assets/foreign-config-schema-v0.1.0.json", |
| 4 | + "properties": { |
| 5 | + "downcalls": { |
| 6 | + "default": [], |
| 7 | + "items": { |
| 8 | + "properties": { |
| 9 | + "returnType": { |
| 10 | + "type": "string", |
| 11 | + "title": "A memory layout definition (allows canonical layouts; see 'java.lang.foreign.Linker')" |
| 12 | + }, |
| 13 | + "parameterTypes": { |
| 14 | + "default": [], |
| 15 | + "items": { |
| 16 | + "type": "string", |
| 17 | + "title": "A memory layout definition (allows canonical layouts; see 'java.lang.foreign.Linker')" |
| 18 | + }, |
| 19 | + "type": "array", |
| 20 | + "title": "List of the function descriptor's parameter types " |
| 21 | + }, |
| 22 | + "options": { |
| 23 | + "type": "object", |
| 24 | + "title": "Linker options (see 'java.lang.foreign.Linker.Option')", |
| 25 | + "properties": { |
| 26 | + "captureCallState": { |
| 27 | + "type": "boolean", |
| 28 | + "title": "Specifies if a call state should be captured. Which states to capture is determined at run time. See also: 'java.lang.foreign.Linker.Option.captureCallState'" |
| 29 | + }, |
| 30 | + "critical": { |
| 31 | + "type": ["boolean", "object"], |
| 32 | + "title": "see 'java.lang.foreign.Linker.Option.critical'", |
| 33 | + "properties": { |
| 34 | + "allowHeapAccess": { |
| 35 | + "type": "boolean" |
| 36 | + } |
| 37 | + }, |
| 38 | + "additionalProperties": false |
| 39 | + }, |
| 40 | + "firstVariadicArg": { |
| 41 | + "type": "integer", |
| 42 | + "title": "see 'java.lang.foreign.Linker.Option.firstVariadicArg'" |
| 43 | + } |
| 44 | + }, |
| 45 | + "additionalProperties": false |
| 46 | + } |
| 47 | + }, |
| 48 | + "additionalProperties": false, |
| 49 | + "type": "object", |
| 50 | + "title": "A function descriptor to be registered for a downcall" |
| 51 | + }, |
| 52 | + "type": "array", |
| 53 | + "title": "List of function descriptors that should be registered for downcalls" |
| 54 | + }, |
| 55 | + "upcalls": { |
| 56 | + "default": [], |
| 57 | + "items": { |
| 58 | + "properties": { |
| 59 | + "returnType": { |
| 60 | + "type": "string", |
| 61 | + "title": "A memory layout definition (allows canonical layouts; see 'java.lang.foreign.Linker')" |
| 62 | + }, |
| 63 | + "parameterTypes": { |
| 64 | + "default": [], |
| 65 | + "items": { |
| 66 | + "type": "string", |
| 67 | + "title": "A memory layout definition (allows canonical layouts; see 'java.lang.foreign.Linker')" |
| 68 | + }, |
| 69 | + "type": "array", |
| 70 | + "title": "List of the function descriptor's parameter types " |
| 71 | + }, |
| 72 | + "options": { |
| 73 | + "type": "object", |
| 74 | + "title": "Linker options (see 'java.lang.foreign.Linker.Option')", |
| 75 | + "description": "Currently, no linker options are allowed for upcalls. This may change in future.", |
| 76 | + "properties": { }, |
| 77 | + "additionalProperties": false |
| 78 | + } |
| 79 | + }, |
| 80 | + "additionalProperties": false, |
| 81 | + "type": "object", |
| 82 | + "title": "A function descriptor to be registered for an upcall" |
| 83 | + }, |
| 84 | + "type": "array", |
| 85 | + "title": "List of function descriptors that should be registered for upcalls" |
| 86 | + }, |
| 87 | + "directUpcalls": { |
| 88 | + "default": [], |
| 89 | + "items": { |
| 90 | + "properties": { |
| 91 | + "class": { |
| 92 | + "type": "string", |
| 93 | + "title": "Full-qualified class name (e.g. 'org.package.OuterClass$InnerClass')" |
| 94 | + }, |
| 95 | + "method": { |
| 96 | + "type": "string", |
| 97 | + "title": "Method name" |
| 98 | + }, |
| 99 | + "returnType": { |
| 100 | + "type": "string", |
| 101 | + "title": "A memory layout definition (allows canonical layouts; see 'java.lang.foreign.Linker')" |
| 102 | + }, |
| 103 | + "parameterTypes": { |
| 104 | + "default": [], |
| 105 | + "items": { |
| 106 | + "type": "string", |
| 107 | + "title": "A memory layout definition (allows canonical layouts; see 'java.lang.foreign.Linker')" |
| 108 | + }, |
| 109 | + "type": "array", |
| 110 | + "title": "List of the function descriptor's parameter types " |
| 111 | + }, |
| 112 | + "options": { |
| 113 | + "type": "object", |
| 114 | + "title": "Linker options (see 'java.lang.foreign.Linker.Option')", |
| 115 | + "description": "Currently, no linker options are allowed for direct upcalls. This may change in future.", |
| 116 | + "properties": { }, |
| 117 | + "additionalProperties": false |
| 118 | + } |
| 119 | + }, |
| 120 | + "additionalProperties": false, |
| 121 | + "type": "object", |
| 122 | + "title": "A Java method and function descriptor to be registered for a direct upcall" |
| 123 | + }, |
| 124 | + "type": "array", |
| 125 | + "title": "List of Java methods and function descriptors that should be registered for direct upcalls" |
| 126 | + } |
| 127 | + }, |
| 128 | + "type": "object", |
| 129 | + "additionalProperties": false, |
| 130 | + "title": "JSON schema for the FFM API configuration that GraalVM Native Image uses", |
| 131 | + "description": "A description and examples for writing an FFM API configuration can be found at https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/ForeignInterface.md" |
| 132 | +} |
0 commit comments