Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sigmaSd/IRust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.8.9
Choose a base ref
...
head repository: sigmaSd/IRust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 12,586 additions and 4,581 deletions.
  1. +68 −0 .github/workflows/ci.yml
  2. +81 −0 .github/workflows/release.yml
  3. +0 −158 .github/workflows/rust.yml
  4. +6 −14 .gitignore
  5. +24 −0 .gitpod.yml
  6. +576 −0 CHANGELOG.md
  7. +378 −293 Cargo.lock
  8. +16 −15 Cargo.toml
  9. +0 −127 README.md
  10. +1 −0 README.md
  11. +16 −0 SCRIPTS.md
  12. +20 −0 TODO
  13. +38 −0 crates/irust/Cargo.toml
  14. +256 −0 crates/irust/README.md
  15. +56 −0 crates/irust/src/args.rs
  16. +161 −0 crates/irust/src/dependencies.rs
  17. +405 −0 crates/irust/src/irust.rs
  18. +143 −0 crates/irust/src/irust/art.rs
  19. +886 −0 crates/irust/src/irust/engine.rs
  20. +133 −0 crates/irust/src/irust/format.rs
  21. +120 −0 crates/irust/src/irust/help.rs
  22. +139 −0 crates/irust/src/irust/highlight.rs
  23. +127 −0 crates/irust/src/irust/highlight/theme.rs
  24. +159 −0 crates/irust/src/irust/history.rs
  25. +196 −0 crates/irust/src/irust/options.rs
  26. +1,073 −0 crates/irust/src/irust/parser.rs
  27. +390 −0 crates/irust/src/irust/ra.rs
  28. +218 −0 crates/irust/src/irust/ra/rust_analyzer.rs
  29. +148 −0 crates/irust/src/irust/script/mod.rs
  30. +224 −0 crates/irust/src/irust/script/script_manager.rs
  31. +104 −0 crates/irust/src/main.rs
  32. +398 −0 crates/irust/src/utils.rs
  33. +16 −0 crates/irust_api/Cargo.toml
  34. +194 −0 crates/irust_api/src/lib.rs
  35. +23 −0 crates/irust_repl/Cargo.toml
  36. +50 −0 crates/irust_repl/README.md
  37. +39 −0 crates/irust_repl/examples/re/log.rs
  38. +309 −0 crates/irust_repl/examples/re/main.rs
  39. +339 −0 crates/irust_repl/irust_kernel/evcxr.ipynb
  40. +172 −0 crates/irust_repl/irust_kernel/irust.ipynb
  41. +3 −0 crates/irust_repl/irust_kernel/irust_kernel/__init__.py
  42. +3 −0 crates/irust_repl/irust_kernel/irust_kernel/__main__.py
  43. +124 −0 crates/irust_repl/irust_kernel/irust_kernel/install.py
  44. +89 −0 crates/irust_repl/irust_kernel/irust_kernel/kernel.py
  45. +4 −0 crates/irust_repl/irust_kernel/irust_kernel/resources/__init__.py
  46. +24 −0 crates/irust_repl/irust_kernel/irust_kernel/resources/logo-svg.svg
  47. +19 −0 crates/irust_repl/irust_kernel/pyproject.toml
  48. +464 −0 crates/irust_repl/src/cargo_cmds.rs
  49. +35 −0 crates/irust_repl/src/compile_mode.rs
  50. +33 −0 crates/irust_repl/src/edition.rs
  51. +60 −0 crates/irust_repl/src/executor.rs
  52. +429 −0 crates/irust_repl/src/lib.rs
  53. +50 −0 crates/irust_repl/src/main_result.rs
  54. +50 −0 crates/irust_repl/src/toolchain.rs
  55. +105 −0 crates/irust_repl/src/utils.rs
  56. +31 −0 crates/irust_repl/tests/repl.rs
  57. +16 −0 crates/printer/Cargo.toml
  58. +21 −0 crates/printer/LICENSE
  59. +5 −0 crates/printer/README.md
  60. +24 −0 crates/printer/benches/printer.rs
  61. +92 −0 crates/printer/examples/shell.rs
  62. +56 −46 {src/irust → crates/printer/src}/buffer.rs
  63. +4 −0 crates/printer/src/lib.rs
  64. +399 −0 crates/printer/src/printer.rs
  65. +312 −0 crates/printer/src/printer/cursor.rs
  66. +6 −10 {src/irust → crates/printer/src/printer}/cursor/bound.rs
  67. +63 −0 crates/printer/src/printer/cursor/raw.rs
  68. +154 −0 crates/printer/src/printer/tests.rs
  69. +168 −0 crates/printer/src/printer/writer.rs
  70. +81 −0 crates/printer/src/printer/writer/raw.rs
  71. +9 −0 distro/io.github.sigmasd.IRust.desktop
  72. +88 −0 distro/io.github.sigmasd.IRust.metainfo.xml
  73. +101 −0 distro/io.github.sigmasd.IRust.svg
  74. BIN irust.png
  75. +586 −0 script_examples/Cargo.lock
  76. +15 −0 script_examples/Cargo.toml
  77. +14 −0 script_examples/fun/Cargo.toml
  78. +108 −0 script_examples/fun/src/main.rs
  79. +10 −0 script_examples/ipython/Cargo.toml
  80. +183 −0 script_examples/ipython/src/main.rs
  81. +15 −0 script_examples/irust_animation/Cargo.toml
  82. +85 −0 script_examples/irust_animation/src/lib.rs
  83. +11 −0 script_examples/irust_prompt/Cargo.toml
  84. +71 −0 script_examples/irust_prompt/src/main.rs
  85. +14 −0 script_examples/irust_vim_dylib/Cargo.toml
  86. +77 −0 script_examples/irust_vim_dylib/src/lib.rs
  87. +276 −0 script_examples/irust_vim_dylib/src/script.rs
  88. +11 −0 script_examples/mixed_cmds/Cargo.toml
  89. +109 −0 script_examples/mixed_cmds/src/main.rs
  90. +0 −40 src/args.rs
  91. +0 −238 src/irust.rs
  92. +0 −112 src/irust/art.rs
  93. +0 −112 src/irust/cargo_cmds.rs
  94. +0 −224 src/irust/cursor.rs
  95. +0 −331 src/irust/events.rs
  96. +0 −173 src/irust/events/history_events.rs
  97. +0 −52 src/irust/format.rs
  98. +0 −73 src/irust/help.rs
  99. +0 −370 src/irust/highlight.rs
  100. +0 −29 src/irust/highlight/theme.rs
  101. +0 −129 src/irust/history.rs
  102. +0 −52 src/irust/irust_error.rs
  103. +0 −30 src/irust/known_paths.rs
  104. +0 −195 src/irust/options.rs
  105. +0 −178 src/irust/options/parser.rs
  106. +0 −307 src/irust/parser.rs
  107. +0 −235 src/irust/printer.rs
  108. +0 −391 src/irust/racer.rs
  109. +0 −118 src/irust/raw_terminal.rs
  110. +0 −126 src/irust/repl.rs
  111. +0 −87 src/irust/writer.rs
  112. +0 −40 src/log.rs
  113. +0 −15 src/main.rs
  114. +0 −261 src/utils.rs
  115. +110 −0 tests/deno_bot_test.ts
  116. +67 −0 tests/irust_bot_test.py
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#Copy paste from crossterm
name: irust ci

on:
# Build master branch only
push:
branches:
- master
- dev
# Build pull requests targeting master branch only
pull_request:
branches:
- master

jobs:
test:
name: ${{matrix.rust}} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [stable, nightly]
# Allow failures on nightly, it's just informative
include:
- rust: stable
can-fail: false
- rust: nightly
can-fail: true
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt,clippy
- name: Toolchain Information
run: |
rustc --version
rustfmt --version
rustup --version
cargo --version
- name: Check Formatting
if: matrix.rust == 'stable'
run: cargo fmt --all -- --check
continue-on-error: ${{ matrix.can-fail }}
- name: Clippy
run: cargo clippy -- -D clippy::all
continue-on-error: ${{ matrix.can-fail }}
- name: Test Build
run: cargo build
continue-on-error: ${{ matrix.can-fail }}

# TODO: figure out how to unflake this
# - name: Install deno
# uses: denoland/setup-deno@v1
# with:
# deno-version: v1.x

#- name: End to End test with deno
# run: ./tests/deno_bot_test.ts

# - name: Test Packaging
# if: matrix.rust == 'stable'
# run: cargo package --manifest-path crates/irust/Cargo.toml
# continue-on-error: ${{ matrix.can-fail }}
81 changes: 81 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Release Binary

on:
push:
tags:
- 'irust@[0-9]+.[0-9]+.[0-9]+'
# Manual trigger
workflow_dispatch:
inputs:
tag:
description: 'Tag for release (e.g., irust@0.1.0)'
required: true
default: 'test-release'

permissions:
contents: write

jobs:
build:
name: Release libs
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

# Build for Musl
- if: runner.os == 'Linux'
name: Build Linux musl binary
run: |
rustup target add x86_64-unknown-linux-musl
cargo build --release --target=x86_64-unknown-linux-musl
####################################

- name: Build
if: runner.os != 'Linux'
run: cargo build --release

- if: matrix.os == 'macos-13'
name: Upload MacOS x86_64 Binary
uses: svenstaro/upload-release-action@v2
with:
file: target/release/irust
asset_name: irust-x86_64-apple-darwin
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: true

- if: matrix.os == 'macos-latest'
name: Upload MacOS aarch64 Binary
uses: svenstaro/upload-release-action@v2
with:
file: target/release/irust
asset_name: irust-aarch64-apple-darwin
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: true

- if: runner.os == 'Linux'
name: Upload Linux binary
uses: svenstaro/upload-release-action@v2
with:
file: target/x86_64-unknown-linux-musl/release/irust
asset_name: irust-x86_64-unknown-linux-musl
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: true

- if: runner.os == 'Windows'
name: Upload Windows binary
uses: svenstaro/upload-release-action@v2
with:
file: target/release/irust.exe
asset_name: irust-x86_64-pc-windows-msvc.exe
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: true
158 changes: 0 additions & 158 deletions .github/workflows/rust.yml

This file was deleted.

20 changes: 6 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Ignore
*

# Dont Ignore
!/src/
!/src/*
!/src/irust/*
!*.rs
!Cargo.toml
!CHANGELOG.md
!README.md
!LICENSE
!.gitignore
!Cargo.lock
.vscode
target/
crates/irust_repl/.ipynb_checkpoints
crates/irust_repl/irust_kernel/dist/
crates/irust_repl/irust_kernel/irust_kernel/__pycache__/
crates/irust_repl/irust_kernel/irust_kernel/resources/__pycache__/
24 changes: 24 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
tasks:
- name: Preload
before: |
rustup update stable
cargo install --path crates/irust
cargo install cargo-edit cargo-show-asm cargo-expand
rustup component add rust-analyzer
echo 'export PATH="$PATH:$(rustc --print sysroot)/bin"' >> ~/.bashrc
- name: IRust
command: |
echo "Welcome to IRust. Just type 'irust' to begin."
echo "Once the REPL starts, type ':help' for a list of commands."
echo "Learn more at https://github.com/sigmaSd/IRust"
github:
prebuilds:
master: true
branches: true
pullRequestsFromForks: true
addLabel: prebuilt-in-gitpod
vscode:
extensions:
- belfz.search-crates-io
- serayuzgur.crates
- bungcip.better-toml
Loading