GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Twitter
  • Github
  • Blog
  • Docs

This view

  • Original page
  • New address

GeezerVison is showing vislyhq.github.io — Stretch

A high performance & cross-platform layout engine

Written in Rust

We chose to write stretch in the Rust programming language as it ensures memory safety, efficient multi-threading, and has fantastic cross-platform support.

Optimised for mobile

While stretch can be used on any platform we chose to optimize it for mobile. This means a small binary size and minimal memory usage.

Tested against Chrome

Stretch is tested against Chrome to ensure 100% web compatibility. You can trust stretch to layout your native apps exactly like your web apps.
DocumentationView on GitHub

Cross platform

main.rs
use stretch::{style::*, node::*, geometry::Size};

let stretch = Stretch::new();

let node = stretch.new_node(Style {
    size: Size { 
        width: Dimension::Points(100.0), 
        height: Dimension::Points(100.0),
    },
    ..Default::default()
}, vec![]).unwrap();

stretch.compute_layout(node, Size::undefined());
index.js
import { Allocator, Node } from 'stretch-layout';

const allocator = new Allocator();
const node = new Node(allocator, {
    width: 100, 
    height: 100, 
});

const layout = node.computeLayout({
    width: undefined,
    height: undefined,
});
Main.swift
let node = Node(
    style: Style(
        size: Size(
            width: .points(100.0), 
            height: .points(100.0)
        )
    ), 
    children: []
)
    
let layout = node.computeLayout(
    thatFits: Size(width: nil, height: nil)
)
Main.kt
val node = Node(
    Style(
        size = Size(
            Dimension.Points(100f), 
            Dimension.Points(100f)
        )
    ), 
    listOf()
)

val layout = node.computeLayout(
    Size(null, null)
)

Featured projects

Visly

Visly is a design tool built from the ground up for front-end engineers. Design components visually which can later be imported directly into code. Supports iOS, Android, and Web. Learn more!

Using Stretch?

If you're using stretch please get in touch! We would love to learn more about the use cases and challenges you are facing in your products. We are happy to feature your product right here.

Blog posts

Introducing Stretch

Let’s talk about Layout. Layout is fundamental to any UI application. The layout engine is what takes a set of rules and figures out where to place elements on the screen.

Rust on Android

You may have heard of rust, it’s a systems programming language designed for memory safety and speed. Built by Mozilla to power the next generation high performance cross platform software.

Rust on iOS

You may have heard of rust, it’s a systems programming language designed for memory safety and speed. Built by Mozilla to power the next generation high performance cross platform software.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.