first commit

This commit is contained in:
aOK 2024-08-19 13:52:05 +03:00
commit e2c095af41
34 changed files with 667 additions and 0 deletions

8
swift/MySwiftClass.swift Normal file
View file

@ -0,0 +1,8 @@
// swift/MySwiftClass.swift
import Foundation
@_silgen_name("swift_function")
func swiftFunction() -> Int32 {
print("Swift function called")
return 42
}

View file

@ -0,0 +1,9 @@
{
"ABIRoot": {
"kind": "Root",
"name": "TopLevel",
"printedName": "TopLevel",
"json_format_version": 8
},
"ConstValues": []
}

15
swift/SwiftModule.h Normal file
View file

@ -0,0 +1,15 @@
// swift/SwiftModule.h
#ifndef SWIFT_MODULE_H
#define SWIFT_MODULE_H
#ifdef __cplusplus
extern "C" {
#endif
int32_t swiftFunction();
#ifdef __cplusplus
}
#endif
#endif // SWIFT_MODULE_H

BIN
swift/SwiftModule.swiftdoc Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
swift/libSwiftModule.dylib Executable file

Binary file not shown.

4
swift/module.modulemap Normal file
View file

@ -0,0 +1,4 @@
module SwiftModule {
header "SwiftModule.h"
export *
}