diff --git a/.cargo/config.toml b/.cargo/config.toml index 74bc45c4e9..a9f8cb3c1d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -9,5 +9,5 @@ runner = 'wasm-bindgen-test-runner' rustflags = [ # We can guarantee that this target will always run on a CPU with _at least_ # these capabilities, so let's optimize for them - "-Ctarget-cpu=apple-m1" -] \ No newline at end of file + "-Ctarget-cpu=apple-m1", +] diff --git a/.gitignore b/.gitignore index 571638ca91..1ac49bcdf1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # These are backup files generated by rustfmt **/*.rs.bk - # required by nix .direnv/ result/ @@ -19,3 +18,5 @@ NOTES # for nix users .direnv/ +dist/ +.intentionally-empty-file.o diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000000..677b23b4fa --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,106 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com + +# The lines below are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/need to use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj + +version: 2 + +# before: +# hooks: +# if you don't do these things before calling goreleaser, it might be a +# good idea to do them here: +# - rustup default stable +# - cargo install --locked cargo-zigbuild +# - cargo fetch --locked + +metadata: + maintainers: + - Raphael Amorim + license: MIT + description: A hardware-accelerated GPU terminal emulator focusing to run in desktops and browsers. + homepage: https://raphamorim.io/rio/ + +builds: + - id: darwin-and-windows + builder: rust + flags: + - --release + - -p=rioterm + env: + - MACOSX_DEPLOYMENT_TARGET=11.0 + - RUSTFLAGS=-Clink-arg=-s + targets: + - x86_64-apple-darwin + - x86_64-pc-windows-gnu + - aarch64-apple-darwin + + - id: wayland + builder: rust + # dir: ./frontends/rioterm/ + flags: + - -p=rioterm + - --release + - --no-default-features + - --features=wayland + targets: + - x86_64-unknown-linux-gnu + - aarch64-unknown-linux-gnu + + - id: x11 + builder: rust + # dir: ./frontends/rioterm/ + flags: + - -p=rioterm + - --release + - --no-default-features + - --features=x11 + targets: + - x86_64-unknown-linux-gnu + - aarch64-unknown-linux-gnu + +universal_binaries: + - replace: true + +nfpms: + - formats: + - deb + - apk + - rpm + contents: + - src: ./misc/rio.desktop + dst: /usr/share/applications/rio.desktop + - src: ./misc/rio.terminfo + dst: /usr/share/info/rio.terminfo + - src: ./misc/logo.svg + dst: /usr/share/icons/hicolor/scalable/apps/rio.svg + +archives: + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of `uname`. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + +release: + footer: >- + + --- + + Released by [GoReleaser](https://github.com/goreleaser/goreleaser). diff --git a/Cargo.toml b/Cargo.toml index cbafeda406..1c4b31ca51 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,14 @@ [workspace] members = [ - "sugarloaf", - "teletypewriter", - "corcovado", - "copa", - "rio-proc-macros", - "rio-backend", - "rio-window", - "wa", - "frontends/rioterm" + "sugarloaf", + "teletypewriter", + "corcovado", + "copa", + "rio-proc-macros", + "rio-backend", + "rio-window", + "wa", + "frontends/rioterm", ] resolver = "2" @@ -40,13 +40,24 @@ wa = { path = "wa", version = "0.1.7" } sugarloaf = { path = "sugarloaf", version = "0.2.2" } raw-window-handle = { version = "0.6.2", features = ["std"] } -parking_lot = { version = "0.12.3", features = ["nightly", "hardware-lock-elision"] } +parking_lot = { version = "0.12.3", features = [ + "nightly", + "hardware-lock-elision", +] } rustc-hash = "2.1.0" unicode-width = "0.2.0" base64 = "0.22.1" -image_rs = { package = "image", version = "0.25.5", default-features = false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } +image_rs = { package = "image", version = "0.25.5", default-features = false, features = [ + "gif", + "jpeg", + "ico", + "png", + "pnm", + "webp", + "bmp", +] } regex = "1.11.1" -bytemuck = { version = "1.20.0", features = [ "derive" ] } +bytemuck = { version = "1.20.0", features = ["derive"] } serde = { version = "1.0.208", features = ["derive"] } wgpu = "23.0.1" libc = "0.2.161"