Skip to content

A framework for building cross platform applications, tools, and games.

License

Notifications You must be signed in to change notification settings

lambda-sh/lambda

Repository files navigation

Cross Platform builds & tests lambda-rs lambda-rs

Table of contents

  1. Description
  2. API Documentation
  3. Building
    1. From crates.io
    2. From source
      1. External dependencies
      2. Optional dependencies
      3. Linux, Macos, Windows
  4. Getting started
  5. Examples
  6. Planned additions
  7. How to contribute
  8. Resources

Description

Lambda is a framework for developing cross platform applications and workloads using Rust.

Lambda aims to enable developers to create highly performant, portable, and minimal desktop applications by providing a platform agnostic API for all of the features that any application or workload might need.

Lambda :

  • Desktop applications
  • Productivity tools
  • Data visualizations
  • Physical system simulations
  • Games

Over the last couple of years, the prominence of the web has replaced traditional desktop applications. While this has lead to a golden age for developing UI/UX for applications across all platforms, it has come at the cost of degraded performance & resource consumption.

Lambda's goal isn't to replace electron, webview, or other similar web based desktop frameworks, however; it is to instead create a cross platform ecosystem for desktop applications with performance and resource consumption at the forefront of it's priorities without sacrificing good UI/UX. Lambda may offer lightweight HTML/CSS based rendering in the future but we're primarily focused on implementing a Rust native UI framework built on top of our rendering engine.

Documentation

Installation

From crates.io

lambda is now available on crates.io and can be added to your project by adding the following to your Cargo.toml file:

[dependencies]
lambda-rs = "2023.1.30"

or from the CLI:

cargo add lambda-rs

From source

Required external dependencies

  • All platforms
    • cmake >= 3.20.0 is needed to build shaderc from source.
    • ninja is needed to build shaderc from source.
    • git is needed to clone the project and manage it's dependencies.
    • git-lfs is needed for asset files.
    • rust >= 1.60 is needed for compiling lambda and all of it's crates.
    • pre-commit is used for development git commit hooks and any changes that do not pass the pre-commit checks will not be accepted.

Rendering API support

These are the Rendering APIs that are supported on each platform and must be installed manually. More information on how to choose which backend lambda uses on each platform is provided further below.

  • Windows
    • OpenGL
    • Vulkan
    • DirectX11
    • DirectX12
  • Linux
    • OpenGL
    • Vulkan
  • MacOS
    • Metal
    • Vulkan

Linux (bash), MacOS (bash), Windows (git-bash)

If planning to develop for lambda, you must run the setup script provided by repository like so:

./scripts/setup.sh

This will initialize pre commit checks for development use and setup git-lfs for asset management.

In order to validate that lambda successfully compiles, you can build the library by performing a build with cargo.

cargo build --lib

If this works successfully, then lambda is ready to work on your system!

Getting started

Coming soon.

Examples

Minimal

A minimal example of an application with a working window using lambda.

cargo run --example minimal

Push Constants

An example of using shaders with push constants to render a 3D image.

cargo run --example push_constants

Notes

  • On windows, you need to run this example with --features lambda-rs/with-vulkan as the shader used in the example does not work in either dx11 or dx12.

Triangle

An example using shaders to render a single triangle.

cargo run --example triangle

Triangles

An example using shaders to render multiple triangles and keyboard input to move one of the triangles on screen.

cargo run --example triangles

Plans

  • Architecture support

    • x86
    • arm64
  • Operating system support

    • MacOS
    • Linux
    • Windows 10/11
    • Xbox Series S|X (Long term goal)
    • iOS (Long term goal)
    • Android (Long term goal)
  • Rendering API support

    • OpenGL
    • Vulkan
    • Metal
    • DirectX11
    • DirectX12
  • Packages

  • Examples

    • Minimal -- A minimal example of an application with a working window using lambda.
    • Push Constants -- An example of using shaders with push constants to render a 3D image.
    • Triangle -- An example using shaders to render a single triangle.
    • Triangles -- An example using shaders to render multiple triangles and keyboard input to move one of the triangles on screen.
  • Tools

    • obj-loader -- (WIP) Loads .obj files into lambda. Meshes need to be triangulated in order for it to render at the moment.
    • platform-info -- Utility for viewing information about the current platform.
  • CI/CD

    • Github action pipelines for building lambda on all platforms.
    • Github action pipelines for creating downloadable builds from releases.
    • Tests & benchmarking.
      • Unit tests.
    • Nightly builds.

How to contribute

Fork the current repository and then make the changes that you'd like to said fork. Stable releases will happen within the main branch requiring that additions to be made off of dev which is the nightly build branch for lambda. Upon adding features, fixing bugs, or whatever modifications you've made to the project, issue a pull request into the latest dev branch containing the changes that you've made and I will evaluate them before taking further action. This process may take anywhere from 3-7 days depending on the scope of the changes made, my schedule, and any other variable factors. They must also pass all of the build pipelines are configured to run at merge.

Resources

The Cherno's playlist for making a game engine

Creator of Logo

About

A framework for building cross platform applications, tools, and games.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •