official software project ? (Rust for IOT ?)
#1
Hi

I don't have yet my dev kit, but I have just started to check for the current status.
Am I wrong if I say that there is no official project for now and people are testing things/setting up their dev setup on their side ?

Look like the most advanced project is Lup Yuen Lee's rust project (https://twitter.com/MisterTechBlog), but he seems to not use this forum.
So maybe this project is kind of official ?
I was first very surprised to see he is working in rust language. 
I always thought that rust is a very good language but not for IOT because of the code size and lack of full control. (just compare a hello world in rust and C (in release mode) and check the code size). After few research I saw that this big size come from libraries that are statically linked. In barre metal we dont use external library like libstd, so we are fine.
But I then dont have an answer to my question: is rust code bigger than C ? If yes is it acceptable ?
I have nothing against rust, it can be an opportunity to learn (I like the philosophy behind rust, and I have planed to learn it in the future), but when doing IOT stuff it's better to have full control on what we are doing. And in C you can understand what is happening in low level (assembly code). I suppose I wont be able to do that in rust.
Also in C you have full control of the FW size and of your structure. Is it also the case in rust ? I read in the net that Rust references can be fat ... 

One argument of  Lup Yuen Lee to use rust is that, rust protect us on memory corruption. But on very small system it's better to avoid use of heap (malloc/free). You dont need that. And you may even end up by fragmenting your few RAM because of different size object allocation.
And in rust if you use things like map or vector, are you then indireclty use the heap ? If yes, is there any issue on RAM fragmentation ?

One more thing: There is 512KB of ROM. In case of FW update which I suppose has to be done via bluetooth., where can we save the blob we receive ? We may have to split in 2 the ROM, right ? If it's the case then the FW code has to fit in 256 KB (less if we count the bootstrap). Is the rust code able to fit ?
Or maybe you prefer to have a smart bootloader with DFU and bluetooth inside the bootloader ?

Again I have nothing against rust, and will be happy to learn it sooner that I was expecting, but then I would like to know if someone is comfortable enough to handle this kind of issue ?


Messages In This Thread
official software project ? (Rust for IOT ?) - by abdel - 11-19-2019, 02:51 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Article: Create Your Own PineTime Watch Face in Rust... And Publish on crates.io lupyuen 2 5,445 10-18-2020, 09:24 PM
Last Post: lupyuen
  Rust on PineTime at RIOT Summit lupyuen 3 5,706 09-25-2020, 05:05 PM
Last Post: lupyuen
  Article: Porting PineTime Watch Face from C to Rust On RIOT with LVGL lupyuen 0 2,283 09-12-2020, 10:13 PM
Last Post: lupyuen
  Developing the software in the web browser kreyren 2 3,070 03-10-2020, 01:34 PM
Last Post: VMMainFrame
  Create PineTime Watch Apps with Visual Rust lupyuen 0 2,100 02-19-2020, 02:50 AM
Last Post: lupyuen

Forum Jump:


Users browsing this thread: 1 Guest(s)