Commit graph

513 commits

Author SHA1 Message Date
Simon Hausmann
cab22f8355 Rename the sixtyfps-compilerlib crate 2022-02-01 18:08:18 +01:00
Simon Hausmann
9494068201 Rename the sixtyfps-rendering-backend-selector crate 2022-02-01 18:06:49 +01:00
Simon Hausmann
2e04b3c8b3 Rename the sixtyfps-rendering-backend-gl crate 2022-02-01 18:04:38 +01:00
Simon Hausmann
19eb3e671d Rename sixtyfps-rendering-backend-qt 2022-02-01 18:04:32 +01:00
Simon Hausmann
ad0c020aa4 Rename the sixtyfps-corelib crate 2022-02-01 18:04:30 +01:00
Olivier Goffart
8273a3e147 Use document-features from crates.io 2022-02-01 17:55:11 +01:00
Olivier Goffart
f9c3e7a8de C++ interpreter: first crash when invoking native callback
This was a regression following the move to the edition 2021.
The CallbackUserData was not capture in the lamda, its member were moved.
So the destructor was called right after it was set.
We must make sure we capture the whole CallbackUserData, so put the callback
inside of it. This also reduce a bit of code duplication at the same time.

Test the callback invokation with statefull lambda
2022-01-31 22:25:24 +01:00
Tobias Hunger
0d358251c9 Janitor: More clippy stuff 2022-01-31 20:59:45 +01:00
Olivier Goffart
38d7ac42eb Add compatibility feature to our public crates
We want to be able to put existing functionality behind a feature flag while keeping
the semver compatibility.
This is only possible if that new feature flag is enabled by default, but this is not
working if the users have done `default-features = false` in their Cargo.toml.
So we add new `compat-x-y-z` feature that is mandatory to have and which is
enforced with a `compile_error!`

Now, users that whishes to not have the default features must enable it explicitly.
Say we want only x11 but not qt and wayland, the user will do
```toml
sixtyfps = { version = "0.2", default-features = false, features = ["x11", "compat-0-2-0"] }
```

Now, imagine that in the version 0.2.3, we put the SVG support behind a feature flag.
we will do this in out Cargo.toml:

```toml
[features]
default = ["compat-0-2-0", "x11", "wayland"]
compat-0-2-0 = ["compat-0-2-3", "svg"]
compat-0-2-3 = []

svg = [...]
...
```

That way, the svg feature will be enabled by default for all the users who used previous version
of SixtyFPS, and people that want to disable "svg" can just change from compat-0-2-0 to
compat-0-2-3 in their Cargo.toml
2022-01-31 17:30:24 +01:00
Olivier Goffart
bdd0b4cc6b document-features: Don't add the Feature flags in the title 2022-01-31 16:38:11 +01:00
Olivier Goffart
6371192bec Add a macro to generate the features documentation from comments in Cargo.toml 2022-01-31 16:38:11 +01:00
Tobias Hunger
a3b86690ff [reorg]: Move the rendering backends into internal 2022-01-31 16:00:50 +01:00
Tobias Hunger
e6b24bceec [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.
2022-01-31 16:00:50 +01:00