Skip to content

Commit

Permalink
add tools
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Nov 28, 2024
1 parent 8809adc commit 72324d7
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@
"name": "Release Cli (Cli)",
"program": "${workspaceFolder:boka}/Cli/.build/release/Cli",
"preLaunchTask": "swift: Build Release Cli (Cli)"
},
{
"type": "lldb",
"request": "launch",
"args": [],
"cwd": "${workspaceFolder:boka}/Tools",
"name": "Debug Tools (Tools)",
"program": "${workspaceFolder:boka}/Tools/.build/debug/Tools",
"preLaunchTask": "swift: Build Debug Tools (Tools)"
},
{
"type": "lldb",
"request": "launch",
"args": [],
"cwd": "${workspaceFolder:boka}/Tools",
"name": "Release Tools (Tools)",
"program": "${workspaceFolder:boka}/Tools/.build/release/Tools",
"preLaunchTask": "swift: Build Release Tools (Tools)"
}
]
}
}
29 changes: 29 additions & 0 deletions Tools/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Tools",
platforms: [
.macOS(.v15),
],
dependencies: [
.package(path: "../RPC"),
.package(path: "../TracingUtils"),
.package(path: "../Utils"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"),
],
targets: [
.executableTarget(
name: "Tools",
dependencies: [
"RPC",
"Utils",
"TracingUtils",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
]
),
],
swiftLanguageModes: [.version("6")]
)
14 changes: 14 additions & 0 deletions Tools/Sources/Tools/Tools.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import ArgumentParser
import RPC
import TracingUtils
import Utils

@main
struct Boka: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Boka Tools",
version: "0.0.1"
)

mutating func run() async throws {}
}
2 changes: 2 additions & 0 deletions boka.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
066C926F2C095D76005DDE4F /* Blockchain */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Blockchain; sourceTree = "<group>"; };
066C92702C095D85005DDE4F /* Node */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Node; sourceTree = "<group>"; };
0674602A2C61BF63008FD993 /* TracingUtils */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = TracingUtils; sourceTree = "<group>"; };
06814C5E2CF869B6007CCEC2 /* Tools */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Tools; sourceTree = "<group>"; };
06AAEF0C2C47746C0064995D /* PolkaVM */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = PolkaVM; sourceTree = "<group>"; };
06E2B78F2C7304FF00E35A48 /* Codec */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Codec; sourceTree = "<group>"; };
06F2335F2C0B306000A5E2E0 /* Database */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Database; sourceTree = "<group>"; };
Expand All @@ -24,6 +25,7 @@
066C92652C095CE5005DDE4F = {
isa = PBXGroup;
children = (
06814C5E2CF869B6007CCEC2 /* Tools */,
06E2B78F2C7304FF00E35A48 /* Codec */,
064D330E2C632ACC001A5F36 /* RPC */,
0674602A2C61BF63008FD993 /* TracingUtils */,
Expand Down

0 comments on commit 72324d7

Please sign in to comment.