Commit graph

49 commits

Author SHA1 Message Date
Дмитрий Ценеков
b91ad42fe2 Add --zstd flag and use 19 lvl compression 2025-11-26 08:08:39 -06:00
Дмитрий Ценеков
bd493da2dc Add zstd compression support at tools 2025-11-26 08:08:39 -06:00
Fabian
afb30c608e add tools/split-image.py 2025-08-25 15:03:49 -06:00
Fabian
8feebbb5cb generate iso files on demand 2025-06-11 19:44:11 +07:00
Fabian
121a5170f2 minor refactoring (remove readfile, use direct import for libv86.js) 2025-04-16 09:26:13 -07:00
Fabian
51bd604cc5 remove "use strict" (is default in es6 modules) 2025-04-16 09:26:13 -07:00
Rob Blanckaert
a9219613af Switch to es6 modules. 2025-04-06 08:53:49 -07:00
SuperMaxusa
430c60b0ad fix opening folder in fs2json and copy-to-sha256 on Windows, small fix in fs2json help message 2025-03-09 21:39:04 -07:00
SuperMaxusa
1f3a3cec69 alpine: added virtio-net support 2025-01-02 12:04:09 -07:00
SuperMaxusa
ee8129b3cb alpine: edit readme
(see b7d4635638)
2025-01-02 12:04:09 -07:00
SuperMaxusa
a347ff4b24 alpine: update to 3.21 2025-01-02 12:04:09 -07:00
Fabian
23411f337e use emulator.destroy() over emulator.stop() to properly remove v86 instances
emulator.stop sometimes works (when the GC can figure out that .start()
is unreachable and nothing can call into the instance). However, some
resources, such as any WebSocket connection, need to be closed manually.
2024-12-20 10:41:09 -07:00
Fabian
6e4f6754b6 enable screen dummy by default
There is essentially no overhead to this, and it allows some further
simplifications
2024-09-15 16:31:48 -06:00
Rob Blanckaert
25570458b5 Switch include style 2024-08-21 05:48:27 -06:00
Rob Blanckaert
858f24537f Split out fake networking from fetch logic
Splits out the ethernet / tcp emulation logic
from the fetch networking adapter for reuse
in wisp.
2024-08-21 05:48:27 -06:00
Rob Blanckaert
92c936d632
network: Fetch based browser networking (#1061)
Emulate a networking stack, intercept HTTP requests, serve
them with fetch().  Enable by setting networking_proxy=fetch

Somewhat fixes #198

Just enough networking for http to work for package managers and
net-boot. The networking stack just reflects the macaddress of
packets it receives, so shouldnt be bothered by mac address
changes. Services include:

- ARP replies by establishing the gateways IP
- DHCP server sending gateway, dns, and client-ip
  - Gateway: 192.168.86.1
  - Client: 192.168.86.100
  - Netmask: 255.255.255.0
- UDP DNS server, all addresses resolve to: 192.168.87.1
- NTP Server, giving out the current time from Date()
- Replies to ICMP pings to any IP address
- UDP echo server on port 8

Limitations:
- Request are limited by CORS rules, but CORS-proxies can work around
  this.
- Redirects are handled transparently by fetch. The upside is sites that
  force an http->https upgrade appear to the VM to work over http.

Future Work:
- Allow HTTP requests from browser to be served by VM.
- HTTPS support (maybe with help of a rust based TLS stack in WASM)
- Support for POSTing binary data

* Run devices tests in CI
* Allow multiple Ne2k adapters

Co-authored-by: Fabian <copy@copy.sh>
2024-07-24 16:22:53 +02:00
Fabian
037afdc3d9 alpine: add script to automatically build state image using nodejs 2024-05-26 17:47:16 +09:00
Fabian
484ce7db64 alpine: update to 3.20 and simplify readme 2024-05-26 17:09:58 +09:00
Fabian
2e5b6e100c remove debian image build scripts
The alpine scripts are much simpler, don't need root and alpine runs
better in v86
2024-05-26 17:08:40 +09:00
Fabian
7e56111429 improve alpine build process
fix for podman
add nodejs with hello world as example package
add missing modules=virtio_pci to fix boot process
2024-05-26 17:02:53 +09:00
SuperMaxusa
2f24859bce added dockerfile and changed build-container.sh
(from tools/docker/debian)
2024-03-13 13:36:56 -06:00
SuperMaxusa
b404f9647c added readme for alpine linux 9p rootfs 2024-03-13 13:36:56 -06:00
SuperMaxusa
21cf9ad75c
Update Dockerfile for building (#988)
Update Readme.md (about building using Docker)
2024-02-04 23:35:51 +01:00
Robert Aboukhalil
4928c9165d
(breaking change) replace *-output-char with *-output-byte (#928) 2023-09-21 05:30:35 +02:00
Christian G. Warden
bbac74d589
Fix Locale Configuration In Debian Dockerfile (#850) 2023-05-06 09:10:38 +02:00
Fabian
27e83d6b0e support rust installed without rustup 2022-09-14 00:32:19 +09:00
Fabian
d4831d3b10 Remove some unncessary quoting 2022-08-02 21:40:57 +09:00
Nitin Tejuja
0615be5d60
Fixed issue #632 async/await (#633)
Co-authored-by: Fabian <copy@copy.sh>
2022-07-25 14:55:07 +02:00
Николай Шангин
558e0f9d7c
Improve Debian build info (#696) 2022-06-24 10:30:27 +02:00
Fabian
0247e75674 Fix fs2json.py and copy-to-sha256.py for the new shorter hash 2021-12-10 17:03:25 -05:00
Ryo Ota
51105a6700 Fix debian build 2021-09-23 19:35:10 +02:00
Progyan Bhattacharya
9679e2c00a
(feat) Docker: Add Support for Running inside Docker Container (#501)
* (feat) Docker: Add Support for Running inside Docker Container

Uses Alpine image as base to have minimal size. 2-step build process to get rid of source and library files after compilation and during runtime. Uses Python3 HTTP Server to serve static assets.

Signed-off-by: Progyan Bhattacharya <bprogyan@gmail.com>
2021-07-24 15:07:14 +02:00
Fabian
4f6acde821 update test image dockerfile 2021-07-07 18:31:40 -05:00
Aidan Hobson Sayers
34339fe8d8 Update the Dockerfile with latest requirements 2021-07-07 16:48:00 -05:00
ParkerTomatoes
b11c54cd5a detect host triplet when finding rust-lld 2021-05-04 17:26:05 -05:00
Mikhail B
3791d63ffd workaround to support i686 + clang 5.0+
clang version 5.0.0 (http://root.cern.ch/git/clang.git 354b25b5d915ff3b1946479ad07f3f2768ea1621) (http://root.cern.ch/git/llvm.git 9c749361ba8c2d400b83d8cc5c544287465b7489)
Target: i686-pc-linux-gnu
Thread model: posix

rustup 1.23.1 (3df2264a9 2020-11-30)

rustc 1.53.0-nightly (d0695c908 2021-04-12)
2021-04-13 09:47:17 -05:00
Fabian
2e551c0574 Move docker/ into tools/ 2020-12-31 19:14:34 -06:00
Fabian
6298da7d34 Remove indirect function table patching 2020-12-31 19:14:30 -06:00
Fabian
acb8ad5423 Avoid console.assert (doesn't throw) 2020-12-31 19:14:30 -06:00
Fabian
caa08e8d4e copy-to-sha256: Log name 2020-12-31 19:14:29 -06:00
Fabian
17cca458fa Print stdout/stderr before failing 2020-12-31 19:14:29 -06:00
Fabian
02f657b836 tools: Force python 3 2020-08-30 19:37:15 -05:00
Fabian
fa540e6e86 fs2json: Handle tar files that don't report file type in mode bits 2020-08-30 19:37:15 -05:00
Fabian
68c59d10a5 copy-to-sha256 and fs2json: Support for tar files, refactor debian-full script to not require root 2020-08-30 19:37:14 -05:00
Fabian
2ee68c960a Make --strip-debug configurable (for release builds) 2020-08-30 19:29:54 -05:00
Amaan Cheval
80e339d54c rust-lld-wrapper: Remove export-table to prevent conflict
Without this patch, the following error is thrown:
  rust-lld: error: --import-table and --export-table may not be used together

Tested on the following nightly versions:

rustc 1.30.0-nightly (7e8ca9f8b 2018-08-03)
rustc 1.30.0-nightly (33b923fd4 2018-08-18)
2020-08-30 19:29:54 -05:00
Fabian
e8eb5b9b45 Restore debug info 2020-08-30 19:29:53 -05:00
Fabian
01061dc4b6 The final Rust porting
This commit contains the final changes requires for porting all C code
to Rust and from emscripten to llvm:

- tools/wasm-patch-indirect-function-table.js: A script that rewrites
  the wasm generated by llvm to remove the table limit
- tools/rust-lld-wrapper: A wrapper around rust-lld that removes
  arguments forced by rustc that break compilation for us
- src/rust/cpu2/Makefile: A monstrosity to postprocess c2rust's output
- gen/generate_interpreter.js: Ported to produce Rust instead of C
- src/rust/*: A few functions and macros to connect the old Rust code
  and the new Rust code
- src/*.js: Removes the loading of the old emscripten wasm module and
  adapts imports and exports from emscripten to llvm
2020-08-30 19:29:53 -05:00
Fabian
8da18d339e Add tools to build v86 images from docker container 2020-08-30 19:29:53 -05:00