Skip to content

Commit 79d26dc

Browse files
authored
Move fully to rust (#60)
* Move add_smoke back to rust * Add smoke in rust * Remove zig trains * Remove some c things * Remove zig from packages, workflows, devcontainer * Bump patch version
1 parent 5e10763 commit 79d26dc

26 files changed

Lines changed: 367 additions & 474 deletions

.devcontainer/devcontainer.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,10 @@
1313
"github.vscode-github-actions",
1414
"rust-lang.rust-analyzer",
1515
"fill-labs.dependi",
16-
"vadimcn.vscode-lldb",
17-
"ziglang.vscode-zig"
16+
"vadimcn.vscode-lldb"
1817
]
1918
}
2019
},
21-
"containerEnv": {
22-
"VCPKG_FORCE_SYSTEM_BINARIES": "1",
23-
"VCPKG_ROOT": "/home/vscode/.local/share/vcpkg"
24-
},
2520
"onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/onCreateCommand.sh",
2621
"containerUser": "vscode",
2722
"remoteUser": "vscode"

.devcontainer/onCreateCommand.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22

3-
sudo dnf install -y dnf-plugins-core cargo @c-development @rpm-development-tools rpkg rustfmt rust-src rust-analyzer zig
3+
sudo dnf install -y dnf-plugins-core cargo @c-development @rpm-development-tools rpkg rustfmt rust-src rust-analyzer

.github/workflows/posix-build.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,11 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16-
- name: Install zig
17-
run: |
18-
if [ -f /home/linuxbrew/.linuxbrew/bin/brew ]; then
19-
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
20-
fi
21-
brew install zig
22-
2316
- name: Build Debug
24-
run: |
25-
if [ -f /home/linuxbrew/.linuxbrew/bin/brew ]; then
26-
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
27-
fi
28-
cargo build
17+
run: cargo build
2918

3019
- name: Build Release
31-
run: |
32-
if [ -f /home/linuxbrew/.linuxbrew/bin/brew ]; then
33-
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
34-
fi
35-
cargo build --release
20+
run: cargo build --release
3621

3722
- name: Test
3823
run: |

.github/workflows/win-build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v4
1616

17-
- name: Install zig
18-
run: choco install -y zig
19-
2017
- name: Install toolchain
2118
run: rustup target install ${{ matrix.target }}-pc-windows-msvc
2219

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.28)
22
project("SL"
3-
VERSION 6.1.3
3+
VERSION 6.1.4
44
DESCRIPTION "CHOO CHOO"
55
LANGUAGES C)
66

@@ -10,10 +10,10 @@ install(FILES ${CURSES_DLL} ${SL_EXE} DESTINATION bin COMPONENT applications)
1010
set(CPACK_PACKAGE_NAME "sl")
1111
set(CPACK_PACKAGE_VENDOR "sl")
1212
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SL (Steam Locomotive)")
13-
set(CPACK_PACKAGE_VERSION "6.1.3")
13+
set(CPACK_PACKAGE_VERSION "6.1.4")
1414
set(CPACK_PACKAGE_VERSION_MAJOR "6")
1515
set(CPACK_PACKAGE_VERSION_MINOR "1")
16-
set(CPACK_PACKAGE_VERSION_PATCH "3")
16+
set(CPACK_PACKAGE_VERSION_PATCH "4")
1717
set(CPACK_PACKAGE_INSTALL_DIRECTORY "sl")
1818
set(CPACK_COMPONENTS_ALL applications)
1919
set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "sl")

Cargo.lock

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sl"
3-
version = "6.1.3"
3+
version = "6.1.4"
44
edition = "2021"
55
build = "build.rs"
66

@@ -22,4 +22,3 @@ unicode-segmentation = "1.12.0"
2222
clap = { version = "4.5.23", features = ["derive"] }
2323
clap_complete = "4.5.40"
2424
clap_mangen = "0.2.24"
25-
zig = { git = "https://github.com/scaryrawr/zig-rs", version = "0.1.0" }

build.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ use clap_complete::{generate_to, Shell};
66
include!("src/cli.rs");
77

88
fn main() -> Result<(), Error> {
9-
println!("cargo:rerun-if-changed=libsl/build.zig");
10-
println!("cargo:rerun-if-changed=libsl/src");
11-
12-
let dst = zig::build("libsl");
13-
14-
println!("cargo:rustc-link-search=native={}", dst.display());
15-
169
let completion_dir = match env::var_os("COMPLETION_DIR") {
1710
None => return Ok(()),
1811
Some(completion_dir) => completion_dir,

completions/sl.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.ie \n(.g .ds Aq \(aq
22
.el .ds Aq '
3-
.TH sl 1 "sl 6.1.3"
3+
.TH sl 1 "sl 6.1.4"
44
.SH NAME
55
sl \- sl cures your bad habit of mistyping
66
.SH SYNOPSIS
@@ -30,6 +30,6 @@ Print help
3030
\fB\-V\fR, \fB\-\-version\fR
3131
Print version
3232
.SH VERSION
33-
v6.1.3
33+
v6.1.4
3434
.SH AUTHORS
3535
Toyoda Masashi (mtoyoda@acm.org)

libsl/build.zig

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)