Hey all, With the latest release, Firefox is now running a non-trivial amount of Rust code under the hood. Mozilla would like to start using Rust everywhere, starting by replacing some of our developer tooling with best-of-breed equivalents written in Rust. The Mozilla build system currently relies on a tool written in Rust called sccache. This tool functions as a compiler cache backed by S3. Deve
Hey all! @ag_dubs and I have been working on a project, and today is its first release! simple-server is a very standard webserver implementation. In some ways, it's a continuation of chapter 20 of the book, in some ways, it's "hey how close can we make the API to nodejs's createServer. In Node: const http = require('http') const port = 3000 const requestHandler = (request, response) => { console.
So admittedly i'm spoiled by Visual Studio and the Rust plugin for it is fantastic but I would like to 'elegantly' make the program pause at the end before closing, similar to C/C++'s "Press any key to continue" which is provided by System('pause'). I know I could just ask for additional input at the end, but that seems a little clunky to me. Is there such a thing in Rust lang at the moment? The l
Hi, I am working on a little program that I would like to perform cleanup logic if the program is interrupted or otherwise killed (e.g. with Control+C). In a typical C program, I would use Unix signals to handle this. How would you do this in Rust? This is what I came up with, and it surprisingly works, but I get the feeling there might be pitfalls or a better way: extern "C" { fn signal(sig: u32,
I have implemented a struct to work like the union, but it seems that it does not work properly: https://github.com/FractalGlobal/ntru-rs/blob/develop/src/types.rs#L167 How can I improve that solution to work properly? Your struct is just a struct, it has two members laid out in sequence. If the C definition of the union has the two structure variants as provided in your code, they seem to be all
I need pass to linker args, i put in my ~/.cargo/config: [target.arm-unknown-linux-gnueabihf] linker = "arm-linux-gnueabihf-gcc -Xlinker -rpath=/usr/lib/arm-linux-gnueabihf" ``` i get error: ``` error: could not exec the linker `/home/chessnokov/arm-linux-gnueabihf-gcc -Xlinker -rpath=/usr/lib/arm-linux-gnueabihf`: No such file or directory ``` then try: [target.arm-unknown-linux-gnueabihf] linker
Hello, currently I try to compile against a c library which isn't in the standard folder so I need to set a -rpath-link however I didn't find anything in the docs, is there any way by setting it? You can specify arbitrary linker flags via: #[link_args = "..."] right in sources, but it's unfortunately gated and thus not for stable -C link-args="...", but that's command line for compiler, which Carg
The documentation for catch_panic says: It is currently undefined behavior to unwind from Rust code into foreign code but unfortunately that's exactly what I wanted to do. libjpeg expects its error handler callback to never return, so I make it panic on error via something like this: catch_panic(|| ffi::c_function(panicking_rust_callback)); It appears to work fine on x86_64. How big risk is it, if
While Travis CI has built-in rust support in their infrastructure, it only supports linux builds. I wanted some CI for windows builds of Rust, so I created some configuration and install scripts for AppVeyor. I thought some other folks might be interested in the scripts and configuration template, so I cleaned it up and documented it and put it up on GitHub. If anyone wants to get started using Ap
Is there a way to specify a function that is executed as soon as my library -- written in Rust -- gets loaded? Basically, I am looking for something like GCC's __attribute__((constructor)) (or DllMain on Windows, though I would be content with a Linux-specific solution). I need something like this because I am trying to implement a method of function hooking that is based on library injection. The
The FFI documentation has been really helpful, but I have a problem I haven't been able to figure out. I think probably what I don't know is how the C ecosystem works, but anyway - I have a custom library that I wrote in C which I want to link with my Rust code. I've written a compatible interface and tagged it #[link(name="foo", kind="static")]. I compiled the C code into a .o file. The .c, .h, &
https://github.com/AerialX/cargo-build So it's a bit rough (especially the std parts, I mutilated the library a little bit), but it works! A hosted example: http://bl.ocks.org/AerialX/1041460cb9dd5876658c Basically, a light Cargo wrapper is used to do all the heavy lifting. To get this all working, compile the cargo-build project with cargo (make sure to provide LLVM_PREFIX), then follow the instr
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く