eadkp banner

eadkp

12 devlogs
56h 28m 10s

A Rust framwork to facilitate the development of external applications for NumWorks calculator Epsilon (features and abstractions).

NumWorks is a French brand of graphing calculators (mostly used by hi…

A Rust framwork to facilitate the development of external applications for NumWorks calculator Epsilon (features and abstractions).

NumWorks is a French brand of graphing calculators (mostly used by high school students). These calculators feature the ability to code external applications in machine code and import them, allowing developers to take full advantage of the hardware’s power.

This project uses AI

Using Gemini for translating documentations (my english is not very good…) and improve dump.sh and the latest version of examples/serial.rs

Demo Repository

Loading README...

Oignon

Refactored documentation and guide to be clearer for people outside the NumWorks community.

Translated the documentation into English.

Moved the documentation to the GitHub repot wiki section.

Attachment
0
Oignon

Fixed the Dockerfile (the one I use in the template) to include the Numworks linker dependencies. I had cleaned up the dependencies earlier, but I guess I shouldn’t have! :)

Updated the ‘demo link’ to point to the beta1 release.

Just to clarify, the build tools like the justfile (a cmake equivalent) were created by me for this project’s needs, and then reused or adapted for the project template that uses my lib.


IMPORTANT: I forgot to mention that this library must operate under extreme
constraints!
The Numworks calculator features a Cortex-M7 and only allocates
64KB of RAM to external applications. This library must use as little of
that 64KB as possible (which is already very limited) to leave maximum
resources for the application using it.

I could have applied for the “Optimization” category, but I already knew
what I was getting into, so I didn’t, sniff. However, I am using methods
like zero-copy via segmented file writing functions, as well as optimized
randomization algorithms like Xorshift32 and Lemire’s algorithm.

0
Oignon

Shipped this project!

Hours: 53.31
Cookies: 🍪 1397
Multiplier: 21.84 cookies/hr

This is quite literally my first-ever Rust project.

Originally, I wanted to make a game for the Numworks calculator, but I realized that for every app I created, I’d have to rewrite the same boilerplate code and deal with the same specific configuration over and over. So, I built a library to handle it! (I might have gotten a bit carried away though—I’ve spent so much time on the lib that I haven’t even started the game yet).

The library is called EADKP, which stands for Epsilon Application Development Kit Plus, because there’s already a basic ‘eadk’ that mainly acts as a Rust wrapper for the C ABI.

This project required me to dive deep into the Numworks architecture: SlotInfo, UserLand, Kernel, Filesystem, etc. Since modifying files requires accessing specific RAM addresses, understanding the structure, and performing hot-patching in RAM—which is no small feat in Rust, especially when trying to keep it memory-safe. The lib also adds abstractions, a smart image loader (since images are a real pain to work with), extra features like battery level retrieval, and a template to easily kickstart new projects using the library.

Template demo: https://www.youtube.com/watch?v=KNKvgqE-Wmg

I’ve clearly learned a lot, especially since this is not only my first Rust project but also my first low-level project (I usually come from a TypeScript background).

Oignon

Added documentation files: CODE_OF_CONDUCT.md, CONTRIBUTING.md, SECURITY.md,
and included a demo video of the base application.

0
Oignon

v0.18.0: random and images

I have finalized the last elements before moving to Beta.

  • Image System Refactor: Optimized and modularized the system. You can now choose whether an image is stored in RAM (for speed) or kept in Flash (slower, but saves RAM).
  • Random Module Refactor: Improved the internal implementation of the Xorshift32 algorithm and implemented Lemire’s algorithm for unbiased sampling.
  • Removed the requirement for cargo-nightly.

These two refactors were (normally) the last remaining major API changes. I am now moving to Beta 1 and marking the project as feature-complete. Once I have thoroughly verified everything and completed the documentation, it will move to a full release. This will happen over time as it gets battle-tested by other projects.

Attachment
0
Oignon

I wanted to implement cargo-release, but their system is too rigid for my specific needs. Instead, I’ve created a .sh script that aligns better with my requirements. However, please ensure that the script is as secure as possible and that it reverts to the original state if any error occurs.

Attachment
0
Oignon

Alpha 4 (v0.13.0): Switched to LGPL-3.0 License!

I have officially moved the project to the LGPL-3.0 license! LGPL-3.0 allows you to use this library in your own projects without the license “contaminating” your entire codebase. This means your project’s license remains independent of this library.

I have also (mostly) translated all code comments into French, as the NumWorks community is almost exclusively French. Additionally, I’ve added two new functions to input (is_alphanumeric and to_alphanumeric) to easily convert keyboard input into strings.

Attachment
0
Oignon

v1.12.0 is Here! - Important update: Storage sub-module refactor!

After 67 days of working on refactoring the calculator’s storage management sub-module, it’s finally done!
The logic in storage.rs has been entirely rewritten to be faster, more secure, and more modular. It’s been a long journey, but I finally made it!

-> Release here

For this third overhaul of storage.rs, I had to create a new sub-module: epsilon.rs. This module contains the structures and representations of Epsilon’s system objects. Thanks to this centralized logic, fixing a mapping error on an object will now have an immediate effect across the entire project. This is a huge plus!

This refactor forced me to dive even deeper into the calculator’s memory structure and gain a thorough understanding of its layout.

Minor Changes:

  • Updated README
  • Synced justfile
  • Updated example files
  • Added Errors enum
  • Added Rust CI workflow

I can now focus on adding new features to the library’s API !

Attachment
0
Oignon

Version 0.10, 0.11, 0.11.1 and 0.11.2 :

  • Removed conditional imports, unnecessary since std already provides alloc when OS=YES.
  • Cleaned up imports in the setup macro.
  • Switch to 0.11.2-alpha.2
  • Publish 0.11.2 to crates.io
Attachment
0
Oignon

Fix MAJOR compilation ISSUES in the eadkp::builder::setup() script and embedded dynamic allocator imports within the setup macro.

Code preview of the future template using the library (after bug fixes):

Attachment
0
Oignon

Moved build script inside the EADKP library:
- The build script has been moved into the EADKP library for easier usage and project integration.

Attachment
0
Oignon
  • C/C++ support testing
  • Binary generation optimization:
    • Unused C/C++ code is no longer compiled or linked, reducing final binary sizes.
  • C/C++ support in the simulator:
    • C/C++ code will now be compiled and linked when running in the simulator, rather than only on the physical device.
  • Support for c/ and cpp/ folders for C/C++ code.
  • EIF file extension change:
    • EIF files now use the .eif extension instead of .bin.
  • Added Micro and Nano text editors to the Docker image to facilitate editing files directly from the shell.
Attachment
0