Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .cargo/release-nightly.toml

This file was deleted.

7 changes: 5 additions & 2 deletions .cargo/release-windows-ms.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Avoid linking with vcruntime140.dll by statically linking everything,
# and then explicitly linking with ucrtbase.dll dynamically.
# We do this, because vcruntime140.dll is an optional Windows component.
[target.'cfg(target_os = "windows")']
[target.'cfg(all(target_os = "windows", target_env = "msvc"))']
rustflags = [
"-Ctarget-feature=+crt-static",
"-Clink-args=/DEFAULTLIB:ucrt.lib",
Expand All @@ -14,9 +14,12 @@ rustflags = [

# The backtrace code for panics in Rust is almost as large as the entire editor.
# = Huge reduction in binary size by removing all that.
[profile.release]
panic = "immediate-abort"

[unstable]
panic-immediate-abort = true
build-std = ["std", "panic_abort"]
build-std-features = ["panic_immediate_abort", "optimize_for_size"]

# vvv The following parts are specific to official Windows builds. vvv
# (The use of internal registries, security features, etc., are mandatory.)
Expand Down
5 changes: 4 additions & 1 deletion .cargo/release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ rustflags = [

# The backtrace code for panics in Rust is almost as large as the entire editor.
# = Huge reduction in binary size by removing all that.
[profile.release]
panic = "immediate-abort"
Comment on lines +21 to +22
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flag is now available in stable so the distinction between release and release-nightly is not needed anymore.


[unstable]
panic-immediate-abort = true
build-std = ["std", "panic_abort"]
build-std-features = ["default", "panic_immediate_abort", "optimize_for_size"]
3 changes: 1 addition & 2 deletions .pipelines/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ extends:
# For details on this cargo_target_dir setting, see:
# https://eng.ms/docs/more/rust/topics/onebranch-workaround
CARGO_TARGET_DIR: C:\cargo_target_dir
# msrustup only supports stable toolchains, but this project requires nightly.
# We were told RUSTC_BOOTSTRAP=1 is a supported workaround.
# RUSTC_BOOTSTRAP=1 is required to make panic-immediate-abort work.
RUSTC_BOOTSTRAP: 1
steps:
# NOTE: Step objects have ordered keys and you MUST have "task" as the first key.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,26 @@ winget install Microsoft.Edit
## Build Instructions

* [Install Rust](https://www.rust-lang.org/tools/install)
* Install the nightly toolchain: `rustup install nightly`
* Alternatively, set the environment variable `RUSTC_BOOTSTRAP=1`
* Clone the repository
* For a release build, run:
* Rust 1.90 or earlier: `cargo build --config .cargo/release.toml --release`
* otherwise: `cargo build --config .cargo/release-nightly.toml --release`
* If you're using nightly Rust:
```sh
cargo build --release --config .cargo/release.toml
```
* If you're using stable Rust:
* Ideally: Set the environment variable `RUSTC_BOOTSTRAP=1` and use the **nightly** build instructions above.
This is recommended, because it drastically reduces the binary size and slightly improves performance.
* Otherwise, simply run:
```sh
cargo build --release
```

### Build Configuration

During compilation you can set various environment variables to configure the build. The following table lists the available configuration options:
Uou can set the following environment variables at build-time to configure the build:

Environment variable | Description
--- | ---
`EDIT_CFG_ICU*` | See [ICU library name (SONAME)](#icu-library-name-soname) for details.
`EDIT_CFG_ICU*` | See [ICU library name (SONAME)](#icu-library-name-soname) below for details. This option is particularly important on Linux.
`EDIT_CFG_LANGUAGES` | A comma-separated list of languages to include in the build. See [i18n/edit.toml](i18n/edit.toml) for available languages.

## Notes to Package Maintainers
Expand All @@ -49,7 +55,8 @@ Assigning an "edit" alias is recommended, if possible.

### ICU library name (SONAME)

This project _optionally_ depends on the ICU library for its Search and Replace functionality.
This project optionally depends on the ICU library for its Search and Replace functionality.

By default, the project will look for a SONAME without version suffix:
* Windows: `icuuc.dll`
* macOS: `libicuuc.dylib`
Expand All @@ -61,7 +68,7 @@ If your installation uses a different SONAME, please set the following environme
* `EDIT_CFG_ICUI18N_SONAME`:
For instance, `libicui18n.so.76`.

Additionally, this project assumes that the ICU exports are exported without `_` prefix and without version suffix, such as `u_errorName`.
Additionally, this project assumes that the ICU exports symbols without `_` prefix and without version suffix, such as `u_errorName`.
If your installation uses versioned exports, please set:
* `EDIT_CFG_ICU_CPP_EXPORTS`:
If set to `true`, it'll look for C++ symbols such as `_u_errorName`.
Expand All @@ -75,7 +82,7 @@ Finally, you can set the following environment variables:
The way it does this is not officially supported by ICU and as such is not recommended to be relied upon.
Enabled by default on UNIX (excluding macOS) if no other options are set.

To test your settings, run `cargo test` again but with the `--ignored` flag. For instance:
To test your build settings, run `cargo test` with the `--ignored` flag. For instance:
```sh
cargo test -- --ignored
```
2 changes: 1 addition & 1 deletion assets/manpage/edit.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH EDIT 1 "version 1.2.1" "December 2025"
.TH EDIT 1 "version 2.0.0"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I'd prefer to actually put rc or beta in all the final assets because I do not want the confusion -- users should be able to look at the About dialog and know exactly that it is not final. IMO.

.SH NAME
edit \- a simple text editor
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion assets/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: msedit
base: core24
version: '1.2.1'
version: "2.0.0"
summary: Edit is an MS-DOS inspired text editor from Microsoft
description: |
Edit pays homage to the classic MS-DOS Editor, but with a modern interface and input controls similar to VS Code. Learn more at https://github.com/microsoft/edit
Expand Down
2 changes: 1 addition & 1 deletion crates/edit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "edit"
version = "1.2.1"
version = "2.0.0"

edition.workspace = true
license.workspace = true
Expand Down
Loading