Skip to content

Commit

Permalink
Fix futursolo#120 - don't compile in JsValue in proc_macro. futursolo…
Browse files Browse the repository at this point in the history
…#121

This gets rid of the compile error:
/usr/bin/ld: __wbindgen_realloc: undefined version: 
          /usr/bin/ld: __wbindgen_malloc: undefined version: 
          /usr/bin/ld: __wbindgen_free: undefined version: 
          /usr/bin/ld: __wbindgen_exn_store: undefined version: 
          /usr/bin/ld: failed to set dynamic section sizes: bad value
          collect2: error: ld returned 1 exit status
          
error: could not compile `stylist-macros` (lib) due to previous error

This is just a test-verification of the below commit by @finnbear

futursolo@9272103
  • Loading branch information
universal-git authored Jun 5, 2023
1 parent fbd788f commit a22aba4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/stylist-core/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
use thiserror::Error;

#[cfg(target_arch = "wasm32")]
type JsValue = wasm_bindgen::JsValue;
#[cfg(not(target_arch = "wasm32"))]
type JsValue = ();

#[derive(Debug, Error, PartialEq)]
pub enum Error {
/// Failed to parse CSS.
Expand All @@ -16,7 +21,8 @@ pub enum Error {
///
/// This is usually raised when the style element failed to mount.
#[error("Failed to Interact with Web API. Are you running in Browser?")]
Web(Option<wasm_bindgen::JsValue>),
Web(Option<JsValue>),


/// Failed to read styles from the StyleManager.
///
Expand Down

0 comments on commit a22aba4

Please sign in to comment.