Code Monkey home page Code Monkey logo

epsilon-sample-app-rust's People

Contributors

ecco avatar emilienumworks avatar emmanumworks avatar gabrielnumworks avatar hugonumworks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epsilon-sample-app-rust's Issues

Does it works in epsilon 18.2.3?

I don't really understand, since epsilon 16, (with n110) the epsilon is supposed to be locked but we can unlock it with Phi. In epsilon 18.2.3 we can't anymore so can we add apps to the numworks even if it is locked?

Make cargo output a .nwa file

I couldn't find how to customize the executable filename. For now the executable is epsilon-sample-app but it should be epsilon-sample-app.nwa.

Apparently it's something you can tweak if you come up with a custom rustc target, but that might be overkill.

can't draw rectangles with more than 65637 pixels on Epsilon 18.2.0?

Hello, I was trying to display an image on the whole calculator screen, but strange things happened, sometimes the numworks crashed, other times I couldn't restart the app because "exam mode was enabled" (I never enabled it),
so I tried to figure out where this bug came from and found that if I tried to draw a rectangle with push_rect(rect: Rect, pixels: &[Color]) with more than 65637 white pixels (which is very close to 2^16) , the calculator was crashing, the same thing with more pixels with random colors created weird things like enabling the exam mode or crash when starting other applications.
here is the code:

#[no_mangle]
pub fn main() {
    push_rect(
        Rect {
            x: 0,
            y: 0,
            width: 10,
            height: 10,
        },
        &[Color { rgb565: u16::MAX }; 65637],
    );
}

(The only things I changed other than this are adding #[derive(Clone, Copy) to Color and the build.rs and .cargo/config files)

I don't know much about how numworks works, but I found this bug quite weird and I didn't see any issue about it on the different numworks github repositories
is this normal? is there a fix?

License choise and compatibility with the GNU GPL

The BSD 4-clauses seems like it's not really a good license for this kind of repository, since the whole purpose of the external app system in the beginning was to avoid licensing problems with software using the GNU GPL.

Since this license is incompatible with the GNU GPL, I would suggest to change it for a BSD 3-clauses, which is compatible with said GNU GPL. An even better license would be a MIT license, since it's better suited for thins kind of boilerplate repositories (or even public domain, but I don't think this is ever going to happen).

Unable to set up an allocator

I'm unable to get an app with an allocator to build. I tried using simple_chunk_allocator to create a small region of memory that I could allocate dynamically.

I set it up like this in the main.rs module.

#![feature(const_mut_refs)]
#![feature(allocator_api)]
#![feature(default_alloc_error_handler)]

static mut HEAP: PageAligned<[u8; 4096]> = heap!(chunks = 256, chunksize = 16);
static mut HEAP_BITMAP: PageAligned<[u8; 2]> = heap_bitmap!(chunks = 16);
#[global_allocator]
static ALLOCATOR: GlobalChunkAllocator =
    unsafe { GlobalChunkAllocator::new(HEAP.deref_mut_const(), HEAP_BITMAP.deref_mut_const()) };

Cargo has no problem building it, but when nwlink runs, I get these errors:

    Finished release [optimized] target(s) in 1.15s
     Running `nwlink install-nwa target/thumbv7em-none-eabihf/release/numworks-app`
Upload [----------------------------------------] 0% | ETA: 0s/home/carson/.nvm/versions/node/v16.9.1/bin/nwlink: app.nwa:(.ARM.exidx.text.__rust_alloc+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
/home/carson/.nvm/versions/node/v16.9.1/bin/nwlink: app.nwa:(.ARM.exidx.text.__rust_dealloc+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
/home/carson/.nvm/versions/node/v16.9.1/bin/nwlink: app.nwa:(.ARM.exidx.text.__rust_realloc+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
/home/carson/.nvm/versions/node/v16.9.1/bin/nwlink: app.nwa:(.ARM.exidx.text.__rust_alloc_error_handler+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.