Skip to content

Commit 5fa3b62

Browse files
author
Jonathan D.A. Jewell
committed
Auto-commit: Sync changes [2026-02-10]
1 parent bc41c3e commit 5fa3b62

9 files changed

Lines changed: 1325 additions & 292 deletions

File tree

ABI-FFI-README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{~ Aditionally delete this line and fill out the template below ~}}
22

3-
# {{PROJECT}} ABI/FFI Documentation
3+
# VAE_NORMALIZER ABI/FFI Documentation
44

55
## Overview
66

@@ -26,7 +26,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
2626
2727
┌─────────────────────────────────────────────┐
2828
│ C Headers (auto-generated) │
29-
│ generated/abi/{{project}}.h │
29+
│ generated/abi/vae_normalizer.h │
3030
└─────────────────┬───────────────────────────┘
3131
3232
│ imported by
@@ -39,7 +39,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
3939
│ - Memory-safe by default │
4040
└─────────────────┬───────────────────────────┘
4141
42-
│ compiled to lib{{project}}.so/.a
42+
│ compiled to libvae_normalizer.so/.a
4343
4444
┌─────────────────────────────────────────────┐
4545
│ Any Language via C ABI │
@@ -50,7 +50,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
5050
## Directory Structure
5151

5252
```
53-
{{project}}/
53+
vae_normalizer/
5454
├── src/
5555
│ ├── abi/ # ABI definitions (Idris2)
5656
│ │ ├── Types.idr # Core type definitions with proofs
@@ -67,11 +67,11 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
6767
│ ├── test/
6868
│ │ └── integration_test.zig
6969
│ └── include/
70-
│ └── {{project}}.h # C header (optional, can be generated)
70+
│ └── vae_normalizer.h # C header (optional, can be generated)
7171
7272
├── generated/ # Auto-generated files
7373
│ └── abi/
74-
│ └── {{project}}.h # Generated from Idris2 ABI
74+
│ └── vae_normalizer.h # Generated from Idris2 ABI
7575
7676
└── bindings/ # Language-specific wrappers (optional)
7777
├── rust/
@@ -199,7 +199,7 @@ zig build test # Run tests
199199

200200
```bash
201201
cd src/abi
202-
idris2 --cg c-header Types.idr -o ../../generated/abi/{{project}}.h
202+
idris2 --cg c-header Types.idr -o ../../generated/abi/vae_normalizer.h
203203
```
204204

205205
### Cross-Compile
@@ -222,32 +222,32 @@ zig build -Dtarget=x86_64-windows
222222
### From C
223223

224224
```c
225-
#include "{{project}}.h"
225+
#include "vae_normalizer.h"
226226

227227
int main() {
228-
void* handle = {{project}}_init();
228+
void* handle = vae_normalizer_init();
229229
if (!handle) return 1;
230230

231-
int result = {{project}}_process(handle, 42);
231+
int result = vae_normalizer_process(handle, 42);
232232
if (result != 0) {
233-
const char* err = {{project}}_last_error();
233+
const char* err = vae_normalizer_last_error();
234234
fprintf(stderr, "Error: %s\n", err);
235235
}
236236

237-
{{project}}_free(handle);
237+
vae_normalizer_free(handle);
238238
return 0;
239239
}
240240
```
241241

242242
Compile with:
243243
```bash
244-
gcc -o example example.c -l{{project}} -L./zig-out/lib
244+
gcc -o example example.c -lvae_normalizer -L./zig-out/lib
245245
```
246246

247247
### From Idris2
248248

249249
```idris
250-
import {{PROJECT}}.ABI.Foreign
250+
import VAE_NORMALIZER.ABI.Foreign
251251
252252
main : IO ()
253253
main = do
@@ -264,44 +264,44 @@ main = do
264264
### From Rust
265265

266266
```rust
267-
#[link(name = "{{project}}")]
267+
#[link(name = "vae_normalizer")]
268268
extern "C" {
269-
fn {{project}}_init() -> *mut std::ffi::c_void;
270-
fn {{project}}_free(handle: *mut std::ffi::c_void);
271-
fn {{project}}_process(handle: *mut std::ffi::c_void, input: u32) -> i32;
269+
fn vae_normalizer_init() -> *mut std::ffi::c_void;
270+
fn vae_normalizer_free(handle: *mut std::ffi::c_void);
271+
fn vae_normalizer_process(handle: *mut std::ffi::c_void, input: u32) -> i32;
272272
}
273273

274274
fn main() {
275275
unsafe {
276-
let handle = {{project}}_init();
276+
let handle = vae_normalizer_init();
277277
assert!(!handle.is_null());
278278

279-
let result = {{project}}_process(handle, 42);
279+
let result = vae_normalizer_process(handle, 42);
280280
assert_eq!(result, 0);
281281

282-
{{project}}_free(handle);
282+
vae_normalizer_free(handle);
283283
}
284284
}
285285
```
286286

287287
### From Julia
288288

289289
```julia
290-
const lib{{project}} = "lib{{project}}"
290+
const libvae_normalizer = "libvae_normalizer"
291291

292292
function init()
293-
handle = ccall((:{{project}}_init, lib{{project}}), Ptr{Cvoid}, ())
293+
handle = ccall((:vae_normalizer_init, libvae_normalizer), Ptr{Cvoid}, ())
294294
handle == C_NULL && error("Failed to initialize")
295295
handle
296296
end
297297

298298
function process(handle, input)
299-
result = ccall((:{{project}}_process, lib{{project}}), Cint, (Ptr{Cvoid}, UInt32), handle, input)
299+
result = ccall((:vae_normalizer_process, libvae_normalizer), Cint, (Ptr{Cvoid}, UInt32), handle, input)
300300
result
301301
end
302302

303303
function cleanup(handle)
304-
ccall((:{{project}}_free, lib{{project}}), Cvoid, (Ptr{Cvoid},), handle)
304+
ccall((:vae_normalizer_free, libvae_normalizer), Cvoid, (Ptr{Cvoid},), handle)
305305
end
306306

307307
# Usage
@@ -355,7 +355,7 @@ When modifying the ABI/FFI:
355355

356356
2. **Generate C header**
357357
```bash
358-
idris2 --cg c-header src/abi/Types.idr -o generated/abi/{{project}}.h
358+
idris2 --cg c-header src/abi/Types.idr -o generated/abi/vae_normalizer.h
359359
```
360360

361361
3. **Update FFI implementation** (`ffi/zig/src/main.zig`)
@@ -382,4 +382,4 @@ When modifying the ABI/FFI:
382382
- [Zig Documentation](https://ziglang.org/documentation/master/)
383383
- [Rhodium Standard Repositories](https://github.com/hyperpolymath/rhodium-standard-repositories)
384384
- [FFI Migration Guide](../ffi-migration-guide.md)
385-
- [ABI Migration Guide](../abi-migration-guide.md)
385+
- [ABI Migration Guide](../abi-migration-guide.md)

CHANGELOG.md

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

FUNDING.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ lfx_crowdfunding:
1717
polar:
1818

1919
# Custom funding links
20-
custom:
21-
- https://huggingface.co/datasets/joshuajewell/VAEDecodedImages-SDXL
20+
2221

2322
# Solidarity Economics Framework
2423
#

LICENSE

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,7 @@ EXHIBITS
140140
Exhibit A - Ethical Use Guidelines
141141
Exhibit B - Quantum-Safe Provenance Specification
142142

143-
See separate files:
144-
- EXHIBIT-A-ETHICAL-USE.txt
145-
- EXHIBIT-B-QUANTUM-SAFE.txt
143+
146144

147145
--------------------------------------------------------------------------------
148146
END OF PALIMPSEST-MPL LICENSE VERSION 1.0

MAINTAINERS.adoc

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

0 commit comments

Comments
 (0)