Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e202eba
Add compilation to intermediate binary
BoyeGuillaume Jan 13, 2026
13bc85f
Transition to borsh for source storage and add zstd
BoyeGuillaume Jan 14, 2026
b3229a5
Refactor plugin registration macros and add formal verification module
BoyeGuillaume Jan 18, 2026
193ea6b
Rename specification -> theorems for consistency
BoyeGuillaume Jan 18, 2026
3c6ad0d
Add design decisions: ProofView and TerminationScope for future refer…
BoyeGuillaume Jan 18, 2026
a95575e
Convert Function to Arc<Function> in module for external ref
BoyeGuillaume Jan 19, 2026
8891350
Add default to Function and derived_from field
BoyeGuillaume Jan 19, 2026
4cc5309
Starting working on introduction of new meta-analysis instruction
BoyeGuillaume Jan 19, 2026
a50637e
BREAKING: Add correct parsing disambiguous using newline as 'breaker'
BoyeGuillaume Jan 19, 2026
21fb4f6
Add fast_boxed!
BoyeGuillaume Jan 19, 2026
6779e99
Small update was made
BoyeGuillaume Jan 20, 2026
d622572
Convert funcana to Arc
BoyeGuillaume Jan 20, 2026
5423286
Fix use Arc
BoyeGuillaume Jan 20, 2026
c49d0cd
Add ability to load module from bincode
BoyeGuillaume Jan 20, 2026
af29483
Add slotmap dependency and refactor module management to use SlotMap
BoyeGuillaume Jan 21, 2026
0cdd319
Add check on instance on python library
BoyeGuillaume Jan 21, 2026
b3b1828
Remove unsafe that was unecessary
BoyeGuillaume Jan 22, 2026
6e6d2db
Add cffi interface for C/C++ API
BoyeGuillaume Jan 22, 2026
549e66c
Update the bump-version script
BoyeGuillaume Jan 22, 2026
7998d92
Add makefile that was ignored by CMake build
BoyeGuillaume Jan 22, 2026
56cf851
Rename from simple.c to sample.c
BoyeGuillaume Jan 22, 2026
e41a8dd
Add compilation to the C API
BoyeGuillaume Jan 22, 2026
239c34c
Forgot about libc dependency
BoyeGuillaume Jan 22, 2026
3dcafa7
Add hyLoadModule and hyDestroyModule as well as some warning when not…
BoyeGuillaume Jan 22, 2026
9ccd4fd
Modify license comment generation
BoyeGuillaume Jan 22, 2026
14514d9
Remove unsafe that was useless
BoyeGuillaume Jan 22, 2026
9527130
Update documentation and add utlity function
BoyeGuillaume Jan 22, 2026
278df30
Update roadmap to reflect real one
BoyeGuillaume Jan 22, 2026
b8abbf4
Add Cargo.lock
BoyeGuillaume Jan 22, 2026
b5345e6
Update the sample.c script
BoyeGuillaume Jan 23, 2026
2650581
Add legacy no-zstd feature that does not compress sourced IR
BoyeGuillaume Jan 23, 2026
dbaaaba
Remove printf in sample.c
BoyeGuillaume Jan 25, 2026
2e9f492
Update example.func to use trap instead of returning bs
BoyeGuillaume Jan 25, 2026
93bd716
Remove old theorem derivation
BoyeGuillaume Jan 25, 2026
f092395
Add report in docs/
BoyeGuillaume Jan 25, 2026
062bf67
rename from theorem deirvation proof to attach fn
BoyeGuillaume Jan 25, 2026
13ea456
Add capability to remove element from AttachedFunction
BoyeGuillaume Jan 26, 2026
e710c75
Add attached function tests
BoyeGuillaume Jan 26, 2026
6578032
Update the theorem inference to derivaiotn strategy
BoyeGuillaume Jan 27, 2026
f3e6439
Update the documentation for the docs
BoyeGuillaume Jan 27, 2026
4acad8f
Remove old and legacy documentation
BoyeGuillaume Jan 27, 2026
a7d1661
Add dashmap to make it sync + send
BoyeGuillaume Jan 27, 2026
a091002
Start implementation of the Axiomatic Strategy
BoyeGuillaume Jan 27, 2026
e24c57b
Add dedup optimisation to AttachedFunction and derive struct
BoyeGuillaume Jan 28, 2026
bc3998e
Start implementing clippy code cleaning
BoyeGuillaume Jan 28, 2026
ffc22b9
Fix clippy issue and fmt throughout the code
BoyeGuillaume Jan 29, 2026
16ae213
Fix issue with cffi
BoyeGuillaume Jan 29, 2026
1e94289
Add fetch-depth for Ci (required to have info about build)
BoyeGuillaume Jan 29, 2026
8fc481f
Forgot about this workflow
BoyeGuillaume Jan 29, 2026
98193f6
Add CI for all branch
BoyeGuillaume Jan 29, 2026
9026a54
Update CI to remove verbose
BoyeGuillaume Jan 29, 2026
93ecd06
Add type checking capability on the underlying IR
BoyeGuillaume Jan 31, 2026
3a2948e
Add tests for typechecking and fix bugs
BoyeGuillaume Jan 31, 2026
71ffd9e
Remove warning in tests
BoyeGuillaume Jan 31, 2026
9878a2a
Add CFFI artifacts CI for C shared library construction
BoyeGuillaume Jan 31, 2026
96833a4
Bump version to 0.1.2
BoyeGuillaume Jan 31, 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
62 changes: 62 additions & 0 deletions .github/workflows/cffi-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build C FFI Artifacts

on:
push:
branches:
- main
- master
tags:
- "*"
pull_request:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build cffi on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-22.04
artifact: cffi-linux-x86_64
lib_name: libhycore_cffi.so
- os: macos-latest
artifact: cffi-macos
lib_name: libhycore_cffi.dylib
- os: windows-latest
artifact: cffi-windows
lib_name: hycore_cffi.dll
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0

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

- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
with:
shared-key: cffi-${{ matrix.os }}

- name: Build hycore-cffi library
run: cargo build -p hycore-cffi --release

- name: Collect headers and libraries
shell: bash
run: |
set -euo pipefail
DEST="cffi-artifacts/${{ matrix.artifact }}"
mkdir -p "$DEST/include" "$DEST/lib"
cp cffi/include/hycore.h "$DEST/include/"
cp "target/release/${{ matrix.lib_name }}" "$DEST/lib/"

- name: Upload artifact
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.artifact }}
path: cffi-artifacts/${{ matrix.artifact }}
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Cargo Build & Test

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Rust
run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
- run: cargo build
- run: cargo test
10 changes: 10 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
target: armv7
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: 3.x
Expand Down Expand Up @@ -63,6 +65,8 @@ jobs:
target: aarch64
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: 3.x
Expand Down Expand Up @@ -96,6 +100,8 @@ jobs:
python_arch: arm64
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: 3.13
Expand Down Expand Up @@ -124,6 +130,8 @@ jobs:
target: aarch64
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: 3.x
Expand All @@ -144,6 +152,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
Expand Down Expand Up @@ -275,3 +274,9 @@ tags
# Added by cargo
Cargo.lock
/target

# I don't know why i try to use AI agents when
# I always need to rewrite everything myself cause
# they are shit.
AGENTS.md

4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
"**/target": true,
"**/__pycache__": true,
"**/_sys.abi3.so": true,
"**/.crush": true,
"Cargo.lock": true,
},
"editor.formatOnSave": true,
"files.associations": {
"time.h": "c",
"stdint.h": "c"
},
"rust-analyzer.cargo.features": [
"ext_all"
"ext_all",
]
}
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ members = [
"hyinstr",
"hycore",
"python",
"cffi",
"examples/hycore-examples",
"examples/hyinstr-parser",
]
Expand Down Expand Up @@ -31,6 +32,7 @@ uuid = "^1"
crossbeam = "^0.8"
parking_lot = "^0.12"
log = ">=0.2"
slotmap = "^1"
num-bigint = "^0.4"
bigdecimal = "^0.4"
auto_enums = ">=0.7"
Expand All @@ -44,6 +46,10 @@ ariadne = "0.6"
pyo3 = "0.27.0"
once_cell = "^1"
inventory = "^0.3"
zstd = "=0.13.3"
borsh = "^1"
libc = "^0.2"
dashmap = "^6"

criterion = "0.5"
rand = "0.9.2"
Expand Down
25 changes: 25 additions & 0 deletions cffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "hycore-cffi"
version = "0.1.2"
edition = "2021"
license = "MIT OR Apache-2.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
libc.workspace = true
semver.workspace = true
strum = { workspace = true, features = ["derive"] }
hycore = { workspace = true, features = ["ext_all"] }

[build-dependencies]
cbindgen = "0.27"
semver.workspace = true
hycore.workspace = true

[features]
# No default features; consumers enable hycore features as needed
default = []

legacy_nozstd = ["hycore/legacy_nozstd"]
83 changes: 83 additions & 0 deletions cffi/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
use std::io::Write;

use cbindgen::{Config, ConstantConfig};
use hycore::magic;

fn main() {
let crate_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
let output_file = format!("{}/include/hycore.h", crate_dir);

println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed=src/");
let version = std::env::var("CARGO_PKG_VERSION").unwrap();
let version = semver::Version::parse(&version).unwrap();

let prefix = format!(
"\n#define HY_VERSION_MAJOR {}\n\
#define HY_VERSION_MINOR {}\n\
#define HY_VERSION_PATCH {}\n\
#define HY_LOGGER_NAME_EXT \"{}\"\n",
version.major,
version.minor,
version.patch,
magic::HYPERION_LOGGER_NAME_EXT,
);
let file_header = format!(
"/**
* @file hycore.h
* @brief Main C API header for Hyperion Core library.
* @version {}.{}.{}
*
* This file header provides the C API for interacting with the Hyperion framework.
* It was generated using cbindgen={}. DO NOT EDIT THIS FILE MANUALLY!
*
* This file is part of Hyperion.
*
* Copyright (C) 2024 Hyperion Project
*
* Hyperion is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Hyperion is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Hyperion. If not, see <https://www.gnu.org/licenses/>.
*/\n\n",
version.major,
version.minor,
version.patch,
cbindgen::VERSION
);

let bindings = cbindgen::Builder::new()
.with_config(Config {
language: cbindgen::Language::C,
documentation: true,
documentation_style: cbindgen::DocumentationStyle::Doxy,
include_guard: Some("_HYCORE_H".to_string()),
cpp_compat: true,
documentation_length: cbindgen::DocumentationLength::Full,
tab_width: 2,
constant: ConstantConfig {
allow_static_const: true,
..Default::default()
},
..Default::default()
})
.with_crate(crate_dir)
.with_after_include(prefix)
.with_braces(cbindgen::Braces::NextLine)
.include_item("HyLogCreateInfoEXT")
.generate()
.expect("Unable to generate bindings");
// bindings.write_to_file(output_file);
let file = std::fs::File::create(output_file).unwrap();
let mut writer = std::io::BufWriter::new(file);
writer.write_all(file_header.as_bytes()).unwrap();
bindings.write(&mut writer);
}
31 changes: 31 additions & 0 deletions cffi/examples/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
CC ?= gcc
CXX ?= g++
PROFILE ?= debug
INCLUDE_DIR := ../include
CFLAGS ?= -I$(INCLUDE_DIR) -Wall -Wextra
CARGO_FLAGS :=
ifeq ($(PROFILE),release)
CARGO_FLAGS += --release
endif

SO_PATH := ../../target/$(PROFILE)/libhycore_cffi.so
SO_DIR := $(dir $(SO_PATH))
SO_BASENAME := $(notdir $(SO_PATH))
SO_STEM := $(patsubst lib%.so,%,$(SO_BASENAME))

LDFLAGS := -L$(SO_DIR) -Wl,-rpath,$(SO_DIR) -l$(SO_STEM) -lm

all: sample.out

lib:
cargo build $(CARGO_FLAGS) --manifest-path ../Cargo.toml

sample.out: sample.c lib
echo $(SO_PATH)
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)

run: sample.out
./sample.out

clean:
rm -f sample.out
Loading