Common Lisp package that converts S-expressions to source code of the Rust programming language.
from book, minimal
from book
opengl binding. apparantly, original developer seems to have abandoned the approach in 2016. people still seem to use it. i just want to just get up and running with an immediate mode gui. this looks too cumbersome.
i tried this approach in cl-rust-adalm-pluto and couldn’t figure out how to call glTexSubImage2D to update a waterfall diagram texture. then i wrote the 08_glfw example which seems to expose opengl the way i know it.
- perhaps this is easier to use for a 2d gui
- too many dependencies
- shows imgui window
- to cumbersome without learning more glium
- example from book
- shows how to generate a multi file projects
- also contains a minimal firefox webextension to download a bunch of text file links
- i’m not sure if i want to use glutin or glfw
- glutin isn’t well documented compared to glfw
- many glutin examples seem to show a different interface (e.g. EventsLoop)
- i will use glfw for now
- pulls in a lot of crates
- this still pulls in a lot of crates (~70) but it seems to work well enough and is close to glfw docs
- i also managed to compile it in windows (that needed microsoft builder tools, rust and cmake, though)
Simple wasm example
Wasm webgl example (only draws a triangle, no animation or event handling)
Add two arrays with rustacuda
webgpu is suppossed to replace webgl in browser. apparently, firefox only supports compute right now. the api is not stable yet.
for viewing the generated code
- Install rust-mode and eglot with Melpa
- rustup component add rls –toolchain stable-x86_64-unknown-linux-gnu
- start company-mode, rust-mode and eglot-mode
FIXME: completion not working
- when calling C/C++ unwinding is undefined behaviour, use catch_unwind
- -C panic=abort reduces file size because unwinding code is not needed
- align https://doc.rust-lang.org/edition-guide/rust-2018/data-types/choosing-alignment-with-the-repr-attribute.html