Re: Rust support on its way!

2023-08-30 Thread Dr. Arne Babenhauserheide

Samuel Thibault  writes:

> Guy-Fleury Iteriteka, le mer. 30 août 2023 06:26:45 +0200, a ecrit:
>> On August 30, 2023 1:42:30 AM GMT+02:00, Samuel Thibault 
>>  wrote:
>> >Thanks to Vedant's GSoC work, we have patches submited to upstream Rust
>> >to support Rust on GNU/Hurd!
>> >
>> Can tou plz share the link of the pull request . I can't find on rust github 
>> repo
>
> https://github.com/rust-lang/rust/pull/115230
> https://github.com/rust-lang/libc/pull/3325

Very nice! Kudos!

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de


signature.asc
Description: PGP signature


Re: Rust support on its way!

2023-08-29 Thread Samuel Thibault
Guy-Fleury Iteriteka, le mer. 30 août 2023 06:26:45 +0200, a ecrit:
> On August 30, 2023 1:42:30 AM GMT+02:00, Samuel Thibault 
>  wrote:
> >Thanks to Vedant's GSoC work, we have patches submited to upstream Rust
> >to support Rust on GNU/Hurd!
> >
> Can tou plz share the link of the pull request . I can't find on rust github 
> repo

https://github.com/rust-lang/rust/pull/115230
https://github.com/rust-lang/libc/pull/3325

Samuel



Re: Rust support on its way!

2023-08-29 Thread Samuel Thibault
Samuel Thibault, le mer. 30 août 2023 01:42:30 +0200, a ecrit:
> The building process is relatively tricky, I have put some notes at the
> end of:
> 
> https://darnassus.sceen.net/~hurd-web/community/gsoc/project_ideas/rust/

tests/ui results:

test result: FAILED. 15229 passed; 33 failed; 230 ignored; 0 measured; 0 
filtered out; finished in 6647.48s

Help welcome on fixing these ;)

Samuel



Re: Rust support on its way!

2023-08-29 Thread Guy-Fleury Iteriteka
On August 30, 2023 1:42:30 AM GMT+02:00, Samuel Thibault 
 wrote:
>Hello,
>
>Thanks to Vedant's GSoC work, we have patches submited to upstream Rust
>to support Rust on GNU/Hurd!
>
Can tou plz share the link of the pull request . I can't find on rust github 
repo

>The building process is relatively tricky, I have put some notes at the
>end of:
>
>https://darnassus.sceen.net/~hurd-web/community/gsoc/project_ideas/rust/
>
>The availability of Debian packages will be for later: they are for now
>still at an older rust version, we'll probably want to just wait for
>that to catch up with upstream rather than re-work on the porting.
>
>Samuel
>

Hello,

Congrats all for your hard work.



Rust support on its way!

2023-08-29 Thread Samuel Thibault
Hello,

Thanks to Vedant's GSoC work, we have patches submited to upstream Rust
to support Rust on GNU/Hurd!

The building process is relatively tricky, I have put some notes at the
end of:

https://darnassus.sceen.net/~hurd-web/community/gsoc/project_ideas/rust/

The availability of Debian packages will be for later: they are for now
still at an older rust version, we'll probably want to just wait for
that to catch up with upstream rather than re-work on the porting.

Samuel



Re: Rust support

2017-12-27 Thread Joshua Branson
Awesome!!! Keep up the cool work!

On Mon, Dec 25, 2017, at 8:19 PM, David Michael wrote:
> Hi,
> 
> I've been poking at cross-compiling Rust projects for Hurd on and off
> for a couple of weeks, and I thought I'd upload what I have now for
> comments.  A new snapshot of my silly Hurd distro is available at
> https://github.com/dm0-/gnuxc updated with the Rust reimplementation
> of librsvg, so there is an example user of this.
> 
> The distro commit contains a patch[1] against the current Rust release
> (1.22.1) which can be used to build std libraries for Hurd with your
> Linux-based system's existing rustc.  I've also pushed the patch
> against master[2].  See the RPM spec file[3] for the commands to build
> the std libraries and a target spec JSON file.
> 
> Since Rust doesn't have a default path, the environment variable
> RUST_TARGET_PATH must be set to the directory containing the JSON spec
> file.  With that and the rlib files installed to
> /usr/lib/rustlib/i686-pc-gnu/lib, Rust projects can be built for Hurd
> with "cargo --target=i686-pc-gnu build".  The command "rustc
> --codegen=ar=i686-pc-gnu-gcc-ar --codegen=linker=i686-pc-gnu-gcc
> --target=i686-pc-gnu" will directly compile Rust files without cargo.
> 
> Note that projects will likely depend on libc, which will need to be
> patched with the same changes used to build std.  The librsvg
> package[4] has an example of how to do this with vendored crates, but
> other projects may require you to set up a local registry and patch it
> there.
> 
> The current implementation reuses the Linux code with some additional
> conditional blocks, but I think it may be better to start a new OS
> port for Hurd.  Otherwise, it may turn into whack-a-mole, tweaking
> constants when new packages encounter bugs, or adding more conditions
> as the Linux implementation is developed.  I'll continue to work on
> this (at an as yet undetermined pace) to hopefully make it
> upstreamable, but any help or feedback from the Hurd side would be
> appreciated to prevent me from doing something dumb.  In case anyone
> else does want to work on this before I get to it, I'd suggest
> prioritizing porting the libc crate--the sooner it has a release with
> Hurd support, the sooner every other project depending on a specific
> libc version will be able to update to build out of the box.
> 
> Thanks.
> 
> David
> 
> [1] 
> https://github.com/dm0-/gnuxc/blob/master/patches/rust-1.22.1-hurd-port.patch
> [2] https://github.com/dm0-/rust/commits/hurd
> [3] https://github.com/dm0-/gnuxc/blob/master/specs/gnuxc-rust.spec#L39
> [4] https://github.com/dm0-/gnuxc/blob/master/make.pkg.d/librsvg.mk#L8
> 



Rust support

2017-12-25 Thread David Michael
Hi,

I've been poking at cross-compiling Rust projects for Hurd on and off
for a couple of weeks, and I thought I'd upload what I have now for
comments.  A new snapshot of my silly Hurd distro is available at
https://github.com/dm0-/gnuxc updated with the Rust reimplementation
of librsvg, so there is an example user of this.

The distro commit contains a patch[1] against the current Rust release
(1.22.1) which can be used to build std libraries for Hurd with your
Linux-based system's existing rustc.  I've also pushed the patch
against master[2].  See the RPM spec file[3] for the commands to build
the std libraries and a target spec JSON file.

Since Rust doesn't have a default path, the environment variable
RUST_TARGET_PATH must be set to the directory containing the JSON spec
file.  With that and the rlib files installed to
/usr/lib/rustlib/i686-pc-gnu/lib, Rust projects can be built for Hurd
with "cargo --target=i686-pc-gnu build".  The command "rustc
--codegen=ar=i686-pc-gnu-gcc-ar --codegen=linker=i686-pc-gnu-gcc
--target=i686-pc-gnu" will directly compile Rust files without cargo.

Note that projects will likely depend on libc, which will need to be
patched with the same changes used to build std.  The librsvg
package[4] has an example of how to do this with vendored crates, but
other projects may require you to set up a local registry and patch it
there.

The current implementation reuses the Linux code with some additional
conditional blocks, but I think it may be better to start a new OS
port for Hurd.  Otherwise, it may turn into whack-a-mole, tweaking
constants when new packages encounter bugs, or adding more conditions
as the Linux implementation is developed.  I'll continue to work on
this (at an as yet undetermined pace) to hopefully make it
upstreamable, but any help or feedback from the Hurd side would be
appreciated to prevent me from doing something dumb.  In case anyone
else does want to work on this before I get to it, I'd suggest
prioritizing porting the libc crate--the sooner it has a release with
Hurd support, the sooner every other project depending on a specific
libc version will be able to update to build out of the box.

Thanks.

David

[1] 
https://github.com/dm0-/gnuxc/blob/master/patches/rust-1.22.1-hurd-port.patch
[2] https://github.com/dm0-/rust/commits/hurd
[3] https://github.com/dm0-/gnuxc/blob/master/specs/gnuxc-rust.spec#L39
[4] https://github.com/dm0-/gnuxc/blob/master/make.pkg.d/librsvg.mk#L8