Commit graph

10 commits

Author SHA1 Message Date
Simon Hausmann
87e0cc7d85 Fix resource embedding doing a wasm build of a project using the sixtyfps! macro
We need to embed resources in wasm builds. Unfortunately we can't detect
that we're called by say wasm-pack and "TARGET"/"HOST" only works inside
build.rs. So instead, to keep things simple, this change always embeds
the image resources when targeting Rust.

The `SIXTYFPS_EMBED_RESOURCES` environment variable can be used to
override this anywhere for any language.

Fixes #130
2020-12-10 15:09:32 +01:00
Olivier Goffart
8b10414451 Parse signal return type
(currently does nothing with it)
2020-12-01 18:47:49 +01:00
Olivier Goffart
2d016dffda Print the diagnostics in stderr for files which do not have span information 2020-12-01 12:10:43 +01:00
Olivier Goffart
19458eb2e6 sixtyfps-macro: recompile when the style changes 2020-12-01 12:10:43 +01:00
Olivier Goffart
8b76114083 Recompile if a dependencies changes 2020-11-18 13:23:59 +01:00
Olivier Goffart
359f42c5f7 Prepare the compiler to be async
This will allow the online editor to load imports from URL asynchroniously later

Since currently the compiler is only working on a single thread, and that we
never await on a future that could block, it is allowed to use the spin_on executor
2020-10-30 15:00:04 +01:00
Olivier Goffart
76b7f1aef6 Allow dashes in identifier
Currenly, dashes are normalized to '_'.
Dashes are not allowed at the begining of an identifier.
If an identifier with a dash is not found, we also look for identifier
without a dash and if that exist, we hint the user to use spaces.

Issue #52
2020-10-22 18:32:25 +02:00
Olivier Goffart
0c253efb0d Some changes in the rust documentation and its README 2020-10-20 18:02:28 +02:00
Olivier Goffart
65ec7e9b7d Fix panic on parse error
Properly report the errors instead.

The later passes panic if the AST is not well formed
2020-10-19 19:43:13 +02:00
Olivier Goffart
a650f29abe Rename sixtyfps-rs-macro to sixtyfps-macros 2020-10-13 11:10:26 +02:00
Renamed from api/sixtyfps-rs/sixtyfps-rs-macro/lib.rs (Browse further)