diff --git a/.gitignore b/.gitignore index 7562522..360a770 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +Cargo.lock +target + xi-modal-input/Cargo.lock xi-modal-input/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..802b197 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,7 @@ +[workspace] +members = [ + "xi-modal-input", + "xi-ffi", + "playground-utils", + "playground-utils-ffi", +] diff --git a/RustPlayground/RustPlayground.xcodeproj/project.pbxproj b/RustPlayground/RustPlayground.xcodeproj/project.pbxproj index 44b6cce..9e3df5d 100644 --- a/RustPlayground/RustPlayground.xcodeproj/project.pbxproj +++ b/RustPlayground/RustPlayground.xcodeproj/project.pbxproj @@ -9,9 +9,9 @@ /* Begin PBXBuildFile section */ 60096082227F81E4001BE755 /* SharePreferencesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60096081227F81E4001BE755 /* SharePreferencesViewController.swift */; }; 60096085227FA93E001BE755 /* Github.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60096084227FA93E001BE755 /* Github.swift */; }; + 6009608A22837CD9001BE755 /* libplayground.a in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6009608922837CD9001BE755 /* libplayground.a */; }; + 6009608C22837CF4001BE755 /* libximodal.a in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6009608B22837CF3001BE755 /* libximodal.a */; }; 6018ED18225FB15600B5DF38 /* Style.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6018ED17225FB15600B5DF38 /* Style.swift */; }; - 603B05992272068F00FBD7FC /* libximodal.a in CopyFiles */ = {isa = PBXBuildFile; fileRef = 603B05982272068F00FBD7FC /* libximodal.a */; }; - 603B059B227206C200FBD7FC /* libplayground.a in CopyFiles */ = {isa = PBXBuildFile; fileRef = 603B059A227206C200FBD7FC /* libplayground.a */; }; 603B059C2272413700FBD7FC /* libximodal.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 609A225F22404CF900A3F007 /* libximodal.a */; }; 604B0F6022405C88007038E6 /* XiCoreProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 604B0F5F22405C88007038E6 /* XiCoreProxy.swift */; }; 604C7ACC226E572C00F6B277 /* playground.h in Headers */ = {isa = PBXBuildFile; fileRef = 604C7ACB226E572C00F6B277 /* playground.h */; }; @@ -67,7 +67,7 @@ dstPath = ""; dstSubfolderSpec = 16; files = ( - 603B05992272068F00FBD7FC /* libximodal.a in CopyFiles */, + 6009608C22837CF4001BE755 /* libximodal.a in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -77,7 +77,7 @@ dstPath = ""; dstSubfolderSpec = 16; files = ( - 603B059B227206C200FBD7FC /* libplayground.a in CopyFiles */, + 6009608A22837CD9001BE755 /* libplayground.a in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -86,10 +86,10 @@ /* Begin PBXFileReference section */ 60096081227F81E4001BE755 /* SharePreferencesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharePreferencesViewController.swift; sourceTree = ""; }; 60096084227FA93E001BE755 /* Github.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Github.swift; sourceTree = ""; }; + 6009608922837CD9001BE755 /* libplayground.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libplayground.a; path = ../target/libplayground.a; sourceTree = ""; }; + 6009608B22837CF3001BE755 /* libximodal.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libximodal.a; path = ../target/libximodal.a; sourceTree = ""; }; 6018ED17225FB15600B5DF38 /* Style.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Style.swift; path = RustPlayground/Style.swift; sourceTree = SOURCE_ROOT; }; 603608D2224EC693002CEAC6 /* xicore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xicore.h; path = "../xi-ffi/xicore.h"; sourceTree = ""; }; - 603B05982272068F00FBD7FC /* libximodal.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libximodal.a; path = "../xi-ffi/target/libximodal.a"; sourceTree = ""; }; - 603B059A227206C200FBD7FC /* libplayground.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libplayground.a; path = "../playground-utils-ffi/target/libplayground.a"; sourceTree = ""; }; 604B0F5F22405C88007038E6 /* XiCoreProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XiCoreProxy.swift; sourceTree = ""; }; 604C7AC7226E56DC00F6B277 /* libplayground.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libplayground.a; sourceTree = BUILT_PRODUCTS_DIR; }; 604C7ACB226E572C00F6B277 /* playground.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = playground.h; path = "../playground-utils-ffi/playground.h"; sourceTree = ""; }; @@ -166,11 +166,11 @@ 606644DE223FFED7006215A0 = { isa = PBXGroup; children = ( + 6009608B22837CF3001BE755 /* libximodal.a */, + 6009608922837CD9001BE755 /* libplayground.a */, 606644E9223FFED7006215A0 /* RustPlayground */, 606644FC223FFED9006215A0 /* ModalInputTestTests */, 606644E8223FFED7006215A0 /* Products */, - 603B05982272068F00FBD7FC /* libximodal.a */, - 603B059A227206C200FBD7FC /* libplayground.a */, 609A2269224052B000A3F007 /* ModalInputTest-Bridging-Header.h */, 604C7ACB226E572C00F6B277 /* playground.h */, 609A22662240504100A3F007 /* libximodal.h */, @@ -415,7 +415,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# When building from Xcode we want to ensure that `cargo` is in PATH.\n# as a convenience, add the default cargo install location\nexport PATH=\"$PATH:${HOME}/.cargo/bin\"\n\nset -e\n\nif [[ $CONFIGURATION = \"Debug\" ]]; then\nRUST_CONFIGURATION=\"debug\"\nRUST_CONFIGURATION_FLAG=\"\"\nelse\nRUST_CONFIGURATION=\"release\"\nRUST_CONFIGURATION_FLAG=\"--release\"\nfi\n\nCRATE_ROOT=\"${SRCROOT}/../playground-utils-ffi\"\nOUTDIR=\"$CRATE_ROOT/target/\"\nPRODUCT_NAME=\"libplayground.a\"\n\ncd \"${CRATE_ROOT}\"\n\necho \"building ${CRATE_ROOT}, conf ${RUST_CONFIGURATION}, action ${ACTION}\"\n\nif [[ ${ACTION:-build} = \"build\" || $ACTION = \"install\" ]]; then\ncargo build $RUST_CONFIGURATION_FLAG\ncp \"${OUTDIR}/${RUST_CONFIGURATION}/${PRODUCT_NAME}\" \"${OUTDIR}/${PRODUCT_NAME}\"\nfi\n\nset +e\n"; + shellScript = "# When building from Xcode we want to ensure that `cargo` is in PATH.\n# as a convenience, add the default cargo install location\nexport PATH=\"$PATH:${HOME}/.cargo/bin\"\n\nset -e\n\nif [[ $CONFIGURATION = \"Debug\" ]]; then\nRUST_CONFIGURATION=\"debug\"\nRUST_CONFIGURATION_FLAG=\"\"\nelse\nRUST_CONFIGURATION=\"release\"\nRUST_CONFIGURATION_FLAG=\"--release\"\nfi\n\nCRATE_ROOT=\"${SRCROOT}/../playground-utils-ffi\"\nOUTDIR=\"${SRCROOT}/../target/\"\nPRODUCT_NAME=\"libplayground.a\"\n\ncd \"${CRATE_ROOT}\"\n\necho \"building ${CRATE_ROOT}, conf ${RUST_CONFIGURATION}, action ${ACTION}\"\n\nif [[ ${ACTION:-build} = \"build\" || $ACTION = \"install\" ]]; then\ncargo build $RUST_CONFIGURATION_FLAG\ncp \"${OUTDIR}/${RUST_CONFIGURATION}/${PRODUCT_NAME}\" \"${OUTDIR}/${PRODUCT_NAME}\"\nfi\n\nset +e\n"; }; 609A226322404D0D00A3F007 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -432,7 +432,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# When building from Xcode we want to ensure that `cargo` is in PATH.\n# as a convenience, add the default cargo install location\nexport PATH=\"$PATH:${HOME}/.cargo/bin\"\n\nset -e\n\nif [[ $CONFIGURATION = \"Debug\" ]]; then\nRUST_CONFIGURATION=\"debug\"\nRUST_CONFIGURATION_FLAG=\"\"\nelse\nRUST_CONFIGURATION=\"release\"\nRUST_CONFIGURATION_FLAG=\"--release\"\nfi\n\nCRATE_ROOT=\"${SRCROOT}/../xi-ffi\"\nOUTDIR=\"$CRATE_ROOT/target/\"\nPRODUCT_NAME=\"libximodal.a\"\n\ncd \"${CRATE_ROOT}\"\n\necho \"building ${CRATE_ROOT}, conf ${RUST_CONFIGURATION}, action ${ACTION}\"\n\nif [[ ${ACTION:-build} = \"build\" || $ACTION = \"install\" ]]; then\ncargo build $RUST_CONFIGURATION_FLAG\ncp \"${OUTDIR}/${RUST_CONFIGURATION}/${PRODUCT_NAME}\" \"${OUTDIR}/${PRODUCT_NAME}\"\nfi\n\nset +e\n"; + shellScript = "# When building from Xcode we want to ensure that `cargo` is in PATH.\n# as a convenience, add the default cargo install location\nexport PATH=\"$PATH:${HOME}/.cargo/bin\"\n\nset -e\n\nif [[ $CONFIGURATION = \"Debug\" ]]; then\nRUST_CONFIGURATION=\"debug\"\nRUST_CONFIGURATION_FLAG=\"\"\nelse\nRUST_CONFIGURATION=\"release\"\nRUST_CONFIGURATION_FLAG=\"--release\"\nfi\n\nCRATE_ROOT=\"${SRCROOT}/../xi-ffi\"\nOUTDIR=\"${SRCROOT}/../target/\"\nPRODUCT_NAME=\"libximodal.a\"\n\ncd \"${CRATE_ROOT}\"\n\necho \"building ${CRATE_ROOT}, conf ${RUST_CONFIGURATION}, action ${ACTION}\"\n\nif [[ ${ACTION:-build} = \"build\" || $ACTION = \"install\" ]]; then\ncargo build $RUST_CONFIGURATION_FLAG\ncp \"${OUTDIR}/${RUST_CONFIGURATION}/${PRODUCT_NAME}\" \"${OUTDIR}/${PRODUCT_NAME}\"\nfi\n\nset +e\n"; }; /* End PBXShellScriptBuildPhase section */