This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RealityKit | |
import SwiftUI | |
@MainActor | |
final class MySystem: System { | |
// After turning on scene-understanding options, RealityKit automatically generates entities representing real-world geometry with a SceneUnderstandingComponent. | |
// https://developer.apple.com/documentation/realitykit/realitykit-scene-understanding#Use-scene-reconstruction-in-iOS-and-macOS | |
private static let query = EntityQuery(where: .has(SceneUnderstandingComponent.self) && .has(ModelComponent.self)) | |
private static let debugMaterial: UnlitMaterial = { | |
var material = UnlitMaterial(color: .green) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
# 元ファイル: https://github.com/swiftwasm/swiftwasm-build/blob/main/schemes/main/build/build-foundation.sh | |
# swiftly でツールチェーンをインストール | |
# swift sdk install で Wasm の Swift SDK をインストール | |
# swift-collections, swift-foundation, swift-foundation-icu は最新の main ブランチをあらかじめクローンしておく | |
# libxml2 は https://github.com/swiftwasm/libxml2-wasm/releases/download/2.0.0/libxml2-wasm32-unknown-wasi.tar.gz からダウンロード | |
DESTINATION_TOOLCHAIN="$HOME/.swiftpm/swift-sdks/swift-wasm-DEVELOPMENT-SNAPSHOT-2025-03-28-a-wasm32-unknown-wasi.artifactbundle/DEVELOPMENT-SNAPSHOT-2025-03-28-a-wasm32-unknown-wasi/wasm32-unknown-wasi/swift.xctoolchain" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"installedToolchains" : [], | |
"platform" : { | |
"namePretty" : "macOS", | |
"architecture" : null, | |
"name" : "xcode", | |
"nameFull" : "osx" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let titles = ["lipsum", "lipsum-zh", "medium-fragment", "small-fragment", "tiny-fragment", "strong"] | |
let html5everResults = "14330 7331.2 31141 3033.7 300.56 18179" // ns | |
let zyphyResults = "14000 1619 44000 4628 506 20000" // ns | |
let howSlowers = zip( | |
html5everResults.split(separator: " ").map { Double($0)! }, | |
zyphyResults.split(separator: " ").map { Double($0)! } | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
@State var hoge = 0 | |
@Environment(\.testCaseNumber) private var testCaseNumber | |
func change() { | |
hoge = 3 | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs-extra') | |
const { WASI } = require('@wasmer/wasi') | |
const wasiBindings = require('@wasmer/wasi/lib/bindings/node') | |
const { lowerI64Imports } = require("@wasmer/wasm-transformer") | |
const wasi = new WASI({ | |
args: ['swift-format', '--version'], | |
env: {}, | |
bindings: wasiBindings.default, | |
preopens: {'.': '.'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
// 再現する型: URL, URLError, UUID, Date, Measurement, Locale, some SwiftUI.View | |
// 再現しない型: String, [Int], [String: Int], some StringProtocol, DispatchQueue, Bundle, Data, DateFormatter, URLSession, JSONEncoder, NSNumber, CGFloat, Decimal, SwiftUI.Text | |
func foo() async -> URL { | |
.init(fileURLWithPath: "/") | |
} | |
struct ContentView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> | |
<true/> | |
<key>Label</key> | |
<string>com.openssh.sshd.homebrew</string> | |
<key>Program</key> | |
<string>/opt/homebrew/sbin/sshd</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// swift-interface-format-version: 1.0 | |
// swift-compiler-version: Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8) | |
// swift-module-flags: -target arm64-apple-ios14.7 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -package-description-version 999.0 -module-name PackageDescription | |
// swift-module-flags-ignorable: -user-module-version 15 | |
import Foundation | |
import Swift | |
public struct BuildConfiguration : Swift.Encodable { | |
public static let debug: PackageDescription.BuildConfiguration | |
public static let release: PackageDescription.BuildConfiguration | |
public func encode(to encoder: Swift.Encoder) throws |
NewerOlder