simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Wed May 14 23:06:09 BST 2025


TL;DR:
  682119a js: unwrap most drawing functions

Repository:     https://git.tartarus.org/simon/puzzles.git
On the web:     https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer:      Ben Harris <bjh21 at bjh21.me.uk>
Date:           2025-05-14 23:06:09

commit 682119abebda4d0dbc233231a18b4735ffdfce10
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=682119abebda4d0dbc233231a18b4735ffdfce10;hp=49aad96bb553fcc19f0535923b4ba0117f412902
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Wed May 14 20:52:58 2025 +0100

    js: unwrap most drawing functions
    
    After recent changes, most of the drawing functions in the JavaScript
    front end were thin C wrappers around corresponding functions
    implemented in JavaScript.  Their only functionality was to discard
    their first arguments, which is easily done in JavaScript instead.
    
    So I've removed those wrapper functions and, in those cases, put
    references to the JavaScript functions straight into the drawing_api
    structure.  This saves about 1 KB of wasm from each puzzle in my test
    build.

 emcc.c     | 107 +++++++++++++++----------------------------------------------
 emcclib.js |  53 +++++++++++++++++-------------
 2 files changed, 56 insertions(+), 104 deletions(-)



More information about the tartarus-commits mailing list