profile
viewpoint

ahomescu/phpy 4

PHP parser and source-to-source translator to Python

ahomescu/binutils-gdb 0

Unofficial mirror of sourceware binutils-gdb repository. Updated daily.

ahomescu/cargo-xbuild 0

Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc.

ahomescu/dune 0

Clone of Dune http://dune.scs.stanford.edu/

ahomescu/vmbuilder 0

vm builder scripts

rinon/icfp2017 0

Team Random Hackers MCTS AI for ICFP 2017

issue closedimmunant/c2rust

rust2c?

Hi, are there any plans for a complementary Rust2C utility?

closed time in 7 days

Mis012

issue commentimmunant/c2rust

rust2c?

Hi @Mis012, as a small team, we have to focus on where we think we can have the greatest impact. A Rust2C converter is not something we plan to write. Have you looked at https://github.com/thepowersgang/mrustc?

Mis012

comment created time in 7 days

issue openedimmunant/c2rust

rust2c?

Hi, are there any plans for a complementary Rust2C utility?

created time in 7 days

issue openedimmunant/c2rust

FTBFS on Linux (OpenSUSE/Tumbleweed)

The builds end with this:

   Compiling sequence_trie v0.3.6
error[E0433]: failed to resolve: maybe a missing crate `rustc_target`?
 --> c2rust-ast-builder/src/builder.rs:3:5
  |
3 | use rustc_target::spec::abi::{self, Abi};
  |     ^^^^^^^^^^^^ maybe a missing crate `rustc_target`?

error[E0432]: unresolved import `rustc`
 --> c2rust-ast-builder/src/builder.rs:2:5
  |
2 | use rustc::hir;
  |     ^^^^^ maybe a missing crate `rustc`?

error[E0433]: failed to resolve: use of undeclared type or module `abi`
  --> c2rust-ast-builder/src/builder.rs:71:9
   |
71 |         abi::lookup(self).expect(&format!("unrecognized string for Abi: {:?}", self))
   |         ^^^ use of undeclared type or module `abi`

error[E0412]: cannot find type `Abi` in this scope
  --> c2rust-ast-builder/src/builder.rs:69:15
   |
69 | impl<'a> Make<Abi> for &'a str {
   |               ^^^ not found in this scope

error[E0412]: cannot find type `Abi` in this scope
  --> c2rust-ast-builder/src/builder.rs:70:37
   |
70 |     fn make(self, _mk: &Builder) -> Abi {
   |                                     ^^^ not found in this scope

error[E0412]: cannot find type `Abi` in this scope
  --> c2rust-ast-builder/src/builder.rs:81:27
   |
81 | impl<'a> Make<Extern> for Abi {
   |                           ^^^ not found in this scope

   Compiling json v0.12.0
   Compiling strum v0.16.0
   Compiling fake-simd v0.1.2
   Compiling diff v0.1.12
   Compiling glob v0.2.11
   Compiling is-match v0.1.0
   Compiling strum v0.15.0
   Compiling open v1.3.2
error: aborting due to 6 previous errors

Some errors have detailed explanations: E0412, E0432, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `c2rust-ast-builder`.
warning: build failed, waiting for other jobs to finish...
error: build failed
c2rust@stitny (master *)$ 

Complete build log from building with llvm/clang 10 and running cargo +nightly-2019-12-05 build.

created time in 10 days

fork dtolnay/rustfmt

Format Rust code

fork in 14 days

pull request commentimmunant/c2rust

llvm 11 fixes

I don't think an extra ifdef is necessary, but it is of course your call!

Please advise. No ifdefs are necessary down to at least clang 6. I can add them if you'd prefer that.

kaspar030

comment created time in 16 days

Pull request review commentimmunant/c2rust

llvm 11 fixes

 static std::vector<const char *> augment_argv(int argc, const char *argv[]) {     SmallString<128> P("-extra-arg=-resource-dir=" CLANG_BIN_PATH);     llvm::sys::path::append(P, "..", Twine("lib") + CLANG_LIBDIR_SUFFIX,                             "clang", CLANG_VERSION_STRING);-    std::string resource_dir = P.str();+    std::string resource_dir = P.str().str();

I compiled this in a ubuntu bionic container with clang-6 and libclang-6:

root@71976200ca48:/src/c2rust# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
root@71976200ca48:/src/c2rust# clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
root@71976200ca48:/src/c2rust# cargo --version
cargo 1.41.0-nightly (626f0f40e 2019-12-03)
root@71976200ca48:/src/c2rust# rustc --version
rustc 1.41.0-nightly (6d77e45f0 2019-12-04)
root@71976200ca48:/src/c2rust# git describe  
0.1.0-3140-g8e7131e6

The test suite passed:

root@71976200ca48:/src/c2rust# python3 ./scripts/test_translator.py --debug ./tests
[...]
Test summary:                                                            
  unexpected failures: 0                                                 
  unexpected successes: 0                                                
  expected failures: 3                                                   
  successes: 108

I don't think an extra ifdef is necessary, but it is of course your call!

kaspar030

comment created time in 19 days

Pull request review commentimmunant/c2rust

llvm 11 fixes

 class TranslateConsumer : public clang::ASTConsumer {             } #else  // CLANG_VERSION_MAJOR >= 10             const FileID file = sourceMgr.getMainFileID();-            auto comments = Context.getRawCommentList().getCommentsInFile(file);+            auto comments = Context.Comments.getCommentsInFile(file);

New in clang 11 is the removal of the getter. The field is public since at least clang 6. Does that warrant an #ifdef?

kaspar030

comment created time in 19 days

pull request commentimmunant/c2rust

llvm 11 fixes

LGTM but we should test this on older LLVM versions.

kaspar030

comment created time in 20 days

pull request commentimmunant/c2rust

llvm 11 fixes

I've merged this into my integration branch (for-riot, which contains all my PRs), and it's still working fine with -10.

kaspar030

comment created time in 21 days

PR opened immunant/c2rust

llvm 11 fixes

My Arch Linux bumped me to clang/llvm 11 today, which broke c2rust compilation.

This PR contains the fixes I needed to make it compile:

  1. ASTContext::getRawCommentList() was removed. It was a getter for ASTContext::Comments, which is a public field. So there's a commit that directly accesses the field.

  2. SmallString::str() changed semantics slightly, causing it to not map to std::string. A double .str().str() goes through StringRef to std::string. LLVM 11 offers a direct std::string(X) operator, but to keep this compatible, I kept the double call.

I did not test this on clang/llvm < 11...

+2 -2

0 comment

1 changed file

pr created time in 21 days

PR opened immunant/c2rust

Update handlebars to 3.0

handlebars 3.0 provides better performance than 2.0

+22 -3

0 comment

2 changed files

pr created time in 22 days

fork dtolnay/svgbob

Convert your ascii diagram scribbles into happy little SVG

http://ivanceras.github.io/svgbob-editor/

fork in 24 days

fork dtolnay/asciitosvg

Create beautiful SVG renderings of ASCII diagrams.

https://github.com/asciitosvg/asciitosvg

fork in 24 days

fork dtolnay/mdBook

Create book from markdown files. Like Gitbook but implemented in Rust

fork in a month

push eventimmunant/immunant.github.io

Per Larsen

commit sha c90dbbd19170bffe95980d28d32f21a6877869cc

Update job post

view details

push time in a month

startedpushshift/api

started time in a month

startedgoogle/rerast

started time in a month

startedrust-fuzz/cargo-fuzz

started time in a month

fork dtolnay/astexplorer

A web tool to explore the ASTs generated by various parsers.

https://astexplorer.net/

fork in a month

MemberEvent

pull request commentimmunant/c2rust

asm-casts: Run on no_std

I was dumb and missed this crate in the publish. Should be good now @chrysn

chrysn

comment created time in a month

push eventimmunant/c2rust

Stephen Crane

commit sha 63848a29b44334f5688e3b440c84815d99425201

Update c2rust-asm-casts to 0.2.0 c2rust-asm-casts is now compatible with no_std

view details

push time in a month

push eventimmunant/c2rust

Stephen Crane

commit sha 5fafb8125d8922771720e22343dd42fd28f380ef

Update c2rust-asm-casts to 0.2.0 c2rust-asm-casts is now compatible with no_std

view details

push time in a month

created tagimmunant/c2rust

tag0.15.1

Migrate C code to Rust

created time in a month

pull request commentimmunant/c2rust

asm-casts: Run on no_std

I still see https://crates.io/crates/c2rust-asm-casts as being the 0.1.1 of last 2019-10-30, might something have gone wrong during the upload?

chrysn

comment created time in a month

pull request commentimmunant/c2rust

asm-casts: Run on no_std

@chrysn new version is published, sorry it took so long.

chrysn

comment created time in a month

startedrust-lang/team

started time in a month

fork dtolnay/highfive

Github hooks to provide an encouraging atmosphere for new contributors

fork in a month

more