Rename std lib to core module
This commit is contained in:
parent
6612431e0a
commit
ba20d75cd4
@ -4,7 +4,7 @@ include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
|||||||
|
|
||||||
use std::ffi::{c_char, c_int, c_void};
|
use std::ffi::{c_char, c_int, c_void};
|
||||||
|
|
||||||
// Based on Slang version 2024.14.3
|
// Based on Slang version 2024.14.5
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct ICastableVtable {
|
pub struct ICastableVtable {
|
||||||
@ -43,9 +43,9 @@ pub struct IGlobalSessionVtable {
|
|||||||
pub getSharedLibraryLoader: unsafe extern "C" fn(*mut c_void) -> *mut ISlangSharedLibraryLoader,
|
pub getSharedLibraryLoader: unsafe extern "C" fn(*mut c_void) -> *mut ISlangSharedLibraryLoader,
|
||||||
pub checkCompileTargetSupport: unsafe extern "C" fn(*mut c_void, target: SlangCompileTarget) -> SlangResult,
|
pub checkCompileTargetSupport: unsafe extern "C" fn(*mut c_void, target: SlangCompileTarget) -> SlangResult,
|
||||||
pub checkPassThroughSupport: unsafe extern "C" fn(*mut c_void, passThrough: SlangPassThrough) -> SlangResult,
|
pub checkPassThroughSupport: unsafe extern "C" fn(*mut c_void, passThrough: SlangPassThrough) -> SlangResult,
|
||||||
pub compileStdLib: unsafe extern "C" fn(*mut c_void, flags: slang_CompileStdLibFlags) -> SlangResult,
|
pub compileCoreModule: unsafe extern "C" fn(*mut c_void, flags: slang_CompileCoreModuleFlags) -> SlangResult,
|
||||||
pub loadStdLib: unsafe extern "C" fn(*mut c_void, stdLib: *const c_void, stdLibSizeInBytes: usize) -> SlangResult,
|
pub loadCoreModule: unsafe extern "C" fn(*mut c_void, coreModule: *const c_void, coreModuleSizeInBytes: usize) -> SlangResult,
|
||||||
pub saveStdLib: unsafe extern "C" fn(*mut c_void, archiveType: SlangArchiveType, outBlob: *mut *mut ISlangBlob) -> SlangResult,
|
pub saveCoreModule: unsafe extern "C" fn(*mut c_void, archiveType: SlangArchiveType, outBlob: *mut *mut ISlangBlob) -> SlangResult,
|
||||||
pub findCapability: unsafe extern "C" fn(*mut c_void, name: *const c_char) -> SlangCapabilityID,
|
pub findCapability: unsafe extern "C" fn(*mut c_void, name: *const c_char) -> SlangCapabilityID,
|
||||||
pub setDownstreamCompilerForTransition: unsafe extern "C" fn(*mut c_void, source: SlangCompileTarget, target: SlangCompileTarget, compiler: SlangPassThrough),
|
pub setDownstreamCompilerForTransition: unsafe extern "C" fn(*mut c_void, source: SlangCompileTarget, target: SlangCompileTarget, compiler: SlangPassThrough),
|
||||||
pub getDownstreamCompilerForTransition: unsafe extern "C" fn(*mut c_void, source: SlangCompileTarget, target: SlangCompileTarget) -> SlangPassThrough,
|
pub getDownstreamCompilerForTransition: unsafe extern "C" fn(*mut c_void, source: SlangCompileTarget, target: SlangCompileTarget) -> SlangPassThrough,
|
||||||
@ -109,6 +109,8 @@ pub struct IComponentTypeVtable {
|
|||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct IEntryPointVtable {
|
pub struct IEntryPointVtable {
|
||||||
pub _base: IComponentTypeVtable,
|
pub _base: IComponentTypeVtable,
|
||||||
|
|
||||||
|
pub getFunctionReflection: unsafe extern "C" fn(*mut c_void) -> *mut slang_FunctionReflection,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
@ -170,10 +170,10 @@ impl GlobalSession {
|
|||||||
)?)))
|
)?)))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new_without_std_lib() -> Option<GlobalSession> {
|
pub fn new_without_core_module() -> Option<GlobalSession> {
|
||||||
let mut global_session = null_mut();
|
let mut global_session = null_mut();
|
||||||
unsafe {
|
unsafe {
|
||||||
sys::slang_createGlobalSessionWithoutStdLib(
|
sys::slang_createGlobalSessionWithoutCoreModule(
|
||||||
sys::SLANG_API_VERSION as _,
|
sys::SLANG_API_VERSION as _,
|
||||||
&mut global_session,
|
&mut global_session,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user