Skip to content
← Back

src/driver/requirements.ghul

1
namespace Driver is
2
// The oldest ghul-core, ghul-runtime and ghul-llvm releases this
3
// compiler works with, as build/requirements.json declares them, for
4
// `--requirements`.
5
class REQUIREMENTS is
6
@IF.dotnet()
7
text: string static is
8
let assembly = System.Reflection.Assembly.get_executing_assembly()
9
let stream = assembly.get_manifest_resource_stream("requirements.json")
10
11
assert stream? else "the requirements are not embedded in the compiler"
12
13
let use reader = IO.StreamReader(stream)
14
15
return reader.read_to_end()
16
si
17
18
@IF.not.dotnet()
19
text: string static => NATIVE_BUILD.requirements
20
si
21
si