[reorg]: Set up and populate the internal directory

Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.

pre-commit applied some cleanups to the moved files:
 - Consistent newline at end of file policy
 - trimming trailing whitespace
 - Formatting Cargo.toml files.
This commit is contained in:
Tobias Hunger 2022-01-31 11:45:55 +01:00 committed by Tobias Hunger
parent d22c8bd3df
commit e6b24bceec
288 changed files with 248 additions and 228 deletions

View file

@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
This version changes some APIs in incompatible ways. For details how to migrate your application code, see the [C++ migration guide](api/sixtyfps-cpp/docs/cpp_migration.md) This version changes some APIs in incompatible ways. For details how to migrate your application code, see the [C++ migration guide](api/sixtyfps-cpp/docs/cpp_migration.md)
as well as the [Rust migration guide for the `sixtyfps` crate](api/sixtyfps-rs/migration.md) and for the as well as the [Rust migration guide for the `sixtyfps` crate](api/sixtyfps-rs/migration.md) and for the
[`sixtyfps-interpreter` crate](sixtyfps_runtime/interpreter/migration.rs). [`sixtyfps-interpreter` crate](internal/interpreter/migration.rs).
### Changed ### Changed

View file

@ -3,75 +3,75 @@
[workspace] [workspace]
members = [ members = [
'sixtyfps_runtime/common',
'sixtyfps_runtime/corelib',
'sixtyfps_runtime/corelib_macros',
'sixtyfps_runtime/interpreter',
'sixtyfps_runtime/rendering_backends/gl',
'sixtyfps_runtime/rendering_backends/qt',
'sixtyfps_runtime/rendering_backends/mcu',
'sixtyfps_runtime/rendering_backends/default',
'sixtyfps_runtime/rendering_backends/testing',
'sixtyfps_compiler',
'sixtyfps_compiler/parser_test_macro',
'api/sixtyfps-rs',
'api/sixtyfps-rs/sixtyfps-macros',
'api/sixtyfps-rs/sixtyfps-build',
'api/sixtyfps-cpp', 'api/sixtyfps-cpp',
'api/sixtyfps-node/native', 'api/sixtyfps-node/native',
'api/sixtyfps-rs',
'api/sixtyfps-rs/sixtyfps-build',
'api/sixtyfps-rs/sixtyfps-macros',
'api/sixtyfps-wasm-interpreter', 'api/sixtyfps-wasm-interpreter',
'tools/compiler', 'docs/tutorial/rust/src',
'tools/fmt',
'tools/lsp',
'tools/syntax_updater',
'tools/viewer',
'examples/gallery',
'examples/printerdemo/rust',
'examples/printerdemo_old/rust',
'examples/todo/rust',
'examples/slide_puzzle',
'examples/7gui', 'examples/7gui',
'examples/gallery',
'examples/imagefilter',
'examples/memory', 'examples/memory',
'examples/plotter', 'examples/plotter',
'examples/imagefilter', 'examples/printerdemo_old/rust',
'examples/printerdemo/rust',
'examples/slide_puzzle',
'examples/todo/rust',
'helper_crates/const-field-offset', 'helper_crates/const-field-offset',
'helper_crates/vtable', 'helper_crates/vtable',
'helper_crates/vtable/macro', 'helper_crates/vtable/macro',
'xtask', 'internal/common',
'tests/doctests', 'internal/compiler',
'tests/driver/driverlib', 'internal/compiler/parser_test_macro',
'tests/driver/rust', 'internal/core',
'tests/driver/cpp', 'internal/core-macros',
'tests/driver/nodejs', 'internal/interpreter',
'tests/driver/interpreter',
'docs/tutorial/rust/src',
]
default-members = [
'sixtyfps_runtime/corelib',
'sixtyfps_runtime/interpreter',
'sixtyfps_runtime/rendering_backends/gl',
'sixtyfps_runtime/rendering_backends/qt',
'sixtyfps_runtime/rendering_backends/default', 'sixtyfps_runtime/rendering_backends/default',
'sixtyfps_compiler', 'sixtyfps_runtime/rendering_backends/gl',
'api/sixtyfps-rs', 'sixtyfps_runtime/rendering_backends/mcu',
'api/sixtyfps-rs/sixtyfps-build', 'sixtyfps_runtime/rendering_backends/qt',
'api/sixtyfps-node/native', 'sixtyfps_runtime/rendering_backends/testing',
'tests/doctests',
'tests/driver/cpp',
'tests/driver/driverlib',
'tests/driver/interpreter',
'tests/driver/nodejs',
'tests/driver/rust',
'tools/compiler', 'tools/compiler',
'tools/fmt', 'tools/fmt',
'tools/lsp', 'tools/lsp',
'tools/syntax_updater', 'tools/syntax_updater',
'tools/viewer', 'tools/viewer',
'xtask',
]
default-members = [
'api/sixtyfps-node/native',
'api/sixtyfps-rs',
'api/sixtyfps-rs/sixtyfps-build',
'examples/gallery', 'examples/gallery',
'examples/printerdemo/rust',
'examples/printerdemo_old/rust',
'examples/todo/rust',
'examples/slide_puzzle',
'examples/memory', 'examples/memory',
'examples/printerdemo_old/rust',
'examples/printerdemo/rust',
'examples/slide_puzzle',
'examples/todo/rust',
'internal/compiler',
'internal/core',
'internal/interpreter',
'sixtyfps_runtime/rendering_backends/default',
'sixtyfps_runtime/rendering_backends/gl',
'sixtyfps_runtime/rendering_backends/qt',
'tests/doctests', 'tests/doctests',
'tests/driver/rust',
'tests/driver/nodejs',
'tests/driver/interpreter', 'tests/driver/interpreter',
'tests/driver/nodejs',
'tests/driver/rust',
'tools/compiler',
'tools/fmt',
'tools/lsp',
'tools/syntax_updater',
'tools/viewer',
] ]
[profile.release] [profile.release]

View file

@ -22,22 +22,22 @@ crate-type = ["lib", "cdylib"]
# Note, these features need to be kept in sync (along with their defaults) in # Note, these features need to be kept in sync (along with their defaults) in
# the C++ crate's CMakeLists.txt # the C++ crate's CMakeLists.txt
[features] [features]
interpreter = ["sixtyfps-interpreter"]
x11 = ["sixtyfps-rendering-backend-default/x11"]
wayland = ["sixtyfps-rendering-backend-default/wayland"]
backend-gl = ["sixtyfps-rendering-backend-default/sixtyfps-rendering-backend-gl"] backend-gl = ["sixtyfps-rendering-backend-default/sixtyfps-rendering-backend-gl"]
backend-qt = ["sixtyfps-rendering-backend-default/sixtyfps-rendering-backend-qt"] backend-qt = ["sixtyfps-rendering-backend-default/sixtyfps-rendering-backend-qt"]
# Enable some function used by the integration tests interpreter = ["sixtyfps-interpreter"]
testing = ["sixtyfps-rendering-backend-testing"] testing = ["sixtyfps-rendering-backend-testing"] # Enable some function used by the integration tests
wayland = ["sixtyfps-rendering-backend-default/wayland"]
x11 = ["sixtyfps-rendering-backend-default/x11"]
default = ["backend-gl", "x11", "backend-qt"] default = ["backend-gl", "x11", "backend-qt"]
[dependencies] [dependencies]
sixtyfps-corelib = { version = "=0.2.0", path="../../sixtyfps_runtime/corelib", features = ["ffi"] } sixtyfps-corelib = { version = "=0.2.0", path="../../internal/core", features = ["ffi"] }
sixtyfps-interpreter = { version = "=0.2.0", path="../../internal/interpreter", default-features = false, features = ["ffi"], optional = true }
sixtyfps-rendering-backend-default = { version = "=0.2.0", path="../../sixtyfps_runtime/rendering_backends/default" } sixtyfps-rendering-backend-default = { version = "=0.2.0", path="../../sixtyfps_runtime/rendering_backends/default" }
sixtyfps-rendering-backend-testing = { version = "=0.2.0", path="../../sixtyfps_runtime/rendering_backends/testing", optional = true } sixtyfps-rendering-backend-testing = { version = "=0.2.0", path="../../sixtyfps_runtime/rendering_backends/testing", optional = true }
sixtyfps-interpreter = { version = "=0.2.0", path="../../sixtyfps_runtime/interpreter", default-features = false, features = ["ffi"], optional = true }
[build-dependencies] [build-dependencies]
cbindgen = "0.20"
anyhow = "1.0" anyhow = "1.0"
cbindgen = "0.20"
proc-macro2 = "1.0.11" proc-macro2 = "1.0.11"

View file

@ -20,17 +20,19 @@ crate-type = ["cdylib"]
name = "sixtyfps_node_native" name = "sixtyfps_node_native"
[dependencies] [dependencies]
once_cell = "1.5" sixtyfps-compilerlib = { version = "=0.2.0", path="../../../internal/compiler" }
sixtyfps-compilerlib = { version = "=0.2.0", path="../../../sixtyfps_compiler" } sixtyfps-corelib = { version = "=0.2.0", path="../../../internal/core" }
sixtyfps-interpreter = { version = "=0.2.0", path="../../../sixtyfps_runtime/interpreter", features = ["display-diagnostics"] } sixtyfps-interpreter = { version = "=0.2.0", path="../../../internal/interpreter", features = ["display-diagnostics"] }
sixtyfps-corelib = { version = "=0.2.0", path="../../../sixtyfps_runtime/corelib" }
scoped-tls-hkt = "0.1"
neon = "0.8.0"
css-color-parser2 = "1.0.1"
spin_on = "0.1" #FIXME: remove and delegate to async JS instead
vtable = { version = "0.1.1", path="../../../helper_crates/vtable" } vtable = { version = "0.1.1", path="../../../helper_crates/vtable" }
css-color-parser2 = "1.0.1"
generativity = "1" generativity = "1"
neon = "0.8.0"
once_cell = "1.5"
rand = "0.8" rand = "0.8"
scoped-tls-hkt = "0.1"
spin_on = "0.1" #FIXME: remove and delegate to async JS instead
[build-dependencies] [build-dependencies]
neon-build = "0.8.0" neon-build = "0.8.0"

View file

@ -17,20 +17,23 @@ keywords = ["gui", "toolkit", "graphics", "design", "ui"]
path = "lib.rs" path = "lib.rs"
[features] [features]
x11 = ["sixtyfps-rendering-backend-default/x11", "std"]
wayland = ["sixtyfps-rendering-backend-default/wayland", "std"]
backend-gl = ["sixtyfps-rendering-backend-default/sixtyfps-rendering-backend-gl", "std"] backend-gl = ["sixtyfps-rendering-backend-default/sixtyfps-rendering-backend-gl", "std"]
backend-qt = ["sixtyfps-rendering-backend-default/sixtyfps-rendering-backend-qt", "std"] backend-qt = ["sixtyfps-rendering-backend-default/sixtyfps-rendering-backend-qt", "std"]
default = ["backend-gl", "x11", "backend-qt"]
std = ["sixtyfps-corelib/std"] std = ["sixtyfps-corelib/std"]
wayland = ["sixtyfps-rendering-backend-default/wayland", "std"]
x11 = ["sixtyfps-rendering-backend-default/x11", "std"]
default = ["backend-gl", "x11", "backend-qt"]
[dependencies] [dependencies]
once_cell = { version = "1.5", default-features = false, features = ["alloc"] } sixtyfps-corelib = { version = "=0.2.0", path="../../internal/core", default-features = false }
sixtyfps-macros = { version = "=0.2.0", path = "sixtyfps-macros" } sixtyfps-macros = { version = "=0.2.0", path = "sixtyfps-macros" }
sixtyfps-rendering-backend-default = { version = "=0.2.0", path="../../sixtyfps_runtime/rendering_backends/default" }
const-field-offset = { version = "0.1.2", path = "../../helper_crates/const-field-offset" } const-field-offset = { version = "0.1.2", path = "../../helper_crates/const-field-offset" }
vtable = { version = "0.1.5", path = "../../helper_crates/vtable" } vtable = { version = "0.1.5", path = "../../helper_crates/vtable" }
sixtyfps-corelib = { version = "=0.2.0", path="../../sixtyfps_runtime/corelib", default-features = false }
sixtyfps-rendering-backend-default = { version = "=0.2.0", path="../../sixtyfps_runtime/rendering_backends/default" } once_cell = { version = "1.5", default-features = false, features = ["alloc"] }
pin-weak = { version = "1.1", default-features = false } pin-weak = { version = "1.1", default-features = false }
[package.metadata.docs.rs] [package.metadata.docs.rs]

View file

@ -16,6 +16,7 @@ homepage = "https://sixtyfps.io"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
sixtyfps-compilerlib = { version = "=0.2.0", path = "../../../sixtyfps_compiler", features = ["rust", "display-diagnostics"] } sixtyfps-compilerlib = { version = "=0.2.0", path = "../../../internal/compiler", features = ["rust", "display-diagnostics"] }
thiserror = "1"
spin_on = "0.1" spin_on = "0.1"
thiserror = "1"

View file

@ -17,7 +17,8 @@ proc-macro = true
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
quote = "1.0" sixtyfps-compilerlib = { version = "=0.2.0", path = "../../../internal/compiler", features = ["proc_macro_span", "rust", "display-diagnostics"] }
proc-macro2 = "1.0.17" proc-macro2 = "1.0.17"
sixtyfps-compilerlib = { version = "=0.2.0", path = "../../../sixtyfps_compiler", features = ["proc_macro_span", "rust", "display-diagnostics"] } quote = "1.0"
spin_on = "0.1" spin_on = "0.1"

View file

@ -16,14 +16,16 @@ homepage = "https://sixtyfps.io"
crate-type = ["cdylib"] crate-type = ["cdylib"]
[dependencies] [dependencies]
sixtyfps-interpreter = { path = "../../sixtyfps_runtime/interpreter" } sixtyfps-interpreter = { path = "../../internal/interpreter" }
wasm-bindgen = { version = "0.2.66" }
wasm-bindgen-futures = { version = "0.4.18" }
js-sys = "0.3.44"
console_error_panic_hook = { version = "0.1.6", optional = true }
wee_alloc = { version = "0.4.5", optional = true }
vtable = { version = "0.1.1", path="../../helper_crates/vtable" } vtable = { version = "0.1.1", path="../../helper_crates/vtable" }
console_error_panic_hook = { version = "0.1.6", optional = true }
js-sys = "0.3.44"
wasm-bindgen-futures = { version = "0.4.18" }
wasm-bindgen = { version = "0.2.66" }
wee_alloc = { version = "0.4.5", optional = true }
[dependencies.web-sys] [dependencies.web-sys]
version = "0.3" version = "0.3"
features = [ features = [

View file

@ -47,7 +47,7 @@ once_cell = "1"
url = "2.2.1" url = "2.2.1"
dunce = "1.0.1" dunce = "1.0.1"
linked_hash_set = "0.1.4" linked_hash_set = "0.1.4"
sixtyfps-common = { version = "=0.2.0", path = "../sixtyfps_runtime/common" } sixtyfps-common = { version = "=0.2.0", path = "../common" }
# for processing and embedding the rendered image (texture) # for processing and embedding the rendered image (texture)
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]

View file

@ -0,0 +1 @@
../../../LICENSES/CC-BY-ND-4.0.txt

Some files were not shown because too many files have changed in this diff Show more