Skip to content

Conversation

@theduke
Copy link
Contributor

@theduke theduke commented Sep 29, 2025

Currently, when no backend is enabled, we get a horrible mess of errors.

This commit:

  • Makes sure the wasmer-compiler crate can be compiled withou the
    compiler feature enabled
  • Makes sure the compiler crate fails to compile with a single
    meaningful message if neither core nor std features are enabled
  • Makes sure the api crate fails to compile with a single meaninful
    error when no backend is enabled

Note: our current module structure doesn't make it trivial to do this
cleanly.

I went for an approach that has more duplication, but is minimally
invasive.

Currently, when no backend is enabled, we get a horrible mess of errors.

This commit:
* Makes sure the wasmer-compiler crate can be compiled withou the
  compiler feature enabled
* Makes sure the compiler crate fails to compile with a single
  meaningful message if neither core nor std features are enabled
* Makes sure the api crate fails to compile with a single meaninful
  error when no backend is enabled

Note: our current module structure doesn't make it trivial to do this
cleanly.

I went for an approach that has more duplication, but is minimally
invasive.
@Arshia001
Copy link
Member

LGTM, but can we turn the overly verbose cfgs into a macro please?

@theduke theduke changed the title fix(build): Meaningful backend compilation errors in api fix(build): Meaningful compilation errors when no backend feature enabled Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants