Skip to content

Commit

Permalink
Use cargo workspace
Browse files Browse the repository at this point in the history
This also does some general build system cleanup.
  • Loading branch information
cmyr committed May 8, 2019
1 parent 35a0650 commit 074b820
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Cargo.lock
target

xi-modal-input/Cargo.lock
xi-modal-input/target

Expand Down
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[workspace]
members = [
"xi-modal-input",
"xi-ffi",
"playground-utils",
"playground-utils-ffi",
]
20 changes: 10 additions & 10 deletions RustPlayground/RustPlayground.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -67,7 +67,7 @@
dstPath = "";
dstSubfolderSpec = 16;
files = (
603B05992272068F00FBD7FC /* libximodal.a in CopyFiles */,
6009608C22837CF4001BE755 /* libximodal.a in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -77,7 +77,7 @@
dstPath = "";
dstSubfolderSpec = 16;
files = (
603B059B227206C200FBD7FC /* libplayground.a in CopyFiles */,
6009608A22837CD9001BE755 /* libplayground.a in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -86,10 +86,10 @@
/* Begin PBXFileReference section */
60096081227F81E4001BE755 /* SharePreferencesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharePreferencesViewController.swift; sourceTree = "<group>"; };
60096084227FA93E001BE755 /* Github.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Github.swift; sourceTree = "<group>"; };
6009608922837CD9001BE755 /* libplayground.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libplayground.a; path = ../target/libplayground.a; sourceTree = "<group>"; };
6009608B22837CF3001BE755 /* libximodal.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libximodal.a; path = ../target/libximodal.a; sourceTree = "<group>"; };
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 = "<group>"; };
603B05982272068F00FBD7FC /* libximodal.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libximodal.a; path = "../xi-ffi/target/libximodal.a"; sourceTree = "<group>"; };
603B059A227206C200FBD7FC /* libplayground.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libplayground.a; path = "../playground-utils-ffi/target/libplayground.a"; sourceTree = "<group>"; };
604B0F5F22405C88007038E6 /* XiCoreProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XiCoreProxy.swift; sourceTree = "<group>"; };
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 = "<group>"; };
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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;
Expand All @@ -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 */

Expand Down

0 comments on commit 074b820

Please sign in to comment.