English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 08 November 2018, 10:33   #1
Locutus
Registered User
 
Join Date: Jul 2014
Location: Finland
Posts: 1,176
68k Rust

https://github.com/glaubitz/rust/tree/m68k-linux


68k Rust? Oh lord yes please.


Will be interesting to see where this goes, my understanding is that this project is initiated by Debian/68k people to get coverage up.
Locutus is online now  
Old 08 November 2018, 15:29   #2
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,309
More importantly there seems to be some LLVM activity:
Quote:
librustc_llvm: Enable M680x0 LLVM target
Might be this? https://github.com/M680x0/M680x0-llvm

Rust now available on 14 Debian architectures
https://lists.debian.org/debian-deve.../msg00000.html

Quote:
The other potential candidate for Rust support is m68k. There are ongoing efforts to add m68k to both LLVM [2] and Rust [3] and while many people think that supporting modern Linux software on 30 year-old hardware is insane, I think it's actually fun :-).
nogginthenog is offline  
Old 08 November 2018, 16:08   #3
Locutus
Registered User
 
Join Date: Jul 2014
Location: Finland
Posts: 1,176
Yes a LLVM 68k Backend is a obvious requirement for getting Rust up on 68k ofcourse.

Having Rust is more exciting then just LLVM by itself.
Locutus is online now  
Old 08 November 2018, 17:59   #4
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,309
I think a working LLVM 68k port is more exciting .
Clang would be nice. We have GCC v6 but another modern C++ compiler would be nice.

The author of M680x0-llvm posted in August to the LLVM mailing list about merging changes to the main tree.
It's definitely interesting. Building it now (will take a while...).

LLVM has loads of frontends: ActionScript, Ada, C#, Common Lisp, Crystal, CUDA, D, Delphi, Fortran, Graphical G Programming Language, Halide, Haskell, Java bytecode, Julia, Kotlin, Lua, Objective-C, OpenGL Shading Language, Pony, Python, R, Ruby, Rust, Scala, Swift, and Xojo.
nogginthenog is offline  
Old 18 March 2019, 16:48   #5
Seboss
Registered User
 
Join Date: Feb 2018
Location: Grenoble / France
Posts: 14
I'm taking a deep dive into rust, and it would be very exciting to use it on the Amiga. But would it be possible to support chipmem or register allocation in rust without creating new syntax?
Seboss is offline  
Old 18 March 2019, 19:01   #6
Locutus
Registered User
 
Join Date: Jul 2014
Location: Finland
Posts: 1,176
My guess would be that Rust Static Mutables would be the solution for that.

Take a peek in the Redox-OS tree, they are used there for very similar things when having to access direct memory adresses in kernel mode.
Locutus is online now  
Old 07 October 2019, 05:28   #7
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
Re:LLVM backend

LLVM is a bit heavy to actually run on the Amiga even with a Vampire v4 with its 512 GiB memory. There are a few options that might be able to get it on there. LLVM is modular and unlike GCC, has reentrant optimization passes. This would open the possibility of making the passes into shared libraries and only opening the active pass and closing it once it is no longer in use. This hand-over-hand technique will be slow but effective.

Re:Alternatives to LLVM

The Rust community has made a lightweight alternative to LLVM called CraneLift. The catches with this one is that CraneLift itself is written in Rust and isn't presently supported by current Rust compilers because the only backend written for it is AMD64. Although it generates code 30% faster than LLVM on that platform, the code generated is almost as fast as the code generated by LLVM.
Samurai_Crow is offline  
Old 07 October 2019, 09:28   #8
Hewitson
Registered User
 
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,771
Is LLVM really that much heavier than GCC?
Hewitson is offline  
Old 07 October 2019, 10:34   #9
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by Hewitson View Post
Is LLVM really that much heavier than GCC?

It's a different approach - another Jodeldiplom (https://en.wikipedia.org/wiki/Jodeldiplom)


In gcc the m68k architecture is available - it once was a main architecture...
In llvm there is <...>.



Adopting an exitsing arch is easier than adopting <...>.
bebbo is offline  
Old 07 October 2019, 14:16   #10
E-Penguin
Banana
 
E-Penguin's Avatar
 
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,213
Well that sent me down the Wikipedia rabbit hole for a good while.
E-Penguin is offline  
Old 07 October 2019, 19:24   #11
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
GCC and LLVM are both too heavy to run in 512 MiB. I've never used CraneLift so it might also be.

@bebbo

What are the chances of a Rust frontend for GCC?
Samurai_Crow is offline  
Old 10 October 2019, 11:10   #12
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by Samurai_Crow View Post
GCC and LLVM are both too heavy to run in 512 MiB. I've never used CraneLift so it might also be.

@bebbo

What are the chances of a Rust frontend for GCC?

how should I know?


ask there: https://github.com/redbrain/gccrs
bebbo is offline  
Old 16 December 2021, 14:26   #13
PeterM
Registered User
 
Join Date: Aug 2019
Location: UK
Posts: 3
I read that Rust now has experimental support for m68k.

https://github.com/rust-lang/rust/bl...n-linux-gnu.md

It's probably not very useful or usable at the moment.
PeterM is offline  
Old 16 December 2021, 16:25   #14
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
It lacks the core and std runtimes for Linux. 68k Aros runs ELF binaries though. It's a pity most Aros devs moved on. Anyway, the runtimes are quite extensive from what I've seen in the documentation. I'm not sure how much under the hood is "unsafe" system specific code.
Samurai_Crow is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Softwindows 2 - 68k Grex request.Apps 39 09 April 2023 19:42
Amiga 600 RF shield rust/oxidation question superrune support.Hardware 15 10 October 2018 12:49
REminiscence 68k turrican3 support.Apps 2 21 April 2018 21:42
ScummVM 0.9.1 68k Paul News 28 20 August 2010 02:36
Diamonds & Rust ?? mai HOL contributions 10 26 September 2008 06:37

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:36.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08787 seconds with 13 queries