You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 12, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: BUILDING.md
+9-10
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,15 @@ There are two options to installing Xcode:
8
8
9
9
1. Use automatic provisioning. This is done by executing `make provision` in `maccore/tools/tom-swifty`, but it may take a while to download Xcode unless you're in the Boston office, in which case it might be better to download Xcode manually (next option).
10
10
11
-
2. Download Xcode manually from https://download.developer.apple.com/Developer_Tools/Xcode_9.2/Xcode_9.2.xip
11
+
2. Download Xcode manually from [https://download.developer.apple.com/Developer_Tools/Xcode_9.2/Xcode_9.2.xip](https://download.developer.apple.com/Developer_Tools/Xcode_9.2/Xcode_9.2.xip)
12
12
13
-
1. Extract and copy Xcode_9.2.xip to `/Applications/Xcode_9.2.app` (if you already have Xcode 9.2 in `/Applications/Xcode92.app`, you can just create a symlink: `ln -s /Applications/Xcode92.app /Applications/Xcode_9.2.app`)
1. Extract and copy Xcode_9.2.xip to `/Applications/Xcode_9.2.app` (if you already have Xcode 9.2 in `/Applications/Xcode92.app`, you can just create a symlink: `ln -s /Applications/Xcode92.app /Applications/Xcode_9.2.app`)
* there are other requirements (e.g. `cmake`, `ninja`) that I already have, most of them are likely needed to build `xamarin-macios`. It’s possible that I have some for others reasons too. Please update this document if you find any missing requirements.
19
19
20
-
21
20
## Building
22
21
23
22
Create a directory to dedicate to Binding Tools for Swift, e.g.
@@ -38,7 +37,7 @@ Build everything. This will build the swift dependency (only if needed [1]) and
38
37
toolchain is available in Azure, and if so, download and use that version.
39
38
This behavior can be overriden by doing `export FORCE_SWIFT_BUILD=1`.
40
39
41
-
### Notes
40
+
### Notes About Building
42
41
43
42
The above steps are doing a **full debug** build for swift. [build-script](https://github.com/xamarin/swift/blob/swift-4.0-branch-tomswifty/utils/build-script) can also produce different builds, e.g.
44
43
@@ -53,15 +52,15 @@ Running `build-script` takes a **very long** time, so building extraneous local
* The new (incompatible but much more powerful) NUnit 3 runner means using the usual `FIXTURES` variable has to use a [different syntax](https://github.com/nunit/docs/wiki/Test-Selection-Language). E.g. to run a single test case from the command line you would do
59
58
60
-
```
59
+
```shell
61
60
FIXTURES="--where=test=SwiftReflector.LinkageTests.TestMissingNSObject" make
62
61
```
63
62
64
-
65
63
## Generated Source Files
66
-
-`SwiftReflector/IOUtils/SwiftModuleList.g.cs` is generated via the `update_module_list.csharp` script.
Since the binding tools need to compile Swift wrappers that use some runtime glue, it needs a reference
65
+
Since the binding tools need to compile Swift wrappers that use some runtime glue, it needs a reference
66
66
67
67
A typical set of commands to generate bindings is:
68
68
@@ -82,11 +82,12 @@ The binding tools need the following to operate:
82
82
In addition, the tools can operator on separate `.swiftmodule` and `.dylib` files. This can be handled by using a `-M` argument for the `.swiftmodule` and `-L` for the library. It’s easier to use the `.framework` directory and a single `-C` argument.
83
83
84
84
## Building and Running Samples
85
+
85
86
Samples source code is in the `samples` directory, but will not build and run there.
86
87
Instead you need to make a packaged build, from the root of binding-tools-for-swift execute the command:
87
88
88
-
`make package`
89
-
89
+
make package
90
+
90
91
this will leave a directory inside of the directory `Pack-Man` named `binding-tools-for-swift` which contains buildable samples.
91
92
Most samples can be built by executing `make` in their directory. To try out a sample, do `make runit` for most of the samples.
Copy file name to clipboardExpand all lines: README.md
+3
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ In order to contribute to Binding-Tools-For-Swift, you will need Xcode 10.2 !
19
19
## Current Status
20
20
21
21
### What Binds?
22
+
22
23
- Classes
23
24
- Structs
24
25
- Enums
@@ -32,11 +33,13 @@ In order to contribute to Binding-Tools-For-Swift, you will need Xcode 10.2 !
32
33
- Extensions
33
34
34
35
### What Doesn’t Bind Yet?
36
+
35
37
- Protocols with associated types
36
38
- Bound generic types with closures
37
39
- Non-escaping closures
38
40
39
41
### What Else Can I Expect?
42
+
40
43
- An `open` class in Swift can be subclassed in C# and the subclass can be passed in to Swift. Overridden virtual methods in C# will be called when invoked from Swift.
41
44
- A C# type implementing an interface bound to a Swift protocol can be passed in to Swift. Methods and properties in the C# interface implementation will be called when invoked from Swift.
42
45
- At runtime, the generated code honors the Swift Automatic Reference Counting as well as .NET garbage collection.
0 commit comments