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: NSoiffer/MathCATForC
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.1-beta.1
Choose a base ref
...
head repository: NSoiffer/MathCATForC
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 781 additions and 45,163 deletions.
  1. +176 −0 .github/workflows/automaticRelease.yaml
  2. +1 −0 .gitignore
  3. +9 −9 Cargo.toml
  4. +228 −0 Example/test.c
  5. +228 −0 Example/test.cpp
  6. +1 −1 README.md
  7. +13 −11 build.rs
  8. +0 −960 c-example/Rules/Braille/Nemeth/Nemeth_Rules.yaml
  9. +0 −2,623 c-example/Rules/Braille/Nemeth/unicode-full.yaml
  10. +0 −394 c-example/Rules/Braille/Nemeth/unicode.yaml
  11. +0 −950 c-example/Rules/Braille/UEB/UEB_Rules.yaml
  12. +0 −4 c-example/Rules/Braille/UEB/unicode-full.yaml
  13. +0 −1,529 c-example/Rules/Braille/UEB/unicode.yaml
  14. +0 −950 c-example/Rules/Braille/Vietnam/Vietnam_Rules.yaml
  15. +0 −4 c-example/Rules/Braille/Vietnam/unicode-full.yaml
  16. +0 −1,534 c-example/Rules/Braille/Vietnam/unicode.yaml
  17. +0 −582 c-example/Rules/Intent/general.yaml
  18. +0 −53 c-example/Rules/Intent/geometry.yaml
  19. +0 −122 c-example/Rules/Intent/linear-algebra.yaml
  20. +0 −18 c-example/Rules/Intent/probability.yaml
  21. +0 −753 c-example/Rules/Languages/en/ClearSpeak_Rules.yaml
  22. +0 −498 c-example/Rules/Languages/en/SharedRules/default.yaml
  23. +0 −920 c-example/Rules/Languages/en/SharedRules/general.yaml
  24. +0 −59 c-example/Rules/Languages/en/SharedRules/geometry.yaml
  25. +0 −114 c-example/Rules/Languages/en/SharedRules/linear-algebra.yaml
  26. +0 −111 c-example/Rules/Languages/en/SharedRules/menclose.yaml
  27. +0 −280 c-example/Rules/Languages/en/SimpleSpeak_Rules.yaml
  28. +0 −99 c-example/Rules/Languages/en/definitions.yaml
  29. +0 −1,590 c-example/Rules/Languages/en/navigate.yaml
  30. +0 −129 c-example/Rules/Languages/en/overview.yaml
  31. +0 −3,731 c-example/Rules/Languages/en/unicode-full.yaml
  32. +0 −499 c-example/Rules/Languages/en/unicode.yaml
  33. +0 −629 c-example/Rules/Languages/es/unicode.yaml
  34. +0 −629 c-example/Rules/Languages/fr/unicode.yaml
  35. +0 −747 c-example/Rules/Languages/id/ClearSpeak_Rules.yaml
  36. +0 −459 c-example/Rules/Languages/id/SharedRules/default.yaml
  37. +0 −916 c-example/Rules/Languages/id/SharedRules/general.yaml
  38. +0 −57 c-example/Rules/Languages/id/SharedRules/geometry.yaml
  39. +0 −112 c-example/Rules/Languages/id/SharedRules/linear-algebra.yaml
  40. +0 −111 c-example/Rules/Languages/id/SharedRules/menclose.yaml
  41. +0 −274 c-example/Rules/Languages/id/SimpleSpeak_Rules.yaml
  42. +0 −278 c-example/Rules/Languages/id/definitions.yaml
  43. +0 −1,590 c-example/Rules/Languages/id/navigate.yaml
  44. +0 −129 c-example/Rules/Languages/id/overview.yaml
  45. +0 −10,479 c-example/Rules/Languages/id/unicode-full.yaml
  46. +0 −633 c-example/Rules/Languages/id/unicode.yaml
  47. +0 −744 c-example/Rules/Languages/vi/ClearSpeak_Rules.yaml
  48. +0 −459 c-example/Rules/Languages/vi/SharedRules/default.yaml
  49. +0 −935 c-example/Rules/Languages/vi/SharedRules/general.yaml
  50. +0 −59 c-example/Rules/Languages/vi/SharedRules/geometry.yaml
  51. +0 −114 c-example/Rules/Languages/vi/SharedRules/linear-algebra.yaml
  52. +0 −113 c-example/Rules/Languages/vi/SharedRules/menclose.yaml
  53. +0 −281 c-example/Rules/Languages/vi/SimpleSpeak_Rules.yaml
  54. +0 −107 c-example/Rules/Languages/vi/definitions.yaml
  55. +0 −1,597 c-example/Rules/Languages/vi/navigate.yaml
  56. +0 −129 c-example/Rules/Languages/vi/overview.yaml
  57. +0 −3,701 c-example/Rules/Languages/vi/unicode-full.yaml
  58. +0 −634 c-example/Rules/Languages/vi/unicode.yaml
  59. +0 −86 c-example/Rules/cleanup.yaml
  60. +0 −223 c-example/Rules/definitions.yaml
  61. +0 −118 c-example/Rules/intent.yaml
  62. +0 −66 c-example/Rules/prefs.yaml
  63. +0 −92 c-example/mathcat.h
  64. +0 −106 c-example/test.cpp
  65. +3 −0 cbindgen-c.toml
  66. +2 −0 cbindgen.toml
  67. +120 −29 src/lib.rs
176 changes: 176 additions & 0 deletions .github/workflows/automaticRelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
name: automatic-release

on:
push:
branches:
- main
# schedule:
# # * is a special character in YAML so you have to quote this string
# - cron: '0 0 * * 6'

jobs:
rules-headers-tests:
name: zip up the rules directory
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build Rust Library
run: |
# doesn't need a release build since all that we want is the Rules dir and the .h files
cargo build --target x86_64-unknown-linux-gnu
- name: create rules.zip
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: 'Rules.zip'
directory: 'Example'
path: 'Rules'
- name: Remove Rules dir in prep for uploading test, .h files, and Rules.zip
run: |
rm -r Example/Rules
- name: Upload Example Dir (.h files, test files)
uses: actions/upload-artifact@v4
with:
name: rules-headers-tests
path: Example
compression-level: 0
retention-days: 1


rust-32-win:
name: Build 32 bit windows dll
runs-on: windows-latest # needs to run on windows because of bzip2
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build 32 bit version
run: cargo build --target i686-pc-windows-msvc --release
# HOW DO I GET A 32 BIT GCC TO RUN?
- name: Setup Example dir and test build
run: |
cp target/i686-pc-windows-msvc/release/libmathcat_c.dll Example/
cd Example
# gcc -m32 test.cpp -o test -L. -llibmathcat_c
# ./test.exe
# gcc test.c -o test -L. -llibmathcat_c
# ./test.exe
- name: create zip file for dll file -- this allows the name to indicate arch, python version, etc., but unzipped it is correctly named
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: '../libmathcat_c.dll-32-win.zip'
directory: 'Example'
path: 'libmathcat_c.dll'
- name: Upload 32 bit pyd file
uses: actions/upload-artifact@v4
with:
name: libmathcat_c.dll-32-win.zip
path: libmathcat_c.dll-32-win.zip
compression-level: 0
retention-days: 1

rust-64-win:
name: Build 64 bit windows dll
runs-on: windows-latest # needs to run on windows because of bzip2
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build 64 bit version
run: cargo build --target x86_64-pc-windows-msvc --release
#
- name: Setup Example dir and test build
run: |
cp target/x86_64-pc-windows-msvc/release/libmathcat_c.dll Example/
cd Example
gcc test.cpp -o test -L. -llibmathcat_c
./test.exe
gcc test.c -o test -L. -llibmathcat_c
./test.exe
- name: create zip file for dll file -- this allows the name to indicate arch, python version, etc., but unzipped it is correctly named
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: '../libmathcat_c.dll-64-win.zip'
directory: 'Example'
path: 'libmathcat_c.dll'
- name: Upload 64 bit pyd file
uses: actions/upload-artifact@v4
with:
name: libmathcat_c.dll-64-win.zip
path: libmathcat_c.dll-64-win.zip
compression-level: 0
retention-days: 1

rust-64-arm-win:
name: Build 64 bit arm windows dll
runs-on: windows-latest # needs to run on windows because of bzip2
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build 64 bit version
run: |
rustup target add aarch64-pc-windows-msvc
cargo build --target aarch64-pc-windows-msvc --release
# HOW DO I GET A ARM GCC TO RUN?
- name: Setup Example dir and test build
run: |
cp target/aarch64-pc-windows-msvc/release/libmathcat_c.dll Example/
cd Example
# gcc test.cpp -o test -L. -llibmathcat_c
# ./test.exe
# gcc test.c -o test -L. -llibmathcat_c
# ./test.exe
- name: create zip file for dll file -- this allows the name to indicate arch, python version, etc., but unzipped it is correctly named
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: '../libmathcat_c.dll-64-arm.zip'
directory: 'Example'
path: 'libmathcat_c.dll'
- name: Upload 64 bit pyd file
uses: actions/upload-artifact@v4
with:
name: libmathcat_c.dll-64-armn.zip
path: libmathcat_c.dll-64-arm.zip
compression-level: 0
retention-days: 1

pre-release:
name: Pre Release
continue-on-error: false
needs: [rules-headers-tests, rust-32-win, rust-64-win, rust-64-arm-win]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

# download the previous build artifacts and put them in their proper places
- name: Download Rules.zip, 2 header files, and 2 test files
uses: actions/download-artifact@v4
with:
name: rules-headers-tests
- name: Download 32 bit build
uses: actions/download-artifact@v4
with:
name: libmathcat_c.dll-32-win.zip
- name: Download 64 bit build
uses: actions/download-artifact@v4
with:
name: libmathcat_c.dll-64-win.zip
- name: Download 64 bit linux build
uses: actions/download-artifact@v4
with:
name: libmathcat_c.dll-64-armn.zip
- name: Automatic release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: Development Build
files: |
libmathcat*.zip
Rules.zip
*.h
test.*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -12,3 +12,4 @@ c-example/test.pdb
c-example/vc140.pdb
c-example/*zip
c-example/Release
c-example/Rules
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
[package]
name = "mathcat_c"
version = "0.2.0"
version = "0.6.6"
authors = ["Neil Soiffer <soiffer@alum.mit.edu>"]
edition = "2021"
license = "MIT"
description = "C/C++ interface for MathCAT (for MathCAT info, see crates.io or nsoiffer.github.io/MathCAT)"

resolver = "2" # allows different build dependency features

[dependencies.mathcat]
version = "0.0.2"
# for testing MathCAT without having to publish a new version (change two occurences)
version = "0.6.6"
# for testing MathCAT without having to publish a new version (change here and in build-dependencies)
# path = "../MathCAT/"
features = ["include-zip"] # for building, we want the zip files so we can include them separately

[lib]
name = "libmathcat_c"
crate-type = ["cdylib"] # Creates dynamic lib
#crate-type = ["staticlib"] # Creates static lib

[build-dependencies]
zip = { version = "0.6.2", default-features = false, features = ["deflate"] }
cbindgen = "0.20.0"
mathcat = "0.0.2"
zip = { version = "2.1", default-features = false, features = ["bzip2"] }
cbindgen = "0.24"
# for testing MathCAT without having to publish a new version (change two occurences)
# mathcat = {path = "../MathCAT/"}
# mathcat = {path = "../MathCAT/", version = "0.6.6", features = ["include-zip"]} # for building, we want the zip files so we can include them separately
mathcat = {version = "0.6.6", features = ["include-zip"]} # for building, we want the zip files so we can include them separately

[profile.release]
debug = true
Loading