294 Commits

Author SHA1 Message Date
Joseph Richey
cf2d81bfff Improve src/lib.rs cfgs (#119)
Right now for each of `util_libc` and `use_file` we have a list of
`target_os` configs to determine if we build the module.

This PR moves these mod declarations into the main `cfg_if` statement
(the one that selects which implementation we use). This way, the mod
statements are kept in-sync with the implementations that use them.

Also, I merged together `target_os` cfgs that have the same
implementation. The downside to this is that the targets are no longer
in alphabetical order.

Also, this is only being applied to `0.2` as the `0.1` cfgs still have
to keep `std` around.
2019-10-25 12:55:12 +00:00
Artyom Pavlov
d661aa7e1b
Prepare release v0.1.13 (#118) 2019-10-25 12:25:33 +00:00
Joe Richey
1f1f964e4a Merge branch 'master' into 0.2 2019-10-24 02:10:00 -07:00
Joseph Richey
81bd43e5d6
Fix typos and bad doc links. (#117) 2019-10-24 02:06:53 -07:00
Artyom Pavlov
9a385f1923
Add VxWorks support (#86) 2019-10-23 09:35:50 +00:00
nia
2fa1bbac80 Switch to using the arandom sysctl on NetBSD (same as FreeBSD). (#115)
Rename it from freebsd.rs to sysctl_arandom.rs.

NetBSD has been patching rustc for some time to use the FreeBSD
implementation because every single invocation of the compiler
may drain from the entropy pool and cause the next to block.

This can massively inflate build times for rust software, or cause
it to fail entirely, especially in VMs (for example, our Xen package
building cluster).
2019-10-23 09:03:44 +00:00
Joseph Richey
add45a3899 Remove dummy implementation (#107)
Removes the “dummy” feature and “wasm32-unknown-unknown” dummy impl
2019-10-15 23:40:05 -07:00
Joseph Richey
605736748a Only impl std traits if feature is specified (#106)
* Fix CI to allow for PRs against 0.2 to be run

* Only impl std traits if feature is specified

* Fix l4re
2019-10-15 23:40:05 -07:00
Diggory Hardy
6b4925a76d
Merge pull request #112 from dekellum/min-cfg-if
cfg-if 0.1.2 is minimal version of dependency
2019-10-01 08:43:28 +01:00
Diggory Hardy
7f013b15d8
Merge pull request #114 from josephlr/ci
Fix and Improve WASM CI
2019-10-01 08:39:45 +01:00
Joe Richey
04f65172f5 Remove jq dep 2019-09-30 16:20:13 -07:00
Joe Richey
93312bdca7 Fix CI
- Use latest Firefox
- Explicitly pin wasmtime and cargo-web
- Make sure our `wasm-bindgen-test-runner` and `wasm-bindgen` versions match
2019-09-30 15:45:23 -07:00
David Kellum
2052159fd1 cfg-if 0.1.2 needed as minimal version of dep 2019-09-30 14:06:16 -07:00
Diggory Hardy
6bd6e048ca
Merge pull request #111 from josephlr/fmt
Run Rustfmt
2019-09-23 20:48:10 +01:00
Joe Richey
3b6c90ca24 Run Rustfmt and make formatting error fail the CI 2019-09-23 10:21:23 -07:00
Joseph Richey
fa6f929aed
Improve CI for web targets (#108)
* Simplify CI process for WASM

Run WASI tests, and run both stdweb/wasm-bindgen on both node and in browsers

These changes also remove the need for a separate tests/wasm_bindgen

* Use all pre-built binaries in the CI

* Fix Cargo.toml typo

Co-Authored-By: Artyom Pavlov <newpavlov@gmail.com>

* Fix install location

* Debug CI
2019-09-21 01:46:26 -07:00
Elichai Turkel
ccc47748d0 Handle zero-length slices (#104)
Ensure and document that we do nothing when an empty slice is passed.

Note that this changes are for consistency, not to prevent UB.
2019-09-19 16:41:20 -07:00
Artyom Pavlov
5cfa668403
Prepare release v0.1.12 (#103) 2019-09-06 12:01:01 +00:00
Artyom Pavlov
31e5b2fdd6
Update wasi dependency (#100) 2019-08-31 14:32:18 +00:00
Artyom Pavlov
208b318ace
Prepare release v0.1.11 (#97) 2019-08-25 02:28:06 +00:00
Joseph Richey
4db1b14074
Fix Redox CI (#85)
* Fix Redox CI

* Bump libc version to fix Redox
2019-08-24 19:23:36 -07:00
Joseph Richey
8197a1824b Add back in std-only trait definitions (#96) 2019-08-24 23:00:44 +00:00
Artyom Pavlov
a9b7f92965
Prepare release v0.1.10 (#93) 2019-08-17 23:27:45 +00:00
eV (㋎)
f073a9575a Fix CSP error for wasm bindgen (#92) 2019-08-17 23:23:07 +00:00
Joseph Richey
73bbbdcf64
Always build on wasm32-unknown-unknown (#90)
This updates the documentation to explain exactly what we are doing on
this target. Also adds a test that the target builds without features.
2019-08-17 12:24:02 -07:00
Joseph Richey
3d1d2ff313 Wasi does not need libc (#88) 2019-08-15 00:10:22 +00:00
Artyom Pavlov
e266249f61
Prepare release v0.1.9 (#83) 2019-08-14 13:55:27 +00:00
Artyom Pavlov
bf54eaa557
Deny warnings in CI tests (#82) 2019-08-13 13:52:50 +00:00
Joseph Richey
f94b44aa86 Add warning checks (#80) 2019-08-12 13:10:21 +00:00
Artyom Pavlov
7449a087f2
Add dummy feature (#71) 2019-08-08 14:31:41 +00:00
Artyom Pavlov
283f9f8bad
Add Windows UWP support (#69) 2019-08-08 14:31:21 +00:00
Artyom Pavlov
86c2cd6265
Use wasi isntead of libc (#64) 2019-08-08 08:02:19 +00:00
Clayton Wilkinson
10e41b22d6 Updating link to Fuchsia documentation (#81) 2019-08-07 16:15:37 +00:00
Joseph Richey
98934cb4ab Add rustc-dep-of-std feature (#78) 2019-08-06 10:08:16 +00:00
Joseph Richey
b69f832210 Remove libstd dependancy for Opening and Reading files (#58) 2019-08-06 10:07:22 +00:00
Artyom Pavlov
199b11576e
prepare release v0.1.8 (#76) 2019-08-05 09:02:19 +00:00
Aaron Hill
6716ad06a5 Explicitly specify types to arguments of 'libc::syscall' (#74)
The 'libc::syscall' function uses varargs - as a result, its arguments
are completely untyped. THe user must ensure that it is called with the
proper types for the targeted syscall - otherwise, the calling
convention might cause arguments to be put into the wrong registers.

This commit explicitly casts the arguments to 'libc::syscall' to the
proper type for the 'getrandom' syscall. This ensures that the correct
types for the target platform will always be used, instead of relying on
the types used happening to match those required by the target platform.
2019-08-04 17:03:20 +00:00
Artyom Pavlov
ab44edf3c7
fix readme example 2019-08-03 18:27:11 +00:00
Artyom Pavlov
d93954a138
Prepare v0.1.7 release (#67) 2019-07-29 10:07:23 +00:00
Joseph Richey
dadef458ba Fix stdweb extern issue (#66) 2019-07-28 08:07:07 +00:00
Joseph Richey
00c3cff101 Improve Error handling (#54) 2019-07-27 01:51:54 +00:00
Joseph Richey
b3e609f8b5 Add support for hermit and l4re (#61) 2019-07-12 16:22:07 +00:00
Joseph Richey
9e0d7c7c68 Incorperate feedback on Lazy helpers (#60) 2019-07-11 20:21:45 +00:00
Joseph Richey
65660e00be Try getrandom() first on FreeBSD, add sys_fill_exact helper (#57) 2019-07-09 19:26:49 +00:00
Artyom Pavlov
1705b40655
replace mem::uninitialized with mem::zeroed 2019-07-09 18:28:51 +00:00
Syrus Akbary
0ada41a53a Updated link to the official WASI repo (#59) 2019-07-08 08:25:20 +00:00
Joseph Richey
ca33db9df2 Remove Bitrig support (#56) 2019-07-07 20:48:54 +00:00
Joseph Richey
479d036949 Use cfg-if to simplify lib.rs (#55) 2019-07-05 15:47:51 +00:00
Joseph Richey
0c72017424 Remove lazy_static dependancy (#52) 2019-07-04 15:29:48 +00:00
Joseph Richey
b1e81542f8 Add Structures for lock-free initialization (#51) 2019-07-02 12:27:19 +00:00