first commit
This commit is contained in:
commit
e2c095af41
34 changed files with 667 additions and 0 deletions
8
swift/MySwiftClass.swift
Normal file
8
swift/MySwiftClass.swift
Normal file
|
@ -0,0 +1,8 @@
|
|||
// swift/MySwiftClass.swift
|
||||
import Foundation
|
||||
|
||||
@_silgen_name("swift_function")
|
||||
func swiftFunction() -> Int32 {
|
||||
print("Swift function called")
|
||||
return 42
|
||||
}
|
9
swift/SwiftModule.abi.json
Normal file
9
swift/SwiftModule.abi.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ABIRoot": {
|
||||
"kind": "Root",
|
||||
"name": "TopLevel",
|
||||
"printedName": "TopLevel",
|
||||
"json_format_version": 8
|
||||
},
|
||||
"ConstValues": []
|
||||
}
|
15
swift/SwiftModule.h
Normal file
15
swift/SwiftModule.h
Normal 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
BIN
swift/SwiftModule.swiftdoc
Normal file
Binary file not shown.
BIN
swift/SwiftModule.swiftmodule
Normal file
BIN
swift/SwiftModule.swiftmodule
Normal file
Binary file not shown.
BIN
swift/SwiftModule.swiftsourceinfo
Normal file
BIN
swift/SwiftModule.swiftsourceinfo
Normal file
Binary file not shown.
BIN
swift/libSwiftModule.dylib
Executable file
BIN
swift/libSwiftModule.dylib
Executable file
Binary file not shown.
4
swift/module.modulemap
Normal file
4
swift/module.modulemap
Normal file
|
@ -0,0 +1,4 @@
|
|||
module SwiftModule {
|
||||
header "SwiftModule.h"
|
||||
export *
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue