Skip to content

base: move the native examples into their own package - #2963

Merged
huacnlee merged 3 commits into
longbridge:mainfrom
Tryanks:base-examples-package
Sep 5, 2026
Merged

base: move the native examples into their own package#2963
huacnlee merged 3 commits into
longbridge:mainfrom
Tryanks:base-examples-package

Conversation

@Tryanks

@Tryanks Tryanks commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

gpui-base declares gpui_platform for every non-wasm target, but only the examples use it. For targets that supply their own backend through Application::with_platform (iOS, Android), the build fails inside gpui_platform.

Following what examples/wasm already does, this moves the native showcase and motion examples into their own package, gpui-base-examples, which includes the same shared code with #[path]; the gpui-base manifest no longer mentions gpui_platform. src/bin/components.rs and examples/components.rs were two entry points to the same showcase and become the package's components bin; the README commands are updated accordingly.

Verified:

  • cargo check -p gpui-base-examples --bins
  • cargo check -p gpui-base --examples --tests --benches
  • cargo check -p gpui-base --target aarch64-apple-ios-sim and --target wasm32-unknown-unknown
  • cargo check --workspace
  • cargo fmt --all --check

Closes #2962

gpui-base declared gpui_platform for every non-wasm target although only the
examples use it, which fails the build on targets that supply their own
gpui::Platform (iOS, Android). Give the native showcase and motion examples a
package of their own, like examples/wasm already has, so the library manifest
no longer mentions gpui_platform. Closes longbridge#2962.
@huacnlee
huacnlee merged commit 9d9bd9b into longbridge:main Sep 5, 2026
9 checks passed
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.

gpui-base depends on gpui_platform it never uses; fails to compile for iOS / Android targets

2 participants