Skip to content

std/jule/build

Index

Variables
fn IsStdHeaderPath(p: str): bool
fn IsValidHeaderExt(ext: str): bool
fn IsValidCppExt(ext: str): bool
fn PathStdlib(): str
fn PathExec(): str
fn PathWd(): str
fn PathAPI(): str
fn SetEnv(exec: str, wd: str)
fn IsJule(path: str): bool

Variables

jule
static CppHeaderExts: [...]str = [ ... ]

Valid extensions of C++ headers.


jule
static CppExts: [...]str = [ ... ]

Valid extensions of C++ source files.


jule
static ObjectiveCppExts: [...]str = [ ... ]

Valid extensions of Objective-C++ source files.


jule
static mut OS = runtime::OS

Target operating system. Set to runtime operating system by default.


jule
static mut Arch = runtime::Arch

Target architecture. Set to runtime architecture by default.


jule
const Api = "api"

Directory name of Jule C++ API.


jule
const Stdlib = "std"

Directory name of standard library.

IsStdHeaderPath

jule
fn IsStdHeaderPath(p: str): bool

Reports whether path is C++ std library path.

IsValidHeaderExt

jule
fn IsValidHeaderExt(ext: str): bool

Reports whether C++ header extension is valid.

IsValidCppExt

jule
fn IsValidCppExt(ext: str): bool

Reports whether C++ extension is valid.

PathStdlib

jule
fn PathStdlib(): str

Returns path of standard library. Returns empty string if not initialized by [SetEnv].

PathExec

jule
fn PathExec(): str

Returns path of compiler's executable file. Returns empty string if not initialized by [SetEnv].

PathWd

jule
fn PathWd(): str

Returns path of working directory. Returns empty string if not initialized by [SetEnv].

PathAPI

jule
fn PathAPI(): str

Returns path of main API header file. Returns empty string if not initialized by [SetEnv].

SetEnv

jule
fn SetEnv(exec: str, wd: str)

Sets the environment variables of the compiler. The exec should hold the path of the compiler's executable path. The wd should hold the path of working directory. SetEnv panics is exec or wd is empty and will not check if paths are exist and appropriate for compiler. Therefore, any misinformation for environment variables may cause analysis issues.

SetEnv is a mandatory call if you need to use package sema. Because semantic analysis and all relevant behavior relies to environment variables. Therefore, there might be analysis issues if environment variables will not be initialized before.

IsJule

jule
fn IsJule(path: str): bool

Reports whether file path is Jule source code.