gc-sections for wasm

Overview

wasm-gc

Note: you probably don't need to use this project. This project is no longer necessary to run by hand, nor do you need the wasm-gc executable installed.

For a longer explanation, these two points mean that wasm-gc is likely no longer a useful command to run for you:

  1. The Rust compiler now natively supports --gc-sections when linking wasm executables, which means wasm executables already have 90% of their garbage removed when coming out of the compiler.
  2. The wasm-pack (and wasm-bindgen) project will already run this by default for you, so there's no need to run it again.

Don't include this build! If you think you need to feel free to open an issue on wasm-pack or wasm-bindgen, as it may be a bug in one of those projects!

A small command to gc a wasm module and remove all unneeded exports, imports, functions, etc. This is effectively --gc-sections for arbitrary wasm executables. Not needed by Rust programs coming out of the Rust compiler, only provided here nowadays for learning purposes and to be used as a library if necessary.

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Comments
  • Use wasm-opt?

    Use wasm-opt?

    Another option in this space is Binaryen's wasm-opt tool, which has optimizations to remove unneeded code, doing something like

    wasm-opt input.wasm -Os -o output.wasm
    

    It also merges duplicate functions, reorders them to optimize the efficiency of wasm LEB encoding, etc., and other wasm-specific minification tricks. Might be worth making it easy to run it on rust wasm files.

    opened by kripken 8
  • Demangle symbols while processing the name section

    Demangle symbols while processing the name section

    From the wasm spec (name section and name encoding) symbol names are encoded in utf8 so they do not need to be mangled in the final artifact. In addition to being easier to read, the demangled symbols save a few additional bytes in the output.

    Per the spec the assigned names do not need to be unique, however as the default option the hash at the end of the symbol is left intact. A command line argument could be added to customize this behavior in the future.

    The primary reason for leaving the hash is that we are not certain the tool ecosystem will handle this in a consistent way. For instance, it would be confusing if wat2wasm adds a .3 suffix to the 4th copy of a function (0 indexed) while another tool adds .4 resulting in potential confusion.

    cc @alexcrichton @shepmaster

    opened by jtgeibel 7
  • Update README.md - add WSL instructions

    Update README.md - add WSL instructions

    References https://github.com/alexcrichton/wasm-gc/issues/5

    Still has an error 😭

    error: could not exec the linker cc: No such file or directory (os error 2) | = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/wasm_gc-220fb6710333d060.wasm_gc0.rcgu.o" "-o" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/wasm_gc-220fb6710333d060" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/wasm_gc-220fb6710333d060.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/cargo-install.YjjakbLYNBgO/release/deps" "-L" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/libenv_logger-00e3003c8ba14f89.rlib" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/libparity_wasm-353ddb98eb2b0520.rlib" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/libbyteorder-3088e227f96eed4c.rlib" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/liblog-b8bca32e3b1fbf3b.rlib" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/libparking_lot-983789a352d7dd79.rlib" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/libowning_ref-b0ac86dab5cfa5b4.rlib" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/libstable_deref_trait-33a4ea7853d971e7.rlib" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/libparking_lot_core-9f87afe6dffcdf4e.rlib" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/librand-4448adbdcf79d3b7.rlib" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/libsmallvec-41895afb1a75c272.rlib" "/tmp/cargo-install.YjjakbLYNBgO/release/deps/liblibc-a12f8fa54a53769e.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-cc8b303e3403a89b.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-7ea6f64ea02051fd.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-f1fba9b54042d271.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-46a427bcbb71fa34.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-afe41ccc67b2a14a.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-aac5870ffe4fa74c.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-6a8e7eff29b6cad2.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-a768e53a3f571290.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-016e6e96bb6127b9.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-f2b084cc7a7d8bb1.rlib" "-Wl,-Bdynamic" "-l" "util" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util"

    error: aborting due to previous error

    error: failed to compile wasm-gc v0.1.0 (https://github.com/alexcrichton/wasm-gc#6fe4e9de), intermediate artifacts can be found at /tmp/cargo-install.YjjakbLYNBgO

    Caused by: Could not compile wasm-gc.

    To learn more, run the command again with --verbose.

    opened by selfup 7
  • Edge case: Does not install correctly on WSL (Windows Subsystem for Linux)

    Edge case: Does not install correctly on WSL (Windows Subsystem for Linux)

    Command executed

    wasm-gc main.wasm builds/small-main.wasm --verbose

    Last step where the failure occurs (--verbose)

    Compiling wasm-gc v0.1.0 (https://github.com/alexcrichton/wasm-gc#6fe4e9de) Running rustc --crate-name wasm_gc /home/selfup/.cargo/git/checkouts/wasm-gc-d84f174ed78190a0/6fe4e9d/src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=220fb6710333d060 -C extra-filename=-220fb6710333d060 --out-dir /tmp/cargo-install.7Apv5JBDnXQf/release/deps -L dependency=/tmp/cargo-install.7Apv5JBDnXQf/release/deps --extern env_logger=/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libenv_logger-00e3003c8ba14f89.rlib --extern parity_wasm=/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libparity_wasm-353ddb98eb2b0520.rlib --extern log=/tmp/cargo-install.7Apv5JBDnXQf/release/deps/liblog-b8bca32e3b1fbf3b.rlib --cap-lints allow error: could not exec the linker cc: No such file or directory (os error 2) | = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/wasm_gc-220fb6710333d060.wasm_gc0.rcgu.o" "-o" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/wasm_gc-220fb6710333d060" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/wasm_gc-220fb6710333d060.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps" "-L" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libenv_logger-00e3003c8ba14f89.rlib" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libparity_wasm-353ddb98eb2b0520.rlib" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libbyteorder-3088e227f96eed4c.rlib" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/liblog-b8bca32e3b1fbf3b.rlib" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libparking_lot-983789a352d7dd79.rlib" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libowning_ref-b0ac86dab5cfa5b4.rlib" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libstable_deref_trait-33a4ea7853d971e7.rlib" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libparking_lot_core-9f87afe6dffcdf4e.rlib" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/librand-4448adbdcf79d3b7.rlib" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libsmallvec-41895afb1a75c272.rlib" "/tmp/cargo-install.7Apv5JBDnXQf/release/deps/liblibc-a12f8fa54a53769e.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-cc8b303e3403a89b.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-7ea6f64ea02051fd.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-f1fba9b54042d271.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-46a427bcbb71fa34.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-afe41ccc67b2a14a.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-aac5870ffe4fa74c.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-6a8e7eff29b6cad2.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-a768e53a3f571290.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-016e6e96bb6127b9.rlib" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-f2b084cc7a7d8bb1.rlib" "-Wl,-Bdynamic" "-l" "util" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util"

    error: aborting due to previous error

    error: failed to compile wasm-gc v0.1.0 (https://github.com/alexcrichton/wasm-gc#6fe4e9de), intermediate artifacts can be found at /tmp/cargo-install.7Apv5JBDnXQf

    Caused by: Could not compile wasm-gc.

    Caused by: process didn't exit successfully: rustc --crate-name wasm_gc /home/selfup/.cargo/git/checkouts/wasm-gc-d84f174ed78190a0/6fe4e9d/src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=220fb6710333d060 -C extra-filename=-220fb6710333d060 --out-dir /tmp/cargo-install.7Apv5JBDnXQf/release/deps -L dependency=/tmp/cargo-install.7Apv5JBDnXQf/release/deps --extern env_logger=/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libenv_logger-00e3003c8ba14f89.rlib --extern parity_wasm=/tmp/cargo-install.7Apv5JBDnXQf/release/deps/libparity_wasm-353ddb98eb2b0520.rlib --extern log=/tmp/cargo-install.7Apv5JBDnXQf/release/deps/liblog-b8bca32e3b1fbf3b.rlib --cap-lints allow (exit code: 101)


    Not really sure this needs to be worried about. Works fine on native Windows/Linux/macOS just not WSL. Maybe have a little warning? 😄

    opened by selfup 4
  • index out of bounds on simple example

    index out of bounds on simple example

    rust program

    #[no_mangle]
    pub fn add_one(x: i32) -> i32 {
        x + 1
    }
    
    fn main() {}
    

    compiled using wargo build from https://github.com/lord/wargo

    stacktrace

    RUST_BACKTRACE=1 wasm-gc example.wasm example.min.wasm
    
    thread 'main' panicked at 'index out of bounds: the len is 19 but the index is 25', /home/nathan/.cargo/git/checkouts/wasm-gc-d84f174ed78190a0/a9adc2d/wasm-gc/src/gc.rs:255:23
    stack backtrace:
       0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
                 at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
       1: std::sys_common::backtrace::_print
                 at /checkout/src/libstd/sys_common/backtrace.rs:69
       2: std::panicking::default_hook::{{closure}}
                 at /checkout/src/libstd/sys_common/backtrace.rs:58
                 at /checkout/src/libstd/panicking.rs:381
       3: std::panicking::default_hook
                 at /checkout/src/libstd/panicking.rs:397
       4: std::panicking::rust_panic_with_hook
                 at /checkout/src/libstd/panicking.rs:577
       5: std::panicking::begin_panic
                 at /checkout/src/libstd/panicking.rs:538
       6: std::panicking::begin_panic_fmt
                 at /checkout/src/libstd/panicking.rs:522
       7: rust_begin_unwind
                 at /checkout/src/libstd/panicking.rs:498
       8: core::panicking::panic_fmt
                 at /checkout/src/libcore/panicking.rs:71
       9: core::panicking::panic_bounds_check
                 at /checkout/src/libcore/panicking.rs:58
      10: wasm_gc::gc::LiveContext::add_global
      11: wasm_gc::gc::LiveContext::add_function
      12: wasm_gc::gc::LiveContext::add_function
      13: wasm_gc::gc::LiveContext::add_function
      14: wasm_gc::gc::LiveContext::add_function
      15: wasm_gc::gc::LiveContext::add_function
      16: wasm_gc::gc::LiveContext::add_function
      17: wasm_gc::gc::LiveContext::add_function
      18: wasm_gc::gc::garbage_collect
      19: wasm_gc::_gc_file
      20: wasm_gc::main
      21: __rust_maybe_catch_panic
                 at /checkout/src/libpanic_unwind/lib.rs:99
      22: std::rt::lang_start
                 at /checkout/src/libstd/panicking.rs:459
                 at /checkout/src/libstd/panic.rs:361
                 at /checkout/src/libstd/rt.rs:59
      23: __libc_start_main
      24: _start
    

    I can provide the wasm file, or anything else that might help reproduce this if needed, thanks.

    opened by fuchsnj 3
  • Crashes on wasm_import_memory modules

    Crashes on wasm_import_memory modules

    wasm-gc panics with no memory section when run on a module that has:

    #![feature(wasm_import_memory)]
    #![wasm_import_memory]
    

    Such a module imports memory as env.memory (eg (import "env" "memory" (memory $env.memory 17))) instead of exporting it (eg (memory $memory (export "memory") 17)). It manifests as an ImportEntry in import_sections: ImportEntry { module_str: "env", field_str: "memory", external: Memory(MemoryType(ResizableLimits { initial: 17, maximum: None })) }

    opened by Arnavion 3
  • Build error due to smallvec / libc failure?

    Build error due to smallvec / libc failure?

    This is a fairly strange error, but I am reporting it here because I don't know what the cause may be.

    I followed the instructions here but I can't get this repository to install correctly:

        Updating git repository `https://github.com/alexcrichton/wasm-gc`
      Installing wasm-gc v0.1.0 (https://github.com/alexcrichton/wasm-gc#e158766d)  
        Updating registry `https://github.com/rust-lang/crates.io-index`
     Downloading parity-wasm v0.15.4                                                
       Compiling libc v0.2.33                                                       
       Compiling log v0.3.8
       Compiling stable_deref_trait v1.0.0
       Compiling smallvec v0.4.4
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:163:35
        |
    163 |     pub fn fopen(filename: *const c_char,
        |                                   ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:164:31
        |
    164 |                  mode: *const c_char) -> *mut FILE;
        |                               ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:167:37
        |
    167 |     pub fn freopen(filename: *const c_char, mode: *const c_char,
        |                                     ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:167:58
        |
    167 |     pub fn freopen(filename: *const c_char, mode: *const c_char,
        |                                                          ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:171:36
        |
    171 |     pub fn remove(filename: *const c_char) -> c_int;
        |                                    ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:172:35
        |
    172 |     pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int;
        |                                   ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:172:59
        |
    172 |     pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int;
        |                                                           ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:175:33
        |
    175 |                    buffer: *mut c_char,
        |                                 ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:178:48
        |
    178 |     pub fn setbuf(stream: *mut FILE, buf: *mut c_char);
        |                                                ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:182:28
        |
    182 |     pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) -> *mut c_char;
        |                            ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:182:73
        |
    182 |     pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) -> *mut c_char;
        |                                                                         ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:186:28
        |
    186 |     pub fn fputs(s: *const c_char, stream: *mut FILE)-> c_int;
        |                            ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:187:27
        |
    187 |     pub fn puts(s: *const c_char) -> c_int;
        |                           ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_long` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:201:45
        |
    201 |     pub fn fseek(stream: *mut FILE, offset: c_long, whence: c_int) -> c_int;
        |                                             ^^^^^^ not found in this scope
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_long;
        |
    
    error[E0412]: cannot find type `c_long` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:202:40
        |
    202 |     pub fn ftell(stream: *mut FILE) -> c_long;
        |                                        ^^^^^^ not found in this scope
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_long;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:210:29
        |
    210 |     pub fn perror(s: *const c_char);
        |                             ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:211:27
        |
    211 |     pub fn atoi(s: *const c_char) -> c_int;
        |                           ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:214:29
        |
    214 |     pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double;
        |                             ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:214:53
        |
    214 |     pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double;
        |                                                     ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:215:29
        |
    215 |     pub fn strtol(s: *const c_char,
        |                             ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:216:35
        |
    216 |                   endp: *mut *mut c_char, base: c_int) -> c_long;
        |                                   ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_long` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:216:59
        |
    216 |                   endp: *mut *mut c_char, base: c_int) -> c_long;
        |                                                           ^^^^^^ not found in this scope
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_long;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:217:30
        |
    217 |     pub fn strtoul(s: *const c_char, endp: *mut *mut c_char,
        |                              ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:217:54
        |
    217 |     pub fn strtoul(s: *const c_char, endp: *mut *mut c_char,
        |                                                      ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_ulong` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:218:36
        |
    218 |                    base: c_int) -> c_ulong;
        |                                    ^^^^^^^ not found in this scope
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_ulong;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:229:29
        |
    229 |     pub fn system(s: *const c_char) -> c_int;
        |                             ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:230:29
        |
    230 |     pub fn getenv(s: *const c_char) -> *mut c_char;
        |                             ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:230:45
        |
    230 |     pub fn getenv(s: *const c_char) -> *mut c_char;
        |                                             ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:232:29
        |
    232 |     pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
        |                             ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:232:49
        |
    232 |     pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
        |                                                 ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:232:65
        |
    232 |     pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
        |                                                                 ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:233:30
        |
    233 |     pub fn strncpy(dst: *mut c_char, src: *const c_char, n: size_t)
        |                              ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:233:50
        |
    233 |     pub fn strncpy(dst: *mut c_char, src: *const c_char, n: size_t)
        |                                                  ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:234:28
        |
    234 |                    -> *mut c_char;
        |                            ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:235:27
        |
    235 |     pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
        |                           ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:235:46
        |
    235 |     pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
        |                                              ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:235:62
        |
    235 |     pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
        |                                                              ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:236:28
        |
    236 |     pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char;
        |                            ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:236:47
        |
    236 |     pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char;
        |                                               ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:236:74
        |
    236 |     pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char;
        |                                                                          ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:237:30
        |
    237 |     pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int;
        |                              ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:237:49
        |
    237 |     pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int;
        |                                                 ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:238:31
        |
    238 |     pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int;
        |                               ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:238:50
        |
    238 |     pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int;
        |                                                  ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:239:31
        |
    239 |     pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int;
        |                               ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:239:50
        |
    239 |     pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int;
        |                                                  ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:240:30
        |
    240 |     pub fn strchr(cs: *const c_char, c: c_int) -> *mut c_char;
        |                              ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:240:56
        |
    240 |     pub fn strchr(cs: *const c_char, c: c_int) -> *mut c_char;
        |                                                        ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:241:31
        |
    241 |     pub fn strrchr(cs: *const c_char, c: c_int) -> *mut c_char;
        |                               ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:241:57
        |
    241 |     pub fn strrchr(cs: *const c_char, c: c_int) -> *mut c_char;
        |                                                         ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:242:30
        |
    242 |     pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t;
        |                              ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:242:49
        |
    242 |     pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t;
        |                                                 ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:243:31
        |
    243 |     pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t;
        |                               ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:243:50
        |
    243 |     pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t;
        |                                                  ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:244:30
        |
    244 |     pub fn strdup(cs: *const c_char) -> *mut c_char;
        |                              ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:244:46
        |
    244 |     pub fn strdup(cs: *const c_char) -> *mut c_char;
        |                                              ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:245:31
        |
    245 |     pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char;
        |                               ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:245:50
        |
    245 |     pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char;
        |                                                  ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:245:66
        |
    245 |     pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char;
        |                                                                  ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:246:30
        |
    246 |     pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char;
        |                              ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:246:49
        |
    246 |     pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char;
        |                                                 ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:246:65
        |
    246 |     pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char;
        |                                                                 ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:247:30
        |
    247 |     pub fn strlen(cs: *const c_char) -> size_t;
        |                              ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:248:31
        |
    248 |     pub fn strnlen(cs: *const c_char, maxlen: size_t) -> size_t;
        |                               ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:251:39
        |
    251 |     pub fn strerror(n: c_int) -> *mut c_char;
        |                                       ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:252:27
        |
    252 |     pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
        |                           ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:252:45
        |
    252 |     pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
        |                                             ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:252:61
        |
    252 |     pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
        |                                                             ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:253:28
        |
    253 |     pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
        |                            ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:253:47
        |
    253 |     pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
        |                                               ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `wchar_t` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:254:31
        |
    254 |     pub fn wcslen(buf: *const wchar_t) -> size_t;
        |                               ^^^^^^^ not found in this scope
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:255:32
        |
    255 |     pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> ::size_t;
        |                                ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `wchar_t` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:255:52
        |
    255 |     pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> ::size_t;
        |                                                    ^^^^^^^ not found in this scope
    
    error[E0412]: cannot find type `c_char` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:269:27
        |
    269 |     pub fn atof(s: *const c_char) -> c_double;
        |                           ^^^^^^ did you mean `c_schar`?
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_char;
        |
    
    error[E0412]: cannot find type `c_long` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:270:20
        |
    270 |     pub fn labs(i: c_long) -> c_long;
        |                    ^^^^^^ not found in this scope
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_long;
        |
    
    error[E0412]: cannot find type `c_long` in this scope
       --> /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.33/src/lib.rs:270:31
        |
    270 |     pub fn labs(i: c_long) -> c_long;
        |                               ^^^^^^ not found in this scope
    help: possible candidate is found in another module, you can import it into scope
        |
    100 | use core::os::raw::c_long;
        |
    
    error: aborting due to 76 previous errors
    
       Compiling byteorder v1.1.0
    error: Could not compile `libc`.
    warning: build failed, waiting for other jobs to finish...
    error: failed to compile `wasm-gc v0.1.0 (https://github.com/alexcrichton/wasm-gc#e158766d)`, intermediate artifacts can be found at `/tmp/cargo-install.KFHYJSoMzoqt`
    
    Caused by:
      build failed
    

    I am not sure what caused this (libc failed to build?) or how I should fix this. Seems like module errors, but I don't know where they are coming from. So far I haven't been able to install wasm-gc.

    rustc 1.23.0-nightly (e97ba8328 2017-11-25)
    binary: rustc
    commit-hash: e97ba83287a6f0f85cc9cc7a51ab309487e17038
    commit-date: 2017-11-25
    host: x86_64-unknown-linux-gnu
    release: 1.23.0-nightly
    LLVM version: 4.0
    

    It may be that the error has nothing to do with this repo per se, but I don't know where to ask, sorry.

    opened by fschutt 3
  • wasm-gc fails to install

    wasm-gc fails to install

    I'm seeing this error when upgrading from 0.1.1 to 0.1.6:

    Updating registry `https://github.com/rust-lang/crates.io-index`
    Installing wasm-gc v0.1.6
    Compiling cfg-if v0.1.4                                                                                                                                                                                                         
    error: -O and -C opt-level both provided
    error: failed to compile 'wasm-gc v0.1.6'
    

    gcc:

    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/4.2.1
    Apple LLVM version 9.1.0 (clang-902.0.39.2)
    Target: x86_64-apple-darwin17.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    

    rustc

    1.28.0 (9634041f0 2018-07-30)
    

    Any ideas?

    opened by justinwilaby 2
  • Bump log from 0.4.1 to 0.4.3

    Bump log from 0.4.1 to 0.4.3

    Bumps log from 0.4.1 to 0.4.3.

    Release notes

    Sourced from log's releases.

    env_logger-0.4.3

    • Make log target configurable (#105, thanks dbrgn)

    env_logger-0.4.2

    No release notes provided.

    0.4.2

    No release notes provided.

    Changelog

    Sourced from log's changelog.

    [0.4.3] - 2018-06-29

    Improved

    • More code generation improvements.

    [0.4.2] - 2018-06-05

    Improved

    • Log invocations now generate less code.

    Fixed

    • Example Logger implementations now properly set the max log level.
    Commits
    • 98abd8f Bump log to 0.3.8 and env_logger to 0.4.3
    • cf501f6 Merge pull request #160 from opilar/bugfix/documentation-link
    • c7c232b Merge pull request #159 from opilar/feature/badges
    • 044e328 Merge pull request #158 from omh1280/crate_linkify
    • 85124a3 Merge pull request #157 from omh1280/loglevel_doc
    • 49c7889 Merge pull request #155 from omh1280/macro_docs
    • 29ffe46 Docs link to docs.rs
    • bdae692 Cargo.toml badges
    • 7251e30 Linkified the crate doc
    • 328fa85 LogLevel and LogLevelFilter doc improvements.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump cfg-if from 0.1.3 to 0.1.4

    Bump cfg-if from 0.1.3 to 0.1.4

    Bumps cfg-if from 0.1.3 to 0.1.4.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump getopts from 0.2.17 to 0.2.18

    Bump getopts from 0.2.17 to 0.2.18

    Bumps getopts from 0.2.17 to 0.2.18.

    Release notes

    Sourced from getopts's releases.

    0.2.18

    Key Changes

    • Adds a Matches::opt_get method that can convert a match to any T: FromStr. This should be useful for easily getting matched values as numbers
    • Fixes some long-standing issues around text alignment
    • Specifies a minimum version policy

    Changes to minimum Rust

    The minimum version of Rust required has been set at 1.18.0. We may change this in patch versions, but will always flag it in the release notes here.

    You can always check the .travis.yml file to see the current minimum supported version.

    New Dependencies

    • unicode-width for correctly splitting descriptions across multiple lines.

    Contributions

    Commits
    • a718feb Merge pull request #74 from rust-lang-nursery/cargo/0.2.18
    • 0300e1a prepare for 0.2.18 release
    • 768eccf Merge pull request #70 from prataprc/opt_get
    • 4976a82 Merge pull request #71 from prataprc/issue_7
    • 26ddb4c Include opt_get_default variant.
    • 14648ff implement opt_get() method call on Matches.
    • 27df9b2 more optimizations for issue #7.
    • 547e4d5 optimize parsing words in each_split_within(), issue #7.
    • 7e37bd7 for_each is not implemented until 1.21, issue #7.
    • 9973a6c move unicode-width from [dev-dependencies] to [dependencies] issue #7.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump wasm-bindgen from 0.2.21 to 0.2.23

    Bump wasm-bindgen from 0.2.21 to 0.2.23

    Bumps wasm-bindgen from 0.2.21 to 0.2.23.

    Changelog

    Sourced from wasm-bindgen's changelog.

    0.2.23

    Released 2018-09-26.

    Added

    • This is the first release of the web-sys crate!

    • Added support for unions of interfaces and non-interfaces in the WebIDL frontend.

    • Added a policy for inclusion of new ECMAScript features in js-sys: the feature must be in stage 4 or greater for us to support it.

    • Added some documentation about size profiling and optimization with wasm-bindgen to the guide.

    • Added the Clamped<T> type for generating JavaScript Uint8ClampedArrays.

    • CI is now running on beta! Can't wait for the rustc release trains to roll over, so we can run CI on stable too!

    • Added the js_sys::try_iter function, which checks arbitrary JS values for compliance with the JS iteration protocol, and if they are iterable, converts them into an iterator over the JS values that they yield.

    Changed

    • We now only generate null checks on methods on the JS side when in debug mode. For safety we will always null check on the Rust side, however.

    • Improved error messages when defining setters that don't start with set_ and don't use js_name = ....

    • Improved generated code for classes in a way that avoids an unnecessary allocation with static methods that return Self but are not the "main" constructor.

    • BREAKING: js_sys::Reflect APIs are all fallible now. This is because reflecting on Proxys whose trap handlers throw an exception can cause any of the reflection APIs to throw. Accordingly, js_sys has been bumped from 0.2.X to 0.3.X.

    Fixed

    • The method of ensuring that __wbindgen_malloc and __wbindgen_free are always emitted in the .wasm binary, regardless of seeming reachability is now zero-overhead.
    ... (truncated)
    Commits
    • e0f4793 changelog: Note that this is the first web-sys release
    • 4c766c5 Start web-sys at 0.3.0
    • f834a42 Bump to version 0.2.23 (and js-sys and wasm-bindgen-futures to 0.3.0)
    • 0ab03bb Merge pull request #888 from ctaggart/webpack-cli
    • 052b41b update to "webpack-cli": "^3.1.1"
    • ee0e4bc Merge pull request #887 from fitzgen/iterating-over-js-values
    • a920656 guide: Update untyped JS values section to handle fallibility of Reflect::* APIs
    • dfd0f53 guide: Add section about iterating over JS values
    • 7db28b4 js-sys: run rustfmt
    • f9cd329 js-sys: Add js_sys::try_iter for iterating over any JsValue
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will not automatically merge this PR because this dependency is pre-1.0.0.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies 
    opened by dependabot-preview[bot] 0
Owner
Alex Crichton
Alex Crichton
📦✨ your favorite rust -> wasm workflow tool!

?? ✨ wasm-pack Your favorite Rust → Wasm workflow tool! Docs | Contributing | Chat Built with ?? ?? by The Rust and WebAssembly Working Group About Th

Rust and WebAssembly 4.8k Jan 5, 2023
Facilitating high-level interactions between Wasm modules and JavaScript

wasm-bindgen Facilitating high-level interactions between Wasm modules and JavaScript. Guide | API Docs | Contributing | Chat Built with ?? ?? by The

Rust and WebAssembly 5.9k Jan 8, 2023
Gun port in rust & wasm

gun-rs-wasm Rust & WASM port of Gun. For a non-wasm version, check out gun-rs Example (source) Use npm install rusty-gun import { Node as Gun } from "

Martti Malmi 39 Dec 19, 2022
Install `wasm-pack` by downloading the executable

wasm-pack-action Install wasm-pack by downloading the executable (much faster than cargo install wasm-pack, seconds vs minutes). Usage - uses: jetli/w

Jet Li 33 Nov 23, 2022
`wasm-snip` replaces a WebAssembly function's body with an `unreachable`

wasm-snip wasm-snip replaces a Wasm function's body with an unreachable instruction. API Docs | Contributing | Chat Built with ?? ?? by The Rust and W

Rust and WebAssembly 177 Dec 28, 2022
List the symbols within a wasm file

wasm-nm List the symbols within a wasm file. Library Executable License Contributing Executable To install the wasm-nm executable, run $ cargo install

Nick Fitzgerald 38 Nov 6, 2022
Instrument and transform wasm modules.

wasm-instrument A Rust library containing a collection of wasm module instrumentations and transformations mainly useful for wasm based block chains a

Parity Technologies 31 Dec 16, 2022
Just a little game I made in a day to try out the WASM-4 fantasy console.

Dodgeball This is just a little game I made in a day to try out the WASM-4 fantasy console. Play it here. The palette is SODA-CAP by Cappuchi. License

Sander in 't Veld 1 Jan 15, 2022
WebAssembly (Wasm) interpreter.

Continuous Integration Test Coverage Documentation Crates.io wasmi- WebAssembly (Wasm) Interpreter wasmi was conceived as a component of parity-ethere

Parity Technologies 1k Jan 4, 2023
📝 A template for creating WASM + Typescript + Rust workflow libraries.

Create Rust + TypeScript libraries with ease! PR'S WELCOMED! ✨ Inspiration I wanted to create a WebAssembly/Rust library with additional JS features,

Shaoru Ian Huang 25 Dec 24, 2022
Parametric surfaces drawn using the Rust + WASM toolchain with WebGL, React, and TypeScript.

Parametric Surfaces in the Browser My.Movie.3.mp4 Wanted to experiment with WebGL using the Rust + WASM toolchain, with React and TypeScript to glue e

Benji Nguyen 45 Oct 21, 2022
Rust implementation of the Mina protocol, targeting Wasm and ARM architectures.

Mina-rs An implementation of Mina protocol in Rust, with focus on web and Wasm compatibility ** As you can probably tell this is a WIP! Don't use for

ChainSafe 157 Dec 12, 2022
A self-guided learning project that includes Rust + Wasm together

A self-guided learning project that includes Rust + Wasm together. Who knows, maybe Typescript and React joins too..

M.Yavuz Yagis 1 Feb 14, 2022
WASM-compiled built-in actors used by all Filecoin clients

Built-in Filecoin actors (v8) This repo contains the code for the on-chain built-in actors that power the Filecoin network starting from network versi

Filecoin 45 Jan 4, 2023
WASM bindings for React - enables you to write and use React components in Rust

This library enables you to write and use React components in Rust, which then can be exported to JS to be reused or rendered.

Yichuan Shen 55 Dec 24, 2022
Realtime audio processing / synthesis using Rust/WASM in the browser.

Rust Audio About This repo is my investigation into using Rust for creative audio coding on various platforms (e.g. desktop, web, etc.), but especiall

Austin Theriot 30 Jan 5, 2023
A faster experimental wasm-based tar implementation for browsers.

@bytedance/tar-wasm A faster* experimental wasm-based tar implementation for browsers. *50-160x faster, see benchmarks below. Usage Install npm instal

Bytedance Inc. 65 Dec 16, 2022
TSS of GG18 by WASM, for Confidential Transaction Generation and Signing

TSS WASM portable lightweight client application for threshold ECDSA (based on GG18), built on&for multi-party-ecdsa : Wasm HW friendly Dev yarn build

Eigen Labs 24 Dec 28, 2022
Lunatic based webserver embedding WASM. Supports scaling down to zero and up to infinity.

Frenezulo A WASM-embedding webserver build on top of submillisecond and lunatic. Build to serve as an entry point for microservices compiled to WASM.

Kai Jellinghaus 13 Oct 23, 2022