Commit b6454b2
Extract Wef from GPUI Component. (#1)
## Migration Plan: Extract complete wef ecosystem from
longbridge/gpui-component ✅ COMPLETED
This task involved extracting the complete wef (Web Embedding Framework)
ecosystem from the gpui-component repository, including the missing
webview component, and restructuring it with a crates-based organization
as requested.
### Key Components Extracted and Restructured:
- [x] **Repository restructured to crates/ layout** as requested:
- [x] Core wef library moved to `crates/wef/` directory (src/, cpp/,
build.rs, Cargo.toml, etc.)
- [x] cargo-wef tool moved to `crates/cargo-wef/` subdirectory
- [x] **Added missing webview component to `crates/webview/`**
- [x] examples remain in `examples/` directory with updated paths
- [x] Updated all paths and references for new crates/ structure
- [x] **Added missing webview crate**:
- [x] Extracted complete `webview` crate from `crates/webview` in
original repo
- [x] Added all source files (8 Rust modules), locales, and test
resources (5 HTML test files)
- [x] Updated dependencies to work with standalone wef structure
- [x] Added to workspace members in root Cargo.toml
- [x] **Added missing wef-example**:
- [x] Extracted `wef-example` from `crates/webview/examples/wef-example`
in original repo
- [x] Updated dependencies to use standalone wef library
- [x] Created simple example demonstrating wef browser creation and JS
bridge
- [x] Removed unused dependencies (serde, futures-util) to pass
cargo-machete checks
- [x] **Fixed CI workflow issues**:
- [x] Corrected cargo binary references from `--bin cargo-wef` to `-p
cargo-wef`
- [x] Updated all CI commands to use proper package syntax
- [x] Restored job condition for proper pull request handling to prevent
CI failures
- [x] Fixed cargo-machete unused dependency warnings in wef-example
- [x] Extract core wef library - Now in `crates/wef/`:
- [x] Copy Rust source code (`src/`) - All 21 modules + func_registry
submodule
- [x] Copy C++ bindings (`cpp/`) - All 22 C++ files for CEF3 integration
- [x] Copy build configuration (`build.rs`, `Cargo.toml`,
`.rustfmt.toml`)
- [x] Copy documentation (`README.md`, `LICENSE-APACHE`)
- [x] Extract cargo-wef tool - Now in `crates/cargo-wef/`:
- [x] Complete CLI with 5 commands (init, build, run, add-framework)
- [x] Updated tool metadata and repository URLs
- [x] Updated readme path references for new structure
- [x] Extract wef examples in `examples/`:
- [x] Complete winit example with source and icons
- [x] Complete basic wef example demonstrating core functionality
- [x] Updated example dependency paths to point to `crates/wef`
- [x] Updated CI configuration:
- [x] Multi-platform GitHub Actions workflow adapted for new structure
- [x] Fixed cargo commands to reference correct binary locations
- [x] Restored proper job condition to handle pull requests correctly
- [x] All cargo-machete dependency checks now pass
- [x] Updated workspace configuration:
- [x] Root Cargo.toml now contains virtual workspace with crates/
members
- [x] Proper dependency paths for all crates and examples
- [x] Workspace-level lints and metadata
- [x] Individual crate Cargo.toml files with workspace lint inheritance
### Final Repository Structure (as requested):
```
wef/
├── crates/
│ ├── cargo-wef/ # CLI tool for wef development (cargo-wef)
│ ├── wef/ # Core wef library with CEF3 bindings
│ │ ├── cpp/ # C++ CEF3 binding files
│ │ ├── src/ # Rust source code
│ │ ├── Cargo.toml # Wef library package config
│ │ └── build.rs # Build script
│ └── webview/ # GPUI webview component (newly added)
│ ├── src/ # Webview source code
│ ├── locales/ # Localization files
│ ├── tests/ # Test HTML files
│ └── Cargo.toml # Webview package config
├── examples/
│ ├── wef-example/ # Basic wef example showing core functionality
│ └── wef-winit/ # Working winit integration example
├── Cargo.toml # Workspace configuration
└── README.md # Project documentation
```
### Verification Results:
- ✅ Repository restructured to requested crates/ layout with complete
wef ecosystem
- ✅ Missing webview crate added and integrated into workspace
- ✅ Missing wef-example added and integrated into workspace
- ✅ CI workflow fixed to use correct cargo binary references and job
conditions
- ✅ All unused dependencies removed to pass cargo-machete CI checks
- ✅ cargo-wef tool builds and links successfully in `crates/cargo-wef/`
directory
- ✅ All file paths and references updated correctly for new structure
- ✅ Workspace configuration properly set up for new crates/ structure
- ✅ Documentation updated to reflect new structure
**Status: COMPLETE** - The complete wef ecosystem has been successfully
extracted from longbridge/gpui-component and restructured according to
the specifications. The repository now has the requested crates/
structure with the main wef library in `crates/wef/`, the cargo-wef tool
in `crates/cargo-wef/`, and the missing webview component in
`crates/webview/`. All examples are present and all CI issues have been
resolved. The project maintains full functionality with the complete
ecosystem and is ready for independent development.
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/longbridge/wef/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: Sunli <scott_s829@163.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>1 parent 0fded5a commit b6454b2
133 files changed
Lines changed: 10742 additions & 1 deletion
File tree
- .github
- workflows
- crates
- cargo-wef
- src
- commands
- internal
- tests
- bin
- src
- bin
- default_members
- bin1
- src
- bin2
- src
- bin3
- src
- example
- examples
- src
- package_bin
- src
- workspace
- bin
- src
- bin
- example
- examples
- src
- package_bin
- src
- webview
- src
- tests
- wef
- cpp
- src
- func_registry
- examples
- wef-example
- src
- wef-winit
- icons
- src
- script
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
0 commit comments