https://github.com/almide/almide-lander
Cross-Language Package Lander — export Almide modules as native packages for Python, JS/TS, Swift, Ruby, C, and more
https://github.com/almide/almide-lander
Last synced: 3 months ago
JSON representation
Cross-Language Package Lander — export Almide modules as native packages for Python, JS/TS, Swift, Ruby, C, and more
- Host: GitHub
- URL: https://github.com/almide/almide-lander
- Owner: almide
- License: mit
- Created: 2026-03-28T04:01:16.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-28T08:17:21.000Z (3 months ago)
- Last Synced: 2026-03-28T09:38:18.082Z (3 months ago)
- Size: 271 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Export Almide modules as native packages for 21 languages.
Almide ·
almide-bindgen ·
Playground
---
## What is this?
Write a library in Almide. Run one command. Use it from 21 languages.
```bash
almide run src/main.almd -- --lang python mylib.almd
almide run src/main.almd -- --lang python,go,swift mylib.almd # multiple at once
almide run src/main.almd -- --list # show all 21
almide run src/main.almd -- --dry-run --lang ruby mylib.almd # preview
```
No runtime. No VM. Almide disappears — only a native shared library and a pure language wrapper remain.
## How it works
```
mylib.almd
│
├─ [1/N] almide compile --json → interface.json
├─ [2/N] almide --target rust --repr-c → source.rs + cargo build → .so/.dylib
└─ [3/N] bindgen.bindings..generate() → almide_mylib.py / .go / .swift / ...
```
## Architecture
```
almide-bindgen (library, 21 generators) almide-lander (this repo, CLI)
├── src/mod.almd ├── almide.toml → depends on bindgen
├── src/scaffolding.almd ├── src/main.almd → import bindgen
└── src/bindings/ (21 .almd files) └── test/ (51 tests)
```
Everything is written in Almide. No Python, no external tool dependencies.
## Demo
### 1. Write Almide
```almide
// mathlib.almd
import math
type Point = { x: Float, y: Float }
type Shape = Circle(Float) | Rect(Float, Float)
fn distance(a: Point, b: Point) -> Float = {
let dx = a.x - b.x
let dy = a.y - b.y
math.sqrt(dx * dx + dy * dy)
}
fn area(shape: Shape) -> Float = match shape {
Circle(r) => math.pi() * r * r,
Rect(w, h) => w * h,
}
```
### 2. Land it
```bash
almide run src/main.almd -- --lang python mathlib.almd
```
```
[1/3] Compiling interface from mathlib.almd...
[2/3] Building shared library...
OK
[3/3] Generating python binding...
almide_mathlib.py
Done. Generated 1 binding(s) for mathlib.
```
### 3. Use it
**Python**
```python
from almide_mathlib import Point, distance
distance(Point(x=0, y=0), Point(x=3, y=4)) # 5.0
```
**Go**
```go
d := almide.Distance(almide.Point{X: 0, Y: 0}, almide.Point{X: 3, Y: 4})
```
**Ruby**
```ruby
d = AlmideMathlib.distance(AlmideMathlib::Point.new(x: 0, y: 0), AlmideMathlib::Point.new(x: 3, y: 4))
```
**Swift**
```swift
let d = Mathlib.distance(Point(x: 0, y: 0), Point(x: 3, y: 4))
```
**C#**
```csharp
var d = Bridge.Distance(new Point(0, 0), new Point(3, 4));
```
**Dart**
```dart
final d = Mathlib.distance(Point(x: 0, y: 0), Point(x: 3, y: 4));
```
**Kotlin**
```kotlin
val d = Mathlib.distance(Point(0.0, 0.0), Point(3.0, 4.0))
```
**Java**
```java
double d = Mathlib.distance(new Point(0, 0), new Point(3, 4));
```
**C++**
```cpp
auto d = almide::distance(almide::Point{0, 0}, almide::Point{3, 4});
```
**Rust**
```rust
let d = almide_mathlib::distance(Point { x: 0.0, y: 0.0 }, Point { x: 3.0, y: 4.0 });
```
**JavaScript**
```javascript
const d = distance({x: 0, y: 0}, {x: 3, y: 4}); // 5.0
```
**C**
```c
double d = almide_distance(0, 0, 3, 4);
```
**Zig**
```zig
const d = almide.distance(Point{ .x = 0, .y = 0 }, Point{ .x = 3, .y = 4 });
```
**Nim**
```nim
let d = distance(Point(x: 0, y: 0), Point(x: 3, y: 4))
```
**Scala**
```scala
val d = Mathlib.distance(Point(0.0, 0.0), Point(3.0, 4.0))
```
**Julia**
```julia
d = distance(Point(0.0, 0.0), Point(3.0, 4.0))
```
**Elixir**
```elixir
d = AlmideMathlib.distance(%Point{x: 0.0, y: 0.0}, %Point{x: 3.0, y: 4.0})
```
**PHP**
```php
$d = AlmideMathlib::distance(new Point(0, 0), new Point(3, 4));
```
**Lua**
```lua
local d = almide.distance(Point.new(0, 0), Point.new(3, 4))
```
**PowerShell**
```powershell
$d = [AlmideMathlib]::Distance([Point]::new(0, 0), [Point]::new(3, 4))
```
## License
MIT