Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8ea8cb0
update
fabriceHategekimana Feb 19, 2026
e51c5cf
Fixed interface genericity
fabriceHategekimana Feb 20, 2026
8ed86f8
update
fabriceHategekimana Feb 21, 2026
c63a769
added sub crates
fabriceHategekimana Feb 21, 2026
323cac8
Add GitHub Actions for multi-platform releases
fabriceHategekimana Feb 21, 2026
7731048
Fix: use dtolnay/rust-toolchain instead of rust-action
fabriceHategekimana Feb 21, 2026
75378b9
update cargo test workspace
fabriceHategekimana Feb 21, 2026
319a4a6
Merge pull request #10 from we-data-ch/develop
fabriceHategekimana Feb 21, 2026
4f710b1
update
fabriceHategekimana Feb 21, 2026
ea3ac57
bump version to 0.4.20
fabriceHategekimana Feb 22, 2026
2c934cb
bump version to 0.4.21
fabriceHategekimana Feb 22, 2026
2a8e71f
bump version to 0.4.22
fabriceHategekimana Feb 22, 2026
0d3628c
bump version to 0.4.23
fabriceHategekimana Feb 22, 2026
f30ad6c
bump version to 0.4.24
fabriceHategekimana Feb 22, 2026
b3efb28
bump version to 0.4.25
fabriceHategekimana Feb 22, 2026
6348165
release v0.4.25
fabriceHategekimana Feb 22, 2026
1625b28
Merge pull request #11 from we-data-ch/develop
fabriceHategekimana Feb 22, 2026
812caaf
Fixed again vectorization
fabriceHategekimana Feb 24, 2026
31de0ab
bump version to 0.4.26
fabriceHategekimana Feb 24, 2026
ad1fc0d
release v0.4.26
fabriceHategekimana Feb 24, 2026
322bc22
Merge branch 'main' of github.com:we-data-ch/typr into develop
fabriceHategekimana Feb 24, 2026
dfffd59
removed playground
fabriceHategekimana Feb 24, 2026
dfe1801
bump version to 0.4.27
fabriceHategekimana Feb 24, 2026
054d57a
release v0.4.27
fabriceHategekimana Feb 24, 2026
d370882
Worked on WASM import
fabriceHategekimana Feb 24, 2026
ce619bb
quickfix
fabriceHategekimana Feb 25, 2026
173327b
update
fabriceHategekimana Feb 27, 2026
23e4246
fixed tags
fabriceHategekimana Feb 27, 2026
f4151f0
removed old playground
fabriceHategekimana Feb 27, 2026
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
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Run tests
run: cargo test --workspace
continue-on-error: true

- name: Check formatting
run: cargo fmt --all -- --check

- name: Clippy
run: cargo clippy --workspace

build-check:
name: Build Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- name: Build
run: cargo build --release
153 changes: 153 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: Release

on:
push:
tags:
- 'v*'

env:
CARGO_TERM_COLOR: always
BINARY_NAME: typr

permissions:
contents: write

jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Linux
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
archive: tar.gz
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
archive: tar.gz
cross: true

# Windows
- target: x86_64-pc-windows-msvc
os: windows-latest
archive: zip
- target: aarch64-pc-windows-msvc
os: windows-latest
archive: zip

# macOS
- target: x86_64-apple-darwin
os: macos-latest
archive: tar.gz
- target: aarch64-apple-darwin
os: macos-latest
archive: tar.gz

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Install cross (Linux ARM)
if: matrix.cross
run: cargo install cross --git https://github.com/cross-rs/cross

- name: Build (cross)
if: matrix.cross
run: cross build --release --target ${{ matrix.target }}

- name: Build (native)
if: ${{ !matrix.cross }}
run: cargo build --release --target ${{ matrix.target }}

- name: Prepare artifacts (Unix)
if: matrix.os != 'windows-latest'
run: |
cd target/${{ matrix.target }}/release
tar -czvf ../../../${{ env.BINARY_NAME }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ${{ env.BINARY_NAME }}

- name: Prepare artifacts (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
cd target/${{ matrix.target }}/release
Compress-Archive -Path ${{ env.BINARY_NAME }}.exe -DestinationPath ../../../${{ env.BINARY_NAME }}-${{ github.ref_name }}-${{ matrix.target }}.zip

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.BINARY_NAME }}-${{ matrix.target }}
path: ${{ env.BINARY_NAME }}-${{ github.ref_name }}-${{ matrix.target }}.${{ matrix.archive }}

release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true

- name: Generate checksums
run: |
cd artifacts
sha256sum * > checksums.txt
cat checksums.txt

- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/*
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-wasm:
name: Build WASM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Build WASM
run: wasm-pack build --release --target web crates/typr-wasm

- name: Prepare WASM artifacts
run: |
mkdir -p wasm-dist
cp crates/typr-wasm/pkg/*.wasm wasm-dist/
cp crates/typr-wasm/pkg/*.js wasm-dist/
cd wasm-dist
tar -czvf ../typr-wasm-${{ github.ref_name }}.tar.gz *

- name: Upload WASM artifact
uses: actions/upload-artifact@v4
with:
name: typr-wasm
path: typr-wasm-${{ github.ref_name }}.tar.gz

- name: Add WASM to Release
uses: softprops/action-gh-release@v2
with:
files: typr-wasm-${{ github.ref_name }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Empty file added .gitmodules
Empty file.
Binary file removed .header.bin
Binary file not shown.
Binary file removed .name_list.bin
Binary file not shown.
30 changes: 30 additions & 0 deletions .repl.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
source('a_std.R')
Array0 <- function(x) x |> struct(c('Array0', 'Array0', 'Any'))
Function2 <- function(x) x |> struct(c('Function2', 'Function2', 'Any'))
Function2 <- function(x) x |> struct(c('Function2', 'Function2', 'Any'))
Function2 <- function(x) x |> struct(c('Function2', 'Function2', 'Any'))
Function2 <- function(x) x |> struct(c('Function2', 'Function2', 'Any'))
Function2 <- function(x) x |> struct(c('Function2', 'Function2', 'Any'))
Function3 <- function(x) x |> struct(c('Function3', 'Function3', 'Any'))
Function3 <- function(x) x |> struct(c('Function3', 'Function3', 'Any'))
Function3 <- function(x) x |> struct(c('Function3', 'Function3', 'Any'))
Empty0 <- function(x) x |> struct(c('Empty0', 'Empty0', 'Any'))
Function1 <- function(x) x |> struct(c('Function1', 'Function1', 'Any'))
Function1 <- function(x) x |> struct(c('Function1', 'Function1', 'Any'))
Function1 <- function(x) x |> struct(c('Function1', 'Function1', 'Any'))
Function0 <- function(x) x |> struct(c('Function0', 'Function0', 'Any'))
Generic <- function(x) x |> struct(c('Generic', 'Generic', 'Any'))
Integer <- function(x) x |> struct(c('Integer', 'integer', 'Any'))
Character <- function(x) x |> struct(c('Character', 'character', 'Any'))
Number <- function(x) x |> struct(c('Number', 'numeric', 'Any'))
Boolean <- function(x) x |> struct(c('Boolean', 'logical', 'Any'))#' @export
expect_equal <- function(x, ...) UseMethod('expect_equal', x)
#' @export
reduce <- function(x, ...) UseMethod('reduce', x)
#' @export
sum <- function(x, ...) UseMethod('sum', x)
#' @export
expect_false <- function(x, ...) UseMethod('expect_false', x)


vec_apply(`+`, 1L |> Integer(), typed_vec(1L |> Integer(), 2L |> Integer(), 3L |> Integer()) |> Generic())
Loading
Loading