Commit graph

32 commits

Author SHA1 Message Date
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
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
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
Olivier Goffart
11dea135f7 Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs (#2888) 2023-06-15 11:20:50 +02: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
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Olivier Goffart
41e180f184 Make vtable no_std 2021-11-25 12:02:16 +01:00
Olivier Goffart
73ec3e6701 vtable: fix clippy warnings in tests
(ran with cargo clippy --tests)
2021-08-16 11:04:33 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
7f66ca9584 Add a function in the ComponentVTable to get an ItemRef from an index
Needed to adjust vtable so it can work if the return type has a reference
2020-11-11 14:29:44 +01:00
Olivier Goffart
58cdaeb8dd Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Olivier Goffart
0b1648d891 Fix formating 2020-08-04 11:52:47 +02:00
Olivier Goffart
1bfd708784 Change the field_offsets() function to a FIELD_OFFSETS associated const 2020-08-03 16:04:55 +02:00
Olivier Goffart
86a85cf838 vtable: change #[offset] to #[field_offset]
And add a documentation for it
2020-08-03 11:26:48 +02:00
Olivier Goffart
caca0d0ba4 Put the component in a Pin<>
Removed the drop and create from the ComponentVTable:
since we are not using VBox<ComponentVTable>, this simplifies a bit
the code of the interpreter and everything else.

But there is still a lot of changes everywhere to support that the Component
is pinned.
This is just for the component. Which would be required if later we want
to access the properties as Pin<Property<_>>. But we have not yet ability
to do projections
2020-06-24 14:13:27 +02:00
Olivier Goffart
bbb2b487b9 Implement a way to create a VRef for non static vtable 2020-06-12 17:09:51 +02:00
Olivier Goffart
5f01ec30ee Fix the viewer using generated rtti from a macro
One thing that needed to change is that we needed the vtable to be unique
2020-05-30 15:08:51 +02:00
Olivier Goffart
8c39ada671 Add downcast method to VRef and VRefMut 2020-05-28 09:18:28 +02:00
Olivier Goffart
07942da4bb vtable: introduce VOffset 2020-05-18 11:06:44 +02:00
Olivier Goffart
5a9cbaae66 vtable add support for field offset in the vtable 2020-05-18 11:06:44 +02:00
Olivier Goffart
aff3d7e14b vtable: add safe way to construct references 2020-05-18 11:06:44 +02:00
Olivier Goffart
810a3905a7 Add VBox::new 2020-05-18 11:06:44 +02:00
Olivier Goffart
b745c616f7 Add a trait to get the vtable for a type 2020-05-18 11:06:44 +02:00
Olivier Goffart
4ca45ca4da vtable crate: Some refactoring and simplifications 2020-05-18 11:06:44 +02:00
Olivier Goffart
49fc23224e vtable: Remove the TraitType wrapper, and allow Option<fn> 2020-05-18 11:06:44 +02:00
Olivier Goffart
8d9a64d249 vtable: add a macro to create a static vtable 2020-05-18 11:06:44 +02:00
Olivier Goffart
62010be72e vtable: support associated consts 2020-05-18 11:06:44 +02:00
Olivier Goffart
686f4c9591 More work on the vtable macro to adapt the Component
This does not work yet
2020-05-18 11:04:54 +02:00
Olivier Goffart
1ced4224b5 More work on the vtable crate 2020-05-18 11:04:54 +02:00
Olivier Goffart
5c5df6b8e3 Macro to generate trait and safe abstraction for a vtable 2020-05-13 23:07:59 +02:00