Skip to content

kenz-gelsoft/wxRust

Repository files navigation

This repo has been abandoned years ago. As I (original author) commented here, I'm trying this again with now stable and mature language and solid ecosystem in the another repo.

April 1st, 2022.


wxRust

master: master build status / mac(0.10): Mac(0.10) build status

This is a Rust binding for the wxWidgets cross platform toolkit.

API

wxRust API documentation

How it works

The wxRust library is heavily based on the wxHaskell's wxc library.

The wxc is a C language binding for the C++ wxWidgets toolkit.

We utilize the rust-bindgen rust-bindgen build status automatic rust binding generator for its _unsafe low-level binding.

And we generate an OOP-style high-level binding (other modules than _unsafe) by codegen.py code generator.

Build

We use CMake for cross platform build, but Windows platform is not yet tested.

For Linux build instructions, see INSTALL.linux.md

Build Prerequisite

Use following Rust compiler version for your wxRust branch. We're using Servo master's one for main development.

wxRust branchSupported Rust compiler version
master master

Install the wxWidgets 3.0 (2.9.5 or later is required) and CMake as below (in the case of Homebrew):

brew install wxmac
brew install cmake

With some tweak you may be able to compile wxRust with a bit older versions (2.9.0 < x < 2.9.4) of wxWidgets. See issue #21 comments for details.

Build the library

At the project root directory,

Checkout git submodules:

git submodule init # for the first time.
git submodule update

And generate Makefiles and make:

mkdir build
cd build
cmake ..
make

Compile and Run the Test program

At the CMake binary directory:

make test && ./test

On Mac, Run as below:

make Test.app
open ./Test.app # or open in Finder

Generate Documentation

At the CMake binary directory:

make doc

Generates a rustdoc documentation under doc directory.

About

A Rust binding of the wxWidgets cross platform toolkit.

Resources

License

Stars

Watchers

Forks

Packages

No packages published