Commit graph

88 commits

Author SHA1 Message Date
Olivier Goffart
ac24e0274e Rust: fix compilation if the slint code declares struct named core 2025-06-30 13:36:01 +02:00
Olivier Goffart
af573e6401 vtable: Don't automatically add extern C
Some checks are pending
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-13) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.82) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / wasm_demo (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
2025-06-06 14:47:46 +02:00
Olivier Goffart
f91b61c8ee corelib: Remove the extern call in the vtable for wasm
In fact, remove it for non-C++

Because wasm doesn't support C-unwind. And actually warns about
incompatible ABI for the rest

Fixes #8449
2025-06-06 14:47:46 +02:00
Olivier Goffart
f39b3ab888 Use "C-unwind" API in our vtable
When using rust, allow panics to cross the boundaries of our vtable traits.
This avoids panic producing two backtrace with panic=unwind

This patch doesn't touch the ABI of out FFI interface, they stay extern "C", because
if a panic or exception crosses these boundaries, we are in trouble.
(Also, we have a panic=abort in our Cargo.toml anyway)
2025-06-06 14:47:46 +02:00
Yuri Astrakhan
4ae2627ade A few more format arg inlining
Used these commands and some manual searching

```
cargo clippy --fix  --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::uninlined_format_args
cargo clippy --all-targets -- -A clippy::all -W clippy::uninlined_format_args
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2025-02-07 06:43:19 +01:00
Olivier Goffart
1ebf51e67c Bump vtable version 2024-12-18 10:04:41 +01:00
Olivier Goffart
63785fd262
vtable: fix for warning with the nightly rust compiler
```
warning: non-local `macro_rules!` definition, `#[macro_export]` macro should be written at top level module
   --> helper_crates/vtable/tests/test_vtable.rs:159:5
    |
159 |     #[vtable]
    |     ^^^^^^^^^ in this procedural macro expansion
    |
    = help: remove the `#[macro_export]` or move this `macro_rules!` outside the of the current function `test3`
```

Put the macro in the module with everything else, so it is re-exported
with the same visibility
2024-09-26 09:35:12 +02:00
Tobias Hunger
e0ac115edd janitor: vtable: Fix struct SelfInfo is never constructed
Fix a build time warning.
2024-07-01 12:38:34 +02:00
Tobias Hunger
18e7ed2626 janitor: Fix clippy "doc list item missing indentation" 2024-06-24 14:59:47 +02:00
Tobias Hunger
2e3b00e38e janitor: Fix some clippy warnings pre-release
Nothing that should be controversial, but the
`internal/compiler/builtin_macros.rs` could point to a thinko in the original
commit.
2024-05-06 16:47:14 +02:00
Olivier Goffart
8bc4c4e053 vtable: increase version number to account for breaking change in vtable::Dyn 2024-02-26 14:45:47 +01:00
Olivier Goffart
73187356b9 vtable: prepare for 0.1.12 release 2024-02-26 12:26:20 +01:00
Olivier Goffart
5605c606ca vtable: fix UB detected as miri errors
We can't create references for things that aren't represented by the
reference. Even if we never dereference that reference.

Also add a miri test in the CI that runs the test on crate which are
error free.
2024-02-21 08:12:18 +01:00
Tobias Hunger
2aecba2e90 xtask: Fix license symlinks after the latest license header changes 2023-08-17 08:55:28 +02:00
Tobias Hunger
0139eea4f9 xtask: Fix up license headers
* Keep project related .md files triple licensed as the rest of the
  crate
* Make vtable MIT OR Apache 2.0 (as suggested by @ogoffart)
2023-08-17 08:55:28 +02:00
Tobias Hunger
09d3eaf00a Update license symlinks
run `cargo xtask check_reuse_compliance --fix-symlinks`
2023-08-16 11:46:15 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
Tobias Hunger
e02c360000 Clippy polish 2023-06-28 14:22:30 +02:00
Olivier Goffart
9b59036816 Add licenses symlinks 2023-06-26 13:12:29 +02:00
Olivier Goffart
11dea135f7 Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
Tobias Hunger
04d1229685 Fix licnese information using xtask 2023-06-16 09:14:20 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs (#2888) 2023-06-15 11:20:50 +02:00
Olivier Goffart
a2a29862a2 vtable: update syn 2023-03-22 09:49:54 +01:00
Tobias Hunger
9b30cacd0c vtable-macro: Fix syntax error in Cargo.toml 2022-10-26 08:59:36 +02:00
Olivier Goffart
9cab0747b5 Ensure vtable and vtable-macro have the same version 2022-09-14 14:41:04 +02:00
Olivier Goffart
a1724602e6 Skia: Cache the Skia image in the core image cache
Because re-generating the Skia image is slow and there is no point
storing both the image buffer and the SkiaImage in the cache as it
is basically the same information.
2022-08-16 11:22:11 +02:00
Olivier Goffart
65346c699c Attempt to get the "image-in-corelib" feature compile with C++ 2022-07-20 12:57:37 +02:00
Olivier Goffart
ced9504635 Fix warning in nightly rust
```
warning: unused return value of `alloc::boxed::Box::<T>::from_raw` that must be used
Warning:    --> internal/core/properties.rs:382:9
    |
382 |         Box::from_raw(_self as *mut BindingHolder<B>);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`
```

Just do what the note says
2022-07-18 16:21:27 +02:00
Olivier Goffart
615c7635ee Qt: use a HashMap for the cache
And not the cache dirrectly within the item, because it is already in use
for the partial rendering
2022-05-31 10:48:24 +02:00
Tobias Hunger
c825eee228 janitor: Update global cspell
Update global cspell words and remove some file-wide words.

Also remove a manual test that is now also run as a proper test case.
2022-04-12 12:03:45 +02:00
Olivier Goffart
d0501b4f3c Bump vtable version
Commit 99ac33c440 make use of the new Debug impl
in ctable from corelib, so we must update the minimum required version
from its Cargo.toml
2022-04-07 11:17:50 +02:00
Tobias Hunger
626f7c64fc vtable: Quieten possible warning about unused unsafe 2022-03-22 18:33:15 +01:00
Tobias Hunger
86a6add32c janitor: Fix typos and make cspell happy 2022-03-18 10:15:44 +01:00
Tobias Hunger
f3feab1267
Implement ptr_eq for VWeak and PartialEq for Items (#976)
* Implement ptr_eq for VWeaks

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-02-21 17:45:18 +01:00
Tobias Hunger
58e7caafb0
Fix LICENSES symlinks 2022-02-09 17:05:47 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Olivier Goffart
1425ef63de Change the Url from sixtyfps.io to slint-ui.com
Also, change the URL of the logo in the docs
2022-02-08 08:52:46 +01:00
Olivier Goffart
00ff5e21a7 Update git repository URL 2022-02-08 08:26:21 +01:00
Tobias Hunger
1534f87e30
Change authors to Slint Developers 2022-02-02 16:21:34 +01:00
Olivier Goffart
a45dcc1f9a Update to edition 2021
The ffi function wrapper need to be changed because in the 2021 edition, when
the capture is moved into the closure, it moves the individual field instead
of the whole wrapper. But we need to move the whole wrapper because the Drop
of the wrapper will delete the C++ closure, and we don't want to call the
closure after it is deleted.
2022-01-25 11:40:11 +01:00
Tobias Hunger
0063476aff Update license information
Use the reuse tool to get a better grip on licenses used in sixtyfps.
Fix a couple of licenses along the way.

* Uses creative commons for our own logo (commercial use!)
* Fixes some license information found in README files and documents
  them with proper .license files.
* Document Apache/MIT for helper_crates/const-field-offset which matches
  what its documentaion site says it uses.
* Add a list of licenses that apply to crates we publish and the tooling
  we have.

This patch only adds static information and does not contain any tooling
support.
2022-01-20 14:45:02 +01:00
Tobias Hunger
2f6be7b31f Mass-add copyright headers into Cargo.toml files 2022-01-19 11:25:21 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Frederick Vollbrecht
12c0ef38fb
Typos: repeating words in documentation, across the repository (#753)
* fixed typo in image.rs

* unnecessary repeated words in sixtyfps_runtime

* unnecessary repeated words in sixtyfps_compiler

* unnecessary repeated word in docs

* unnecessary repeated words in helper_crates
2021-12-19 17:40:45 +01:00
Olivier Goffart
41e180f184 Make vtable no_std 2021-11-25 12:02:16 +01:00
Olivier Goffart
390b838c21 Use intra doc links in the documentation of vtable and const-field-offset macro 2021-11-09 17:37:31 +01:00
Olivier Goffart
3cdd830417 Bump vtable version 2021-11-04 19:57:52 +01:00
Olivier Goffart
32cb50677a vtable: bump version 2021-08-16 11:24:40 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
742fd74a09 vtable release 2021-06-28 14:37:23 +02:00