Pages
  • life with BSD
  • 2025-06-05 Ripgrep or ripgrep-all
  • 2025-06-02 Ripgrep a nice Rust utility for ports spelunking
  • 2025-05-31 Get started with gpui on FreeBSD
  • 2025-05-29 Query freshports with Deno
  • 2025-05-27 Trying out Defuddle an npm tool via Deno
  • 2025-05-25 Deno for FreeBSD
  • 2025-05-23 A new beginning
life with BSD
  • life with BSD
  • 2025-06-05 Ripgrep or ripgrep-all
  • 2025-06-02 Ripgrep a nice Rust utility for ports spelunking
  • 2025-05-31 Get started with gpui on FreeBSD
  • 2025-05-29 Query freshports with Deno
  • 2025-05-27 Trying out Defuddle an npm tool via Deno
  • 2025-05-25 Deno for FreeBSD
  • 2025-05-23 A new beginning

2025-05-31 Get started with gpui on FreeBSD

I am interested in the gui framework that powers the Zed editor and the possibities of a cross platform gui framework that ALSO does not forget the BSDs (looking at you flutter). I will be spending some more of my blog post time exploring the Rust ecosystem on FreeBSD in 2025. While Zed itself is not available for FreeBSD currently, perhaps there is hope for gpui? Let's give it a shot. Here is a abbreviated intro of the steps I took to try to compile a hello world with gpui. I am going to assume you already have a rust environment ready to go on FreeBSD. Here is the version of rustc I used for this post.

$ rustc --version
rustc 1.86.0 (05f9846f8 2025-03-31)  

There happens to be a tool called create-gpui-app. Install that (instructional blog post forthcoming) and use it to create a template app.

$ create-gpui-app --name gpui-hello-world
Successfully created new gpui app project 'gpui-hello-world'

Let's see what got created with the venerable tree utility. Luckily, it's pretty reasonable small.

$ cd gpui-hello-world
$ tree
.
├── Cargo.lock
├── Cargo.toml
├── README.md
└── src
    └── main.rs

2 directories, 4 files

If we check the contents of src/main.rs it should look something like the following:

use gpui::*;

struct HelloWorld {
    text: SharedString,
}

impl Render for HelloWorld {
    fn render(&mut self, _window: &mut Window, _cx: &mut Context<Self>) -> impl IntoElement {
        div()
            .flex()
            .bg(rgb(0x2e7d32))
            .size_full()
            .justify_center()
            .items_center()
            .text_xl()
            .text_color(rgb(0xffffff))
            .child(format!("Hello, {}!", &self.text))
    }
}

fn main() {
    Application::new().run(|cx: &mut App| {
        cx.open_window(WindowOptions::default(), |_, cx| {
            cx.new(|_cx| HelloWorld {
                text: "World".into(),
            })
        })
        .unwrap();
    });
}  

Okay, now we have a hello world example. Let's to see if that builds! Note, that the zed dependency should be recent (mine was at git commit hash 40c91d5d at the time of this writing). I did have issue trying to compile the exact same hello world code with earlier revisions of the zed dependency.

Here are my results:


$ cargo build --release
 Compiling proc-macro2 v1.0.95
 Compiling unicode-ident v1.0.18
 Compiling libc v0.2.172
 Compiling cfg-if v1.0.0
 Compiling autocfg v1.4.0
 Compiling serde v1.0.219
 Compiling libm v0.2.15
 Compiling version_check v0.9.5
 Compiling typeid v1.0.3
 Compiling bitflags v2.9.1
 Compiling crossbeam-utils v0.8.21
 Compiling once_cell v1.21.3
 Compiling pin-project-lite v0.2.16
 Compiling typenum v1.18.0
 Compiling smallvec v1.15.0
 Compiling num-traits v0.2.19
 Compiling memchr v2.7.4
 Compiling generic-array v0.14.7
 Compiling futures-core v0.3.31
 Compiling pkg-config v0.3.32
 Compiling futures-io v0.3.31
 Compiling slab v0.4.9
 Compiling quote v1.0.40
 Compiling syn v2.0.101
 Compiling arrayvec v0.7.6
 Compiling parking v2.2.1
 Compiling stable_deref_trait v1.2.0
 Compiling concurrent-queue v2.5.0
 Compiling cfg_aliases v0.2.1
 Compiling foldhash v0.1.5
 Compiling fastrand v2.3.0
 Compiling hashbrown v0.15.3
 Compiling errno v0.3.12
 Compiling getrandom v0.2.16
 Compiling event-listener v5.4.0
 Compiling rand_core v0.6.4
 Compiling libloading v0.8.8
 Compiling equivalent v1.0.2
 Compiling rustix v1.0.7
 Compiling indexmap v2.9.0
 Compiling event-listener-strategy v0.5.4
 Compiling shlex v1.3.0
 Compiling simd-adler32 v0.3.7
 Compiling cc v1.2.25
 Compiling futures-lite v2.6.0
 Compiling tracing-core v0.1.33
 Compiling crypto-common v0.1.6
 Compiling litemap v0.8.0
 Compiling rustversion v1.0.21
 Compiling writeable v0.6.1
 Compiling zerocopy v0.8.25
 Compiling icu_properties_data v2.0.1
 Compiling winnow v0.7.10
 Compiling rustix v0.38.44
 Compiling adler2 v2.0.0
 Compiling heck v0.5.0
 Compiling icu_normalizer_data v2.0.0
 Compiling miniz_oxide v0.8.8
 Compiling crossbeam-epoch v0.9.18
 Compiling either v1.15.0
 Compiling toml_datetime v0.6.9
 Compiling thiserror v1.0.69
 Compiling rayon-core v1.12.1
 Compiling crossbeam-deque v0.8.6
 Compiling block-buffer v0.10.4
 Compiling async-lock v3.4.0
 Compiling synstructure v0.13.2
 Compiling toml_edit v0.22.26
 Compiling num-integer v0.1.46
 Compiling lock_api v0.4.13
 Compiling crc32fast v1.4.2
 Compiling subtle v2.6.1
 Compiling getrandom v0.3.3
 Compiling static_assertions v1.1.0
 Compiling futures-sink v0.3.31
 Compiling anyhow v1.0.98
 Compiling digest v0.10.7
 Compiling flate2 v1.1.1
 Compiling dlib v0.5.2
 Compiling scopeguard v1.2.0
 Compiling async-task v4.7.1
 Compiling atomic-waker v1.1.2
 Compiling tinyvec_macros v0.1.1
 Compiling tinyvec v1.9.0
 Compiling piper v0.2.4
 Compiling proc-macro-crate v3.3.0
 Compiling serde_derive v1.0.219
 Compiling zerofrom-derive v0.1.6
 Compiling yoke-derive v0.8.0
 Compiling bytemuck_derive v1.9.3
 Compiling zerovec-derive v0.11.1
 Compiling displaydoc v0.2.5
 Compiling tracing-attributes v0.1.28
 Compiling enumflags2_derive v0.7.11
 Compiling bytemuck v1.23.0
 Compiling thiserror-impl v1.0.69
 Compiling zerofrom v0.1.6
 Compiling futures-macro v0.3.31
 Compiling yoke v0.8.0
 Compiling strum_macros v0.26.4
 Compiling thiserror-impl v2.0.12
 Compiling zerovec v0.11.2
 Compiling zerotrie v0.2.2
 Compiling tracing v0.1.41
 Compiling polling v3.8.0
 Compiling async-io v2.4.1
 Compiling futures-channel v0.3.31
 Compiling tinystr v0.8.1
 Compiling icu_locale_core v2.0.0
 Compiling potential_utf v0.1.2
 Compiling icu_collections v2.0.0
 Compiling ppv-lite86 v0.2.21
 Compiling async-channel v2.3.1
 Compiling wayland-sys v0.31.6
 Compiling slotmap v1.0.7
 Compiling log v0.4.27
 Compiling semver v1.0.26
 Compiling futures-task v0.3.31
 Compiling utf8_iter v1.0.4
 Compiling percent-encoding v2.3.1
 Compiling icu_provider v2.0.0
 Compiling pin-utils v0.1.0
 Compiling form_urlencoded v1.2.1
 Compiling futures-util v0.3.31
 Compiling icu_properties v2.0.1
 Compiling icu_normalizer v2.0.0
 Compiling blocking v1.6.1
 Compiling idna_adapter v1.2.1
 Compiling idna v1.0.3
 Compiling rayon v1.10.0
 Compiling num-bigint v0.4.6
 Compiling zvariant_utils v3.2.0
 Compiling wayland-backend v0.3.10
 Compiling signal-hook-registry v1.4.5
 Compiling crunchy v0.2.3
 Compiling erased-serde v0.4.6
 Compiling serde_fmt v1.0.3
 Compiling zvariant_derive v5.5.3
 Compiling value-bag-serde1 v1.11.1
 Compiling value-bag v1.11.1
 Compiling url v2.5.4
 Compiling async-signal v0.2.11
 Compiling enumflags2 v0.7.11
 Compiling num-rational v0.4.2
 Compiling zeroize_derive v1.4.2
 Compiling euclid v0.22.11
 Compiling memmap2 v0.9.5
 Compiling quick-xml v0.37.5
 Compiling aho-corasick v1.1.3
 Compiling memoffset v0.9.1
 Compiling tiny-keccak v2.0.2
 Compiling itoa v1.0.15
 Compiling regex-syntax v0.8.5
 Compiling downcast-rs v1.2.1
 Compiling workspace-hack v0.1.0
 Compiling bitflags v1.3.2
 Compiling endi v1.1.0
 Compiling wayland-client v0.31.10
 Compiling roxmltree v0.20.0
 Compiling cpufeatures v0.2.17
 Compiling scoped-tls v1.0.1
 Compiling ash v0.38.0+1.3.281
 Compiling fontconfig-parser v0.5.8
 Compiling regex-automata v0.4.9
 Compiling zvariant v5.5.3
 Compiling wayland-scanner v0.31.6
 Compiling zeroize v1.8.1
 Compiling rustc_version v0.4.1
 Compiling async-process v2.3.1
 Compiling spin v0.9.8
 Compiling profiling-procmacros v1.0.16
 Compiling async-executor v1.13.2
 Compiling block-padding v0.3.3
 Compiling half v2.6.0
 Compiling nix v0.30.1
 Compiling core_maths v0.1.1
 Compiling bstr v1.12.0
 Compiling same-file v1.0.6
 Compiling unicode-properties v0.1.3
 Compiling serde_json v1.0.140
 Compiling minimal-lexical v0.2.1
 Compiling paste v1.0.15
 Compiling float-cmp v0.9.0
 Compiling unicode-script v0.5.7
 Compiling syn v1.0.109
 Compiling thiserror v2.0.12
 Compiling termcolor v1.4.1
 Compiling aligned-vec v0.5.0
 Compiling built v0.7.7
 Compiling ryu v1.0.20
 Compiling v_frame v0.3.8
 Compiling rav1e v0.7.1
 Compiling nom v7.1.3
 Compiling strict-num v0.1.1
 Compiling globset v0.4.16
 Compiling walkdir v2.5.0
 Compiling sha2 v0.10.9
 Compiling ttf-parser v0.25.1
 Compiling inout v0.1.4
 Compiling profiling v1.0.16
 Compiling pathfinder_simd v0.5.5
 Compiling zbus_names v4.2.0
 Compiling lyon_geom v1.0.6
 Compiling futures-executor v0.3.31
 Compiling async-net v2.0.0
 Compiling async-fs v2.1.2
 Compiling rand_chacha v0.3.1
 Compiling rand_core v0.9.3
 Compiling font-types v0.9.0
 Compiling pin-project-internal v1.1.10
 Compiling freetype-sys v0.20.1
 Compiling fdeflate v0.3.7
 Compiling naga v25.0.1
 Compiling quick-xml v0.30.0
 Compiling x11 v2.21.0
 Compiling yeslogic-fontconfig-sys v6.0.0
 Compiling gpu-alloc-types v0.3.0
 Compiling rustc-hash v1.1.0
 Compiling parking_lot_core v0.9.11
 Compiling bit-vec v0.8.0
 Compiling unicode-width v0.2.0
 Compiling as-raw-xcb-connection v1.0.1
 Compiling arrayref v0.3.9
 Compiling codespan-reporting v0.12.0
 Compiling bit-set v0.8.0
 Compiling tiny-skia-path v0.11.4
 Compiling xcb v1.5.0
 Compiling pin-project v1.1.10
 Compiling png v0.17.16
 Compiling read-fonts v0.29.2
 Compiling rand_chacha v0.9.0
 Compiling rand v0.8.5
 Compiling futures v0.3.31
 Compiling lyon_path v1.0.7
 Compiling zbus_macros v5.7.1
 Compiling av1-grain v0.2.4
 Compiling const-random-macro v0.1.16
 Compiling cipher v0.4.4
 Compiling rust-embed-utils v8.7.2
 Compiling lazy_static v1.5.0
 Compiling maybe-rayon v0.1.1
 Compiling strum v0.26.3
 Compiling rgb v0.8.50
 Compiling arg_enum_proc_macro v0.3.4
 Compiling num-derive v0.4.2
 Compiling async-trait v0.1.88
 Compiling serde_repr v0.1.20
 Compiling hmac v0.12.1
 Compiling num-iter v0.1.45
 Compiling itertools v0.12.1
 Compiling async-broadcast v0.7.2
 Compiling kurbo v0.11.2
 Compiling simd_helpers v0.1.0
 Compiling ordered-stream v0.2.0
 Compiling ahash v0.8.12
 Compiling spirv v0.3.0+sdk-1.3.268.0
 Compiling new_debug_unreachable v1.0.6
 Compiling bitstream-io v2.6.0
 Compiling xim-parser v0.2.1 (https://github.com/XDeme1/xim-rs?rev=d50d461764c2213655cd9cf65a0ea94c70d3c4fd#d50d4617)
 Compiling deflate64 v0.1.9
 Compiling unicode-bidi-mirroring v0.4.0
 Compiling unicode-bidi v0.3.18
 Compiling quick-error v2.0.1
 Compiling x11rb-protocol v0.13.1
 Compiling hexf-parse v0.2.1
 Compiling imgref v1.11.0
 Compiling unicode-width v0.1.14
 Compiling weezl v0.1.10
 Compiling noop_proc_macro v0.3.0
 Compiling raw-window-handle v0.6.2
 Compiling hex v0.4.3
 Compiling serde_json_lenient v0.2.4
 Compiling byteorder v1.5.0
 Compiling option-ext v0.2.0
 Compiling siphasher v1.0.1
 Compiling unicode-ccc v0.4.0
 Compiling num-bigint-dig v0.8.4
 Compiling rustybuzz v0.20.1
 Compiling svgtypes v0.15.3
 Compiling dirs-sys v0.4.1
 Compiling zbus v5.7.1
 Compiling ash-window v0.13.0
 Compiling codespan-reporting v0.11.1
 Compiling loop9 v0.1.5
 Compiling hidden-trait v0.1.2
 Compiling async-compression v0.4.23
 Compiling gpu-alloc-ash v0.7.0
 Compiling skrifa v0.31.3
 Compiling x11rb v0.13.1
 Compiling rust-embed-impl v8.7.2
 Compiling const-random v0.1.18
 Compiling rand v0.9.1
 Compiling gpu-alloc v0.6.0
 Compiling fontdb v0.23.0
 Compiling simplecss v0.2.2
 Compiling serde_derive_internals v0.29.1
 Compiling zune-inflate v0.2.54
 Compiling num-complex v0.4.6
 Compiling dirs-sys v0.3.7
 Compiling avif-serialize v0.8.3
 Compiling is-docker v0.2.0
 Compiling encoding_rs v0.8.35
 Compiling lebe v0.5.2
 Compiling zune-core v0.4.12
 Compiling unicode-vo v0.1.0
 Compiling unicode-ccc v0.2.0
 Compiling bytes v1.10.1
 Compiling base64 v0.22.1
 Compiling jpeg-decoder v0.3.1
 Compiling ttf-parser v0.20.0
 Compiling fastrand v1.9.0
 Compiling dtor-proc-macro v0.0.5
 Compiling imagesize v0.13.0
 Compiling pico-args v0.5.0
 Compiling yazi v0.2.1
 Compiling mint v0.5.9
 Compiling waker-fn v1.2.0
 Compiling float_next_after v1.0.0
 Compiling unicode-bidi-mirroring v0.2.0
 Compiling xmlwriter v0.1.0
 Compiling fnv v1.0.7
 Compiling schemars v0.8.22
 Compiling ttf-parser v0.21.1
 Compiling convert_case v0.4.0
 Compiling data-url v0.3.1
 Compiling byteorder-lite v0.1.0
 Compiling font-kit v0.14.1 (https://github.com/zed-industries/font-kit?rev=5474cfad4b719a72ec8ed2cb7327b2b01fd10568#5474cfad)
 Compiling zeno v0.3.3
 Compiling color_quant v1.1.0
 Compiling bit_field v0.10.2
 Compiling rustc-hash v2.1.1
 Compiling exr v1.73.0
 Compiling collections v0.1.0 (https://github.com/zed-industries/zed#40c91d5d)
 Compiling swash v0.2.5
 Compiling gif v0.13.1
 Compiling rustybuzz v0.14.1
 Compiling image-webp v0.2.1
 Compiling usvg v0.45.1
 Compiling derive_more v0.99.20
 Compiling http v1.3.1
 Compiling lyon_tessellation v1.0.15
 Compiling futures-lite v1.13.0
 Compiling blade-graphics v0.6.0 (https://github.com/kvark/blade?rev=416375211bb0b5826b3584dccdb6a43369e499ad#41637521)
 Compiling fontdb v0.16.2
 Compiling dtor v0.0.6
 Compiling tiff v0.9.1
 Compiling xim-ctext v0.3.0 (https://github.com/XDeme1/xim-rs?rev=d50d461764c2213655cd9cf65a0ea94c70d3c4fd#d50d4617)
 Compiling zune-jpeg v0.4.14
 Compiling num v0.4.3
 Compiling ravif v0.11.12
 Compiling is-wsl v0.4.0
 Compiling dirs v4.0.0
 Compiling schemars_derive v0.8.22
 Compiling parking_lot v0.12.4
 Compiling rust-embed v8.7.2
 Compiling ashpd v0.11.0
 Compiling pathfinder_geometry v0.5.1
 Compiling gpui v0.1.0 (https://github.com/zed-industries/zed#40c91d5d)
 Compiling async_zip v0.0.17
 Compiling dirs v5.0.1
 Compiling derive_refineable v0.1.0 (https://github.com/zed-industries/zed#40c91d5d)
 Compiling hkdf v0.12.4
 Compiling pbkdf2 v0.12.2
 Compiling aes v0.8.4
 Compiling cbc v0.1.2
 Compiling lyon_algorithms v1.0.5
 Compiling tiny-skia v0.11.4
 Compiling smol v2.0.2
 Compiling wayland-protocols v0.31.2
 Compiling regex v1.11.1
 Compiling sysinfo v0.31.4
 Compiling calloop v0.13.0
 Compiling tempfile v3.20.0
 Compiling qoi v0.4.1
 Compiling strum_macros v0.27.1
 Compiling md-5 v0.10.6
 Compiling itertools v0.14.0
 Compiling nanorand v0.7.0
 Compiling crossbeam-queue v0.3.12
 Compiling xcursor v0.3.8
 Compiling take-until v0.2.0
 Compiling unicode-linebreak v0.1.5
 Compiling unicase v2.8.1
 Compiling svg_fmt v0.4.5
 Compiling rangemap v1.5.1
 Compiling sha1_smol v1.0.1
 Compiling smol_str v0.2.2
 Compiling pollster v0.2.5
 Compiling ctor-proc-macro v0.0.5
 Compiling pathdiff v0.2.3
 Compiling hashbrown v0.14.5
 Compiling sys-locale v0.3.2
 Compiling self_cell v1.2.0
 Compiling unicode-segmentation v1.12.0
 Compiling dyn-clone v1.0.19
 Compiling atomic v0.5.3
 Compiling float-ord v0.3.2
 Compiling grid v0.13.0
 Compiling xkeysym v0.2.1
 Compiling taffy v0.4.4
 Compiling xim v0.4.0 (https://github.com/XDeme1/xim-rs?rev=d50d461764c2213655cd9cf65a0ea94c70d3c4fd#d50d4617)
 Compiling cosmic-text v0.14.2
 Compiling postage v0.5.0
 Compiling xkbcommon v0.8.0
 Compiling ctor v0.4.2
 Compiling open v5.3.2
 Compiling uuid v1.17.0
 Compiling etagere v0.2.15
 Compiling util v0.1.0 (https://github.com/zed-industries/zed#40c91d5d)
 Compiling wayland-protocols-plasma v0.2.0
 Compiling strum v0.27.1
 Compiling wayland-cursor v0.31.10
 Compiling flume v0.11.1
 Compiling oo7 v0.4.3
 Compiling image v0.25.6
 Compiling calloop-wayland-source v0.3.0
 Compiling scap v0.0.8 (https://github.com/zed-industries/scap?rev=08f0a01417505cc0990b9931a37e5120db92e0d0#08f0a014)
 Compiling resvg v0.45.1
 Compiling lyon v1.0.1
 Compiling refineable v0.1.0 (https://github.com/zed-industries/zed#40c91d5d)
 Compiling blade-util v0.2.0 (https://github.com/kvark/blade?rev=416375211bb0b5826b3584dccdb6a43369e499ad#41637521)
 Compiling http_client v0.1.0 (https://github.com/zed-industries/zed#40c91d5d)
 Compiling x11-clipboard v0.9.3
 Compiling gpui_macros v0.1.0 (https://github.com/zed-industries/zed#40c91d5d)
 Compiling sum_tree v0.1.0 (https://github.com/zed-industries/zed#40c91d5d)
 Compiling semantic_version v0.1.0 (https://github.com/zed-industries/zed#40c91d5d)
 Compiling filedescriptor v0.8.3
 Compiling blade-macros v0.3.0 (https://github.com/kvark/blade?rev=416375211bb0b5826b3584dccdb6a43369e499ad#41637521)
 Compiling num_cpus v1.17.0
 Compiling seahash v4.1.0
 Compiling inventory v0.3.20
 Compiling gpui-app-fbsd-hw1 v0.1.0 (/root/Projects/rust/gpui-app-fbsd-hw1)
  Finished `release` profile [optimized] target(s) in 6m 50s

It compiled! There are still some issues with the resulting binary but we have an executable. Pretty impressive for something not currently supported. Here is an obligatory screenshot of what could be possible (not a mockup).

gpui hello world screenshot

PREVRANDOMNEXT