Coder Social home page Coder Social logo

rust-nostd's Introduction

Building this application in release mode (cargo build --release) will generate a tiny (5k) executable on Windows. It demonstrates using no_std mode while still using an allocator and a Vec.

rust-nostd's People

Contributors

sagacity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

amrali

rust-nostd's Issues

Doesn't work in 32-bit: fatal error LNK1561: entry point must be defined

D:\3rdparty\rust-nostd [master ≡]> cargo build --release --target=i686-pc-windows-msvc
←[m←[m←[32m←[1m   Compiling←[m rlibc v1.0.0
←[m←[m←[32m←[1m   Compiling←[m memory_units v0.4.0
←[m←[m←[32m←[1m   Compiling←[m winapi v0.3.4
←[m←[m←[32m←[1m   Compiling←[m wee_alloc v0.2.0
←[m←[m←[32m←[1m   Compiling←[m nostd v0.1.0 (file:///D:/3rdparty/rust-nostd)
error: linking with `D:\Program Files\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\link.exe` failed: exit code: 1561
  |
  = note: "D:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64_x86\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LARGEA
DDRESSAWARE" "/SAFESEH" "/LIBPATH:D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustli
b\\i686-pc-windows-msvc\\lib" "D:\\3rdparty\\rust-nostd\\target\\i686-pc-windows-msvc\\release\\deps\\nostd-b7389f13b4f1
87b5.nostd0.rcgu.o" "/OUT:D:\\3rdparty\\rust-nostd\\target\\i686-pc-windows-msvc\\release\\deps\\nostd-b7389f13b4f187b5.
exe" "/OPT:REF,ICF" "/DEBUG" "/NATVIS:D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\ru
stlib\\etc\\intrinsic.natvis" "/NATVIS:D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\r
ustlib\\etc\\liballoc.natvis" "/NATVIS:D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\r
ustlib\\etc\\libcore.natvis" "/LIBPATH:D:\\3rdparty\\rust-nostd\\target\\i686-pc-windows-msvc\\release\\deps" "/LIBPATH:
D:\\3rdparty\\rust-nostd\\target\\release\\deps" "/LIBPATH:D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-
windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib" "D:\\3rdparty\\rust-nostd\\target\\i686-pc-windows-msvc\\release\
\deps\\librlibc-11e0d241aa201add.rlib" "advapi32.lib" "synchronization.lib" "kernel32.lib" "setupapi.lib" "user32.lib"
  = note: LINK : fatal error LNK1561: entry point must be defined


error: aborting due to previous error

←[m←[m←[31m←[1merror:←[m Could not compile `nostd`.

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

Why is the exe 26kb instead of 5kb like it says in the Readme?

Why is the exe 26kb instead of 5kb like it says in the Readme?

D:\3rdparty\rust-nostd [master ≡]> cargo build --release
←[m←[m←[32m←[1m    Updating←[m registry `https://github.com/rust-lang/crates.io-index`
←[m←[m←[32m←[1m   Compiling←[m rlibc v1.0.0
←[m←[m←[32m←[1m   Compiling←[m memory_units v0.4.0
←[m←[m←[32m←[1m   Compiling←[m winapi v0.3.4
←[m←[m←[32m←[1m   Compiling←[m wee_alloc v0.2.0
←[m←[m←[32m←[1m   Compiling←[m nostd v0.1.0 (file:///D:/3rdparty/rust-nostd)
←[m←[m←[32m←[1m    Finished←[m release [optimized] target(s) in 4.90 secs
D:\3rdparty\rust-nostd [master ≡]> dir .\target\release


    Directory: D:\3rdparty\rust-nostd\target\release


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        2018-04-09     06:45            .fingerprint
d----        2018-04-09     06:45            build
d----        2018-04-09     06:45            deps
d----        2018-04-09     06:45            examples
d----        2018-04-09     06:45            incremental
d----        2018-04-09     06:45            native
-a---        2018-04-09     06:45          0 .cargo-lock
-a---        2018-04-09     06:45         84 nostd.d
-a---        2018-04-09     06:45      26624 nostd.exe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.