├── .gitattributes ├── .gitignore ├── 1 - Presentation ├── 소프트웨어 마에스트로 특강 - Rust 크로스 플랫폼 프로그래밍.pdf ├── 소프트웨어 마에스트로 특강 - Rust 프로그래밍 기초.pdf └── 소프트웨어 마에스트로 특강 - Rust로 알고리즘 문제 풀어보기.pdf ├── 2 - Example └── 3 - Rust Cross Platform Development │ ├── Cargo.toml │ ├── example-ios │ └── infcon-2022 │ │ ├── Shared │ │ ├── Assets.xcassets │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── ContentView.swift │ │ ├── RustCross.swift │ │ ├── infcon-bridge-header.h │ │ └── infcon_2022App.swift │ │ ├── infcon-2022.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── infcon-2022.xcscheme │ │ └── macOS │ │ └── macOS.entitlements │ ├── example-web │ ├── bootstrap.ts │ ├── index.html │ ├── index.ts │ ├── package-lock.json │ ├── package.json │ ├── tsconfig.json │ └── webpack.config.js │ ├── rust-cross-ios │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ └── rust-cross-ios.h │ ├── rust-cross-web │ ├── Cargo.toml │ └── src │ │ └── lib.rs │ └── rust-cross │ ├── Cargo.toml │ └── src │ └── lib.rs ├── LICENSE └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | /**/example-ios/** linguist-vendored 2 | /**/example-web/** linguist-vendored 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | **/target/ 4 | 5 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries 6 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html 7 | Cargo.lock 8 | 9 | # These are backup files generated by rustfmt 10 | **/*.rs.bk 11 | 12 | # Added by IntelliJ Rust 13 | .idea 14 | *.iml 15 | .gradle 16 | out/ 17 | build/ 18 | build-cache 19 | gen/ 20 | deps/ 21 | exampleProject 22 | testData 23 | .DS_Store 24 | /pretty_printers_tests/target 25 | /native-helper/target 26 | 27 | # Xcode 28 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 29 | 30 | ## User settings 31 | xcuserdata/ 32 | 33 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 34 | *.xcscmblueprint 35 | *.xccheckout 36 | 37 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 38 | build/ 39 | DerivedData/ 40 | *.moved-aside 41 | *.pbxuser 42 | !default.pbxuser 43 | *.mode1v3 44 | !default.mode1v3 45 | *.mode2v3 46 | !default.mode2v3 47 | *.perspectivev3 48 | !default.perspectivev3 49 | 50 | ## Obj-C/Swift specific 51 | *.hmap 52 | 53 | ## App packaging 54 | *.ipa 55 | *.dSYM.zip 56 | *.dSYM 57 | 58 | ## Playgrounds 59 | timeline.xctimeline 60 | playground.xcworkspace 61 | 62 | # Swift Package Manager 63 | # 64 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 65 | # Packages/ 66 | # Package.pins 67 | # Package.resolved 68 | # *.xcodeproj 69 | # 70 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 71 | # hence it is not needed unless you have added a package configuration file to your project 72 | # .swiftpm 73 | 74 | .build/ 75 | 76 | # CocoaPods 77 | # 78 | # We recommend against adding the Pods directory to your .gitignore. However 79 | # you should judge for yourself, the pros and cons are mentioned at: 80 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 81 | # 82 | # Pods/ 83 | # 84 | # Add this line if you want to avoid checking in source code from the Xcode workspace 85 | # *.xcworkspace 86 | 87 | # Carthage 88 | # 89 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 90 | # Carthage/Checkouts 91 | 92 | Carthage/Build/ 93 | 94 | # Accio dependency management 95 | Dependencies/ 96 | .accio/ 97 | 98 | # fastlane 99 | # 100 | # It is recommended to not store the screenshots in the git repo. 101 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 102 | # For more information about the recommended setup visit: 103 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 104 | 105 | fastlane/report.xml 106 | fastlane/Preview.html 107 | fastlane/screenshots/**/*.png 108 | fastlane/test_output 109 | 110 | # Code Injection 111 | # 112 | # After new code Injection tools there's a generated folder /iOSInjectionProject 113 | # https://github.com/johnno1962/injectionforxcode 114 | 115 | iOSInjectionProject/ 116 | 117 | # TypeScript 118 | node_modules/ 119 | dist/ 120 | 121 | # Rust + WebAssembly 122 | bin/ 123 | pkg/ 124 | wasm-pack.log 125 | Footer 126 | -------------------------------------------------------------------------------- /1 - Presentation/소프트웨어 마에스트로 특강 - Rust 크로스 플랫폼 프로그래밍.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/utilForever/2022-SWMaestro-Rust-Basic/4c0b014b54c4a25ae12add55344b73675e469cd1/1 - Presentation/소프트웨어 마에스트로 특강 - Rust 크로스 플랫폼 프로그래밍.pdf -------------------------------------------------------------------------------- /1 - Presentation/소프트웨어 마에스트로 특강 - Rust 프로그래밍 기초.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/utilForever/2022-SWMaestro-Rust-Basic/4c0b014b54c4a25ae12add55344b73675e469cd1/1 - Presentation/소프트웨어 마에스트로 특강 - Rust 프로그래밍 기초.pdf -------------------------------------------------------------------------------- /1 - Presentation/소프트웨어 마에스트로 특강 - Rust로 알고리즘 문제 풀어보기.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/utilForever/2022-SWMaestro-Rust-Basic/4c0b014b54c4a25ae12add55344b73675e469cd1/1 - Presentation/소프트웨어 마에스트로 특강 - Rust로 알고리즘 문제 풀어보기.pdf -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "rust-cross", 4 | "rust-cross-ios", 5 | "rust-cross-web", 6 | ] 7 | default-members = ["rust-cross"] 8 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/Shared/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/Shared/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | }, 93 | { 94 | "idiom" : "mac", 95 | "scale" : "1x", 96 | "size" : "16x16" 97 | }, 98 | { 99 | "idiom" : "mac", 100 | "scale" : "2x", 101 | "size" : "16x16" 102 | }, 103 | { 104 | "idiom" : "mac", 105 | "scale" : "1x", 106 | "size" : "32x32" 107 | }, 108 | { 109 | "idiom" : "mac", 110 | "scale" : "2x", 111 | "size" : "32x32" 112 | }, 113 | { 114 | "idiom" : "mac", 115 | "scale" : "1x", 116 | "size" : "128x128" 117 | }, 118 | { 119 | "idiom" : "mac", 120 | "scale" : "2x", 121 | "size" : "128x128" 122 | }, 123 | { 124 | "idiom" : "mac", 125 | "scale" : "1x", 126 | "size" : "256x256" 127 | }, 128 | { 129 | "idiom" : "mac", 130 | "scale" : "2x", 131 | "size" : "256x256" 132 | }, 133 | { 134 | "idiom" : "mac", 135 | "scale" : "1x", 136 | "size" : "512x512" 137 | }, 138 | { 139 | "idiom" : "mac", 140 | "scale" : "2x", 141 | "size" : "512x512" 142 | } 143 | ], 144 | "info" : { 145 | "author" : "xcode", 146 | "version" : 1 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/Shared/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/Shared/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Shared 4 | // 5 | // Created by Chris Ohk on 2022/08/26. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | var body: some View { 12 | let rustCross = RustCross() 13 | Text(String(rustCross.do_add(a: Int64(10), b: Int64(20)))) 14 | Text(String(rustCross.do_sub(a: Int64(10), b: Int64(20)))) 15 | } 16 | } 17 | 18 | struct ContentView_Previews: PreviewProvider { 19 | static var previews: some View { 20 | ContentView() 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/Shared/RustCross.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RustCross.swift 3 | // infcon-2022 4 | // 5 | // Created by Chris Ohk on 2022/08/26. 6 | // 7 | 8 | import Foundation 9 | 10 | class RustCross { 11 | func do_add(a: Int64, b: Int64) -> Int64 { 12 | return add(a, b) 13 | } 14 | 15 | func do_sub(a: Int64, b: Int64) -> Int64 { 16 | return sub(a, b) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/Shared/infcon-bridge-header.h: -------------------------------------------------------------------------------- 1 | // 2 | // infcon-bridge-header.h 3 | // infcon-2022 4 | // 5 | // Created by Chris Ohk on 2022/08/26. 6 | // 7 | 8 | #ifndef infcon_bridge_header_h 9 | #define infcon_bridge_header_h 10 | 11 | #import "rust-cross-ios.h" 12 | 13 | #endif /* infcon_bridge_header_h */ 14 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/Shared/infcon_2022App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // infcon_2022App.swift 3 | // Shared 4 | // 5 | // Created by Chris Ohk on 2022/08/26. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct infcon_2022App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/infcon-2022.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 55; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2A6ABD4D28B881E000A28796 /* infcon_2022App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A6ABD3D28B881DF00A28796 /* infcon_2022App.swift */; }; 11 | 2A6ABD4F28B881E000A28796 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A6ABD3E28B881DF00A28796 /* ContentView.swift */; }; 12 | 2A6ABD5128B881E000A28796 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2A6ABD3F28B881E000A28796 /* Assets.xcassets */; }; 13 | 2A6ABD5D28B884D200A28796 /* RustCross.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A6ABD5C28B884D200A28796 /* RustCross.swift */; }; 14 | 2A6ABD6C28B88E5C00A28796 /* librust_cross_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A6ABD6B28B88E5C00A28796 /* librust_cross_ios.a */; }; 15 | 2A6ABD6E28B88E9400A28796 /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A6ABD6D28B88E7F00A28796 /* libresolv.tbd */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 2A6ABD3D28B881DF00A28796 /* infcon_2022App.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = infcon_2022App.swift; sourceTree = ""; }; 20 | 2A6ABD3E28B881DF00A28796 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 21 | 2A6ABD3F28B881E000A28796 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 22 | 2A6ABD4428B881E000A28796 /* infcon-2022.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "infcon-2022.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 2A6ABD4C28B881E000A28796 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; }; 24 | 2A6ABD5B28B8847100A28796 /* infcon-bridge-header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "infcon-bridge-header.h"; sourceTree = ""; }; 25 | 2A6ABD5C28B884D200A28796 /* RustCross.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RustCross.swift; sourceTree = ""; }; 26 | 2A6ABD6228B8879E00A28796 /* rust-cross-ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "rust-cross-ios.h"; path = "../../rust-cross-ios/src/rust-cross-ios.h"; sourceTree = ""; }; 27 | 2A6ABD6B28B88E5C00A28796 /* librust_cross_ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = librust_cross_ios.a; path = ../../target/universal/release/librust_cross_ios.a; sourceTree = ""; }; 28 | 2A6ABD6D28B88E7F00A28796 /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk/usr/lib/libresolv.tbd; sourceTree = DEVELOPER_DIR; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 2A6ABD4128B881E000A28796 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | 2A6ABD6C28B88E5C00A28796 /* librust_cross_ios.a in Frameworks */, 37 | 2A6ABD6E28B88E9400A28796 /* libresolv.tbd in Frameworks */, 38 | ); 39 | runOnlyForDeploymentPostprocessing = 0; 40 | }; 41 | /* End PBXFrameworksBuildPhase section */ 42 | 43 | /* Begin PBXGroup section */ 44 | 2A6ABD3728B881DF00A28796 = { 45 | isa = PBXGroup; 46 | children = ( 47 | 2A6ABD6228B8879E00A28796 /* rust-cross-ios.h */, 48 | 2A6ABD3C28B881DF00A28796 /* Shared */, 49 | 2A6ABD4B28B881E000A28796 /* macOS */, 50 | 2A6ABD4528B881E000A28796 /* Products */, 51 | 2A6ABD5F28B8869A00A28796 /* Frameworks */, 52 | ); 53 | sourceTree = ""; 54 | }; 55 | 2A6ABD3C28B881DF00A28796 /* Shared */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | 2A6ABD5B28B8847100A28796 /* infcon-bridge-header.h */, 59 | 2A6ABD3D28B881DF00A28796 /* infcon_2022App.swift */, 60 | 2A6ABD3E28B881DF00A28796 /* ContentView.swift */, 61 | 2A6ABD3F28B881E000A28796 /* Assets.xcassets */, 62 | 2A6ABD5C28B884D200A28796 /* RustCross.swift */, 63 | ); 64 | path = Shared; 65 | sourceTree = ""; 66 | }; 67 | 2A6ABD4528B881E000A28796 /* Products */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | 2A6ABD4428B881E000A28796 /* infcon-2022.app */, 71 | ); 72 | name = Products; 73 | sourceTree = ""; 74 | }; 75 | 2A6ABD4B28B881E000A28796 /* macOS */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 2A6ABD4C28B881E000A28796 /* macOS.entitlements */, 79 | ); 80 | path = macOS; 81 | sourceTree = ""; 82 | }; 83 | 2A6ABD5F28B8869A00A28796 /* Frameworks */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 2A6ABD6D28B88E7F00A28796 /* libresolv.tbd */, 87 | 2A6ABD6B28B88E5C00A28796 /* librust_cross_ios.a */, 88 | ); 89 | name = Frameworks; 90 | sourceTree = ""; 91 | }; 92 | /* End PBXGroup section */ 93 | 94 | /* Begin PBXNativeTarget section */ 95 | 2A6ABD4328B881E000A28796 /* infcon-2022 (iOS) */ = { 96 | isa = PBXNativeTarget; 97 | buildConfigurationList = 2A6ABD5528B881E000A28796 /* Build configuration list for PBXNativeTarget "infcon-2022 (iOS)" */; 98 | buildPhases = ( 99 | 2A6ABD4028B881E000A28796 /* Sources */, 100 | 2A6ABD4128B881E000A28796 /* Frameworks */, 101 | 2A6ABD4228B881E000A28796 /* Resources */, 102 | ); 103 | buildRules = ( 104 | ); 105 | dependencies = ( 106 | ); 107 | name = "infcon-2022 (iOS)"; 108 | productName = "infcon-2022 (iOS)"; 109 | productReference = 2A6ABD4428B881E000A28796 /* infcon-2022.app */; 110 | productType = "com.apple.product-type.application"; 111 | }; 112 | /* End PBXNativeTarget section */ 113 | 114 | /* Begin PBXProject section */ 115 | 2A6ABD3828B881DF00A28796 /* Project object */ = { 116 | isa = PBXProject; 117 | attributes = { 118 | BuildIndependentTargetsInParallel = 1; 119 | LastSwiftUpdateCheck = 1340; 120 | LastUpgradeCheck = 1340; 121 | TargetAttributes = { 122 | 2A6ABD4328B881E000A28796 = { 123 | CreatedOnToolsVersion = 13.4.1; 124 | }; 125 | }; 126 | }; 127 | buildConfigurationList = 2A6ABD3B28B881DF00A28796 /* Build configuration list for PBXProject "infcon-2022" */; 128 | compatibilityVersion = "Xcode 13.0"; 129 | developmentRegion = en; 130 | hasScannedForEncodings = 0; 131 | knownRegions = ( 132 | en, 133 | Base, 134 | ); 135 | mainGroup = 2A6ABD3728B881DF00A28796; 136 | productRefGroup = 2A6ABD4528B881E000A28796 /* Products */; 137 | projectDirPath = ""; 138 | projectRoot = ""; 139 | targets = ( 140 | 2A6ABD4328B881E000A28796 /* infcon-2022 (iOS) */, 141 | ); 142 | }; 143 | /* End PBXProject section */ 144 | 145 | /* Begin PBXResourcesBuildPhase section */ 146 | 2A6ABD4228B881E000A28796 /* Resources */ = { 147 | isa = PBXResourcesBuildPhase; 148 | buildActionMask = 2147483647; 149 | files = ( 150 | 2A6ABD5128B881E000A28796 /* Assets.xcassets in Resources */, 151 | ); 152 | runOnlyForDeploymentPostprocessing = 0; 153 | }; 154 | /* End PBXResourcesBuildPhase section */ 155 | 156 | /* Begin PBXSourcesBuildPhase section */ 157 | 2A6ABD4028B881E000A28796 /* Sources */ = { 158 | isa = PBXSourcesBuildPhase; 159 | buildActionMask = 2147483647; 160 | files = ( 161 | 2A6ABD4F28B881E000A28796 /* ContentView.swift in Sources */, 162 | 2A6ABD4D28B881E000A28796 /* infcon_2022App.swift in Sources */, 163 | 2A6ABD5D28B884D200A28796 /* RustCross.swift in Sources */, 164 | ); 165 | runOnlyForDeploymentPostprocessing = 0; 166 | }; 167 | /* End PBXSourcesBuildPhase section */ 168 | 169 | /* Begin XCBuildConfiguration section */ 170 | 2A6ABD5328B881E000A28796 /* Debug */ = { 171 | isa = XCBuildConfiguration; 172 | buildSettings = { 173 | ALWAYS_SEARCH_USER_PATHS = NO; 174 | CLANG_ANALYZER_NONNULL = YES; 175 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 176 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 177 | CLANG_ENABLE_MODULES = YES; 178 | CLANG_ENABLE_OBJC_ARC = YES; 179 | CLANG_ENABLE_OBJC_WEAK = YES; 180 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 181 | CLANG_WARN_BOOL_CONVERSION = YES; 182 | CLANG_WARN_COMMA = YES; 183 | CLANG_WARN_CONSTANT_CONVERSION = YES; 184 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 185 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 186 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 187 | CLANG_WARN_EMPTY_BODY = YES; 188 | CLANG_WARN_ENUM_CONVERSION = YES; 189 | CLANG_WARN_INFINITE_RECURSION = YES; 190 | CLANG_WARN_INT_CONVERSION = YES; 191 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 192 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 193 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 194 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 195 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 196 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 197 | CLANG_WARN_STRICT_PROTOTYPES = YES; 198 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 199 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 200 | CLANG_WARN_UNREACHABLE_CODE = YES; 201 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 202 | COPY_PHASE_STRIP = NO; 203 | DEBUG_INFORMATION_FORMAT = dwarf; 204 | ENABLE_STRICT_OBJC_MSGSEND = YES; 205 | ENABLE_TESTABILITY = YES; 206 | GCC_C_LANGUAGE_STANDARD = gnu11; 207 | GCC_DYNAMIC_NO_PIC = NO; 208 | GCC_NO_COMMON_BLOCKS = YES; 209 | GCC_OPTIMIZATION_LEVEL = 0; 210 | GCC_PREPROCESSOR_DEFINITIONS = ( 211 | "DEBUG=1", 212 | "$(inherited)", 213 | ); 214 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 215 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 216 | GCC_WARN_UNDECLARED_SELECTOR = YES; 217 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 218 | GCC_WARN_UNUSED_FUNCTION = YES; 219 | GCC_WARN_UNUSED_VARIABLE = YES; 220 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 221 | MTL_FAST_MATH = YES; 222 | ONLY_ACTIVE_ARCH = YES; 223 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 224 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 225 | }; 226 | name = Debug; 227 | }; 228 | 2A6ABD5428B881E000A28796 /* Release */ = { 229 | isa = XCBuildConfiguration; 230 | buildSettings = { 231 | ALWAYS_SEARCH_USER_PATHS = NO; 232 | CLANG_ANALYZER_NONNULL = YES; 233 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 234 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 235 | CLANG_ENABLE_MODULES = YES; 236 | CLANG_ENABLE_OBJC_ARC = YES; 237 | CLANG_ENABLE_OBJC_WEAK = YES; 238 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 239 | CLANG_WARN_BOOL_CONVERSION = YES; 240 | CLANG_WARN_COMMA = YES; 241 | CLANG_WARN_CONSTANT_CONVERSION = YES; 242 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 243 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 244 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 245 | CLANG_WARN_EMPTY_BODY = YES; 246 | CLANG_WARN_ENUM_CONVERSION = YES; 247 | CLANG_WARN_INFINITE_RECURSION = YES; 248 | CLANG_WARN_INT_CONVERSION = YES; 249 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 250 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 251 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 252 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 253 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 254 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 255 | CLANG_WARN_STRICT_PROTOTYPES = YES; 256 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 257 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 258 | CLANG_WARN_UNREACHABLE_CODE = YES; 259 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 260 | COPY_PHASE_STRIP = NO; 261 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 262 | ENABLE_NS_ASSERTIONS = NO; 263 | ENABLE_STRICT_OBJC_MSGSEND = YES; 264 | GCC_C_LANGUAGE_STANDARD = gnu11; 265 | GCC_NO_COMMON_BLOCKS = YES; 266 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 267 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 268 | GCC_WARN_UNDECLARED_SELECTOR = YES; 269 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 270 | GCC_WARN_UNUSED_FUNCTION = YES; 271 | GCC_WARN_UNUSED_VARIABLE = YES; 272 | MTL_ENABLE_DEBUG_INFO = NO; 273 | MTL_FAST_MATH = YES; 274 | SWIFT_COMPILATION_MODE = wholemodule; 275 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 276 | }; 277 | name = Release; 278 | }; 279 | 2A6ABD5628B881E000A28796 /* Debug */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 283 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 284 | CODE_SIGN_STYLE = Automatic; 285 | CURRENT_PROJECT_VERSION = 1; 286 | ENABLE_PREVIEWS = YES; 287 | GENERATE_INFOPLIST_FILE = YES; 288 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 289 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 290 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 291 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 292 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 293 | IPHONEOS_DEPLOYMENT_TARGET = 15.5; 294 | LD_RUNPATH_SEARCH_PATHS = ( 295 | "$(inherited)", 296 | "@executable_path/Frameworks", 297 | ); 298 | LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../../target/universal/release"; 299 | MARKETING_VERSION = 1.0; 300 | PRODUCT_BUNDLE_IDENTIFIER = "infcon.infcon-2022"; 301 | PRODUCT_NAME = "infcon-2022"; 302 | SDKROOT = iphoneos; 303 | SWIFT_EMIT_LOC_STRINGS = YES; 304 | SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/Shared/infcon-bridge-header.h"; 305 | SWIFT_VERSION = 5.0; 306 | TARGETED_DEVICE_FAMILY = 1; 307 | USER_HEADER_SEARCH_PATHS = ""; 308 | }; 309 | name = Debug; 310 | }; 311 | 2A6ABD5728B881E000A28796 /* Release */ = { 312 | isa = XCBuildConfiguration; 313 | buildSettings = { 314 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 315 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 316 | CODE_SIGN_STYLE = Automatic; 317 | CURRENT_PROJECT_VERSION = 1; 318 | ENABLE_PREVIEWS = YES; 319 | GENERATE_INFOPLIST_FILE = YES; 320 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 321 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 322 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 323 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 324 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 325 | IPHONEOS_DEPLOYMENT_TARGET = 15.5; 326 | LD_RUNPATH_SEARCH_PATHS = ( 327 | "$(inherited)", 328 | "@executable_path/Frameworks", 329 | ); 330 | LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../../target/universal/release"; 331 | MARKETING_VERSION = 1.0; 332 | PRODUCT_BUNDLE_IDENTIFIER = "infcon.infcon-2022"; 333 | PRODUCT_NAME = "infcon-2022"; 334 | SDKROOT = iphoneos; 335 | SWIFT_EMIT_LOC_STRINGS = YES; 336 | SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/Shared/infcon-bridge-header.h"; 337 | SWIFT_VERSION = 5.0; 338 | TARGETED_DEVICE_FAMILY = 1; 339 | USER_HEADER_SEARCH_PATHS = ""; 340 | VALIDATE_PRODUCT = YES; 341 | }; 342 | name = Release; 343 | }; 344 | /* End XCBuildConfiguration section */ 345 | 346 | /* Begin XCConfigurationList section */ 347 | 2A6ABD3B28B881DF00A28796 /* Build configuration list for PBXProject "infcon-2022" */ = { 348 | isa = XCConfigurationList; 349 | buildConfigurations = ( 350 | 2A6ABD5328B881E000A28796 /* Debug */, 351 | 2A6ABD5428B881E000A28796 /* Release */, 352 | ); 353 | defaultConfigurationIsVisible = 0; 354 | defaultConfigurationName = Release; 355 | }; 356 | 2A6ABD5528B881E000A28796 /* Build configuration list for PBXNativeTarget "infcon-2022 (iOS)" */ = { 357 | isa = XCConfigurationList; 358 | buildConfigurations = ( 359 | 2A6ABD5628B881E000A28796 /* Debug */, 360 | 2A6ABD5728B881E000A28796 /* Release */, 361 | ); 362 | defaultConfigurationIsVisible = 0; 363 | defaultConfigurationName = Release; 364 | }; 365 | /* End XCConfigurationList section */ 366 | }; 367 | rootObject = 2A6ABD3828B881DF00A28796 /* Project object */; 368 | } 369 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/infcon-2022.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/infcon-2022.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/infcon-2022.xcodeproj/xcshareddata/xcschemes/infcon-2022.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-ios/infcon-2022/macOS/macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-web/bootstrap.ts: -------------------------------------------------------------------------------- 1 | import('./index').catch(e => console.error("Error importing `index.ts`:", e)); 2 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | INFCON 2022 Rust Cross-Platform Web App 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-web/index.ts: -------------------------------------------------------------------------------- 1 | import * as cross from "rust-cross-web"; 2 | 3 | alert(cross.add(BigInt(10), BigInt(20))); 4 | alert(cross.sub(BigInt(10), BigInt(20))); 5 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "infcon-web", 3 | "version": "0.1.0", 4 | "description": "INFCON 2022 Rust Cross-Platform Web App", 5 | "main": "index.ts", 6 | "scripts": { 7 | "build": "webpack --config webpack.config.js", 8 | "start": "webpack-dev-server" 9 | }, 10 | "keywords": [ 11 | "webassembly", 12 | "wasm", 13 | "rust", 14 | "typescript" 15 | ], 16 | "author": "Chris Ohk ", 17 | "license": "MIT", 18 | "dependencies": { 19 | "rust-cross-web": "file:pkg", 20 | "ts-node": "^10.7.0" 21 | }, 22 | "devDependencies": { 23 | "html-webpack-plugin": "^5.5.0", 24 | "typescript": "^4.6.3", 25 | "webpack": "^5.70.0", 26 | "webpack-cli": "^4.9.2", 27 | "webpack-dev-server": "^4.7.4" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig.json to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Enable incremental compilation */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ 22 | // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | 26 | /* Modules */ 27 | "module": "commonjs", /* Specify what module code is generated. */ 28 | // "rootDir": "./", /* Specify the root folder within your source files. */ 29 | "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ 30 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 31 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 32 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 33 | // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ 34 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 35 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 36 | // "resolveJsonModule": true, /* Enable importing .json files */ 37 | // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ 38 | 39 | /* JavaScript Support */ 40 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ 41 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 42 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ 43 | 44 | /* Emit */ 45 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 46 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 47 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 48 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 49 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ 50 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 51 | // "removeComments": true, /* Disable emitting comments. */ 52 | // "noEmit": true, /* Disable emitting files from a compilation. */ 53 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 54 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ 55 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 56 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 57 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 58 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 59 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 60 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 61 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 62 | // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ 63 | // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ 64 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 65 | // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ 66 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 67 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 68 | 69 | /* Interop Constraints */ 70 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 71 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 72 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ 73 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 74 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 75 | 76 | /* Type Checking */ 77 | "strict": true, /* Enable all strict type-checking options. */ 78 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ 79 | // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ 80 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 81 | // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ 82 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 83 | // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ 84 | // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ 85 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 86 | // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ 87 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ 88 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 89 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 90 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 91 | // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ 92 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 93 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ 94 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 95 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 96 | 97 | /* Completeness */ 98 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 99 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/example-web/webpack.config.js: -------------------------------------------------------------------------------- 1 | const HTMLWebpackPlugin = require('html-webpack-plugin'); 2 | const path = require('path'); 3 | 4 | module.exports = { 5 | mode: 'development', 6 | devtool: 'eval-source-map', 7 | entry: './bootstrap.ts', 8 | output: { 9 | filename: 'bundle.js', 10 | path: path.resolve(__dirname, 'dist'), 11 | }, 12 | experiments: { 13 | syncWebAssembly: true 14 | }, 15 | module: { 16 | rules: [ 17 | { 18 | test: /\.ts$/, 19 | use: 'ts-loader', 20 | include: [path.resolve(__dirname, 'src')], 21 | }, 22 | ], 23 | }, 24 | resolve: { 25 | extensions: ['.ts', '.js'], 26 | }, 27 | 28 | plugins: [ 29 | new HTMLWebpackPlugin({ 30 | template: path.resolve(__dirname, 'index.html'), 31 | }), 32 | ], 33 | }; 34 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/rust-cross-ios/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-cross-ios" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lib] 7 | crate-type = ["staticlib", "cdylib"] 8 | 9 | [dependencies] 10 | rust-cross = { path = "../rust-cross" } 11 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/rust-cross-ios/src/lib.rs: -------------------------------------------------------------------------------- 1 | #[no_mangle] 2 | pub extern "C" fn add(a: i64, b: i64) -> i64 { 3 | rust_cross::add(a, b) 4 | } 5 | 6 | #[no_mangle] 7 | pub extern "C" fn sub(a: i64, b: i64) -> i64 { 8 | rust_cross::sub(a, b) 9 | } 10 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/rust-cross-ios/src/rust-cross-ios.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int64_t add(int64_t a, int64_t b); 4 | int64_t sub(int64_t a, int64_t b); 5 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/rust-cross-web/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-cross-web" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lib] 7 | crate-type = ["cdylib", "rlib"] 8 | 9 | [dependencies] 10 | rust-cross = { path = "../rust-cross" } 11 | wasm-bindgen = "0.2.48" 12 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/rust-cross-web/src/lib.rs: -------------------------------------------------------------------------------- 1 | use wasm_bindgen::prelude::*; 2 | 3 | #[wasm_bindgen] 4 | pub fn add(a: i64, b: i64) -> i64 { 5 | rust_cross::add(a, b) 6 | } 7 | 8 | #[wasm_bindgen] 9 | pub fn sub(a: i64, b: i64) -> i64 { 10 | rust_cross::sub(a, b) 11 | } 12 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/rust-cross/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-cross" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /2 - Example/3 - Rust Cross Platform Development/rust-cross/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub fn add(a: i64, b: i64) -> i64 { 2 | a + b 3 | } 4 | 5 | pub fn sub(a: i64, b: i64) -> i64 { 6 | a - b 7 | } 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Chris Ohk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 2022-SWMaestro-Rust-Basic 2 | 2022년 소프트웨어 마에스트로 특강 - Rust 기초 3 | --------------------------------------------------------------------------------