-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move underlying JS interpreter to QuickJS (#3)
* quickjs experiment * memory stuff * more memory fixes * comments * various things * made the result discardable * package updates * Added perform(...) to do things on the JS thread * package & test updates. * Removed extraneous file * Bring back the version file * and again
- Loading branch information
Showing
78 changed files
with
80,132 additions
and
2,893 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,44 @@ | ||
// swift-tools-version:5.3 | ||
// swift-tools-version: 5.8 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
#if canImport(JavaScriptCore) | ||
let targets: [Target] = [ | ||
.target(name: "Substrata") | ||
] | ||
#elseif os(Windows) | ||
// Windows iTunes installs JSC at: C:/Program Files/iTunes/JavaScriptCore.dll | ||
// See also: https://pub.dev/packages/flutter_jscore#windows | ||
let targets: [Target] = [ | ||
.target(name: "Substrata", | ||
linkerSettings: [ | ||
.linkedLibrary("Kernel32", .when(platforms: [.windows])), | ||
.linkedLibrary("JavaScriptCore", .when(platforms: [.windows])), | ||
.linkedLibrary("CoreFoundation", .when(platforms: [.windows])), | ||
.linkedLibrary("WTF", .when(platforms: [.windows])), | ||
.linkedLibrary("ASL", .when(platforms: [.windows])), | ||
]) | ||
] | ||
#else // no native JavaScriptCore falls back to javascriptcoregtk | ||
let targets: [Target] = [ | ||
.systemLibrary(name: "CJavaScriptCore", | ||
pkgConfig: "javascriptcoregtk-4.0", | ||
providers: [.apt(["libjavascriptcoregtk-4.0-dev"]), .yum(["webkit2gtk"])]), | ||
.target(name: "Substrata", dependencies: ["CJavaScriptCore"], cSettings: [.headerSearchPath("../CJavaScriptCore/header_maps")]) | ||
] | ||
#endif | ||
|
||
let package = Package( | ||
name: "Substrata", | ||
platforms: [ | ||
.macOS("10.15"), | ||
.iOS("13.0"), | ||
.tvOS("11.0"), | ||
.tvOS("11.0") | ||
], | ||
products: [ | ||
.library(name: "Substrata", targets: ["Substrata"]), | ||
// Products define the executables and libraries a package produces, making them visible to other packages. | ||
.library( | ||
name: "Substrata", | ||
targets: ["Substrata"]), | ||
], | ||
targets: targets + [ | ||
targets: [ | ||
// Targets are the basic building blocks of a package, defining a module or a test suite. | ||
// Targets can depend on other targets in this package and products from dependencies. | ||
.target( | ||
name: "SubstrataQuickJS" | ||
/*cSettings: [ | ||
/*.unsafeFlags([ | ||
"-Wno-implicit-int-float-conversion", | ||
"-Wno-conversion" | ||
]),*/ | ||
.define("CONFIG_BIGNUM"), | ||
.define("CONFIG_ATOMICS"), | ||
//.define("DUMP_LEAKS") | ||
]*/ | ||
), | ||
.target( | ||
name: "Substrata", | ||
dependencies: ["SubstrataQuickJS"]), | ||
.testTarget( | ||
name: "SubstrataTests", | ||
dependencies: ["Substrata"], | ||
resources: [ | ||
.copy("TestHelpers/ConversionTestData.js"), | ||
.copy("TestHelpers/BundleTest.js") | ||
.copy("Support/ConversionTestData.js") | ||
]) | ||
] | ||
) |
26 changes: 0 additions & 26 deletions
26
Sources/CJavaScriptCore/header_maps/JavaScriptCore/JSBase.h
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
Sources/CJavaScriptCore/header_maps/JavaScriptCore/JSContextRef.h
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
Sources/CJavaScriptCore/header_maps/JavaScriptCore/JSObjectRef.h
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
Sources/CJavaScriptCore/header_maps/JavaScriptCore/JSStringRef.h
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
Sources/CJavaScriptCore/header_maps/JavaScriptCore/JSTypedArray.h
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
Sources/CJavaScriptCore/header_maps/JavaScriptCore/JSValueRef.h
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
Sources/CJavaScriptCore/header_maps/JavaScriptCore/WebKitAvailability.h
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.