Compare commits
No commits in common. "03fe6a1843dfd25d94f1ff864eefb3d9a3c9f2ae" and "0bdb1096403b757e76ec8bf4d0d0cbb11727ba6c" have entirely different histories.
03fe6a1843
...
0bdb109640
|
@ -1,11 +0,0 @@
|
||||||
use wasm_bindgen::prelude::*;
|
|
||||||
|
|
||||||
#[wasm_bindgen]
|
|
||||||
extern {
|
|
||||||
pub fn alert(s: &str);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[wasm_bindgen]
|
|
||||||
pub fn greet(name: &str) {
|
|
||||||
alert(&format!("Hello, {}!", name));
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "nemu-base"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
authors = ["Antifallobst <antifallobst@systemausfall.org>", "Eric-Paul Ickhorn <atnx@protonmail.com>"]
|
|
||||||
description = "The base layer of NEMU"
|
|
||||||
license = "MIT"
|
|
||||||
repository = "https://git.nerdcult.net/nerdcult/nerdemu"
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
crate-type = ["cdylib"]
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
wasm-bindgen = "0.2"
|
|
|
@ -1,11 +0,0 @@
|
||||||
use wasm_bindgen::prelude::*;
|
|
||||||
|
|
||||||
#[wasm_bindgen]
|
|
||||||
extern {
|
|
||||||
pub fn alert(s: &str);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[wasm_bindgen]
|
|
||||||
pub fn greet(name: &str) {
|
|
||||||
alert(&format!("Hello, {}!", name));
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"name": "i8086",
|
|
||||||
"version": "0.0",
|
|
||||||
|
|
||||||
"architecture": "x86"
|
|
||||||
}
|
|
|
@ -1,12 +1,14 @@
|
||||||
[package]
|
[package]
|
||||||
name = "nemu-arch-x86"
|
name = "nemu"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Antifallobst <antifallobst@systemausfall.org>", "Eric-Paul Ickhorn <atnx@protonmail.com>"]
|
authors = ["Antifallobst <antifallobst@systemausfall.org>", "Eric-Paul Ickhorn <atnx@protonmail.com>"]
|
||||||
description = "The x86 implementation of NEMU"
|
description = "A small web emulator for simple architectures"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://git.nerdcult.net/nerdcult/nerdemu"
|
repository = "https://git.nerdcult.net/nerdcult/nerdemu"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
|
|
@ -1,14 +1,9 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
nemu_build() {
|
nemu_build() {
|
||||||
echo " --> Building nemu-base"
|
echo " --> Building NerdEMU"
|
||||||
wasm-pack build base --target web
|
wasm-pack build --target web
|
||||||
|
|
||||||
|
|
||||||
echo " --> Building nemu-arch-x86"
|
|
||||||
wasm-pack build architectures/x86 --target web
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nemu_run(){
|
nemu_run(){
|
|
@ -6,7 +6,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import init, { greet } from "./base/pkg/nemu_base.js";
|
import init, { greet } from "./pkg/nemu.js";
|
||||||
init().then(() => {
|
init().then(() => {
|
||||||
greet("NerdEMU");
|
greet("NerdEMU");
|
||||||
});
|
});
|
|
@ -0,0 +1,10 @@
|
||||||
|
// The NerdEMU - emulator | This software is protected under the MIT-license
|
||||||
|
// Copyright 2023: [The Original NerdEMU-Authors] as seen on:
|
||||||
|
// (nerdcult.net/projects/nerdemu/ OR git.nerdcult.net/nerdcult/nerdemu)
|
||||||
|
|
||||||
|
// x86/src/i8086.rs: The emulation code for the i8086 - microprocessor
|
||||||
|
// and a basic mainbus which connects it to the memory and other simple
|
||||||
|
// devices.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
// The NerdEMU - emulator | This software is protected under the MIT-license
|
||||||
|
// Copyright 2023: [The Original NerdEMU-Authors] as seen on:
|
||||||
|
// (nerdcult.net/projects/nerdemu/ OR git.nerdcult.net/nerdcult/nerdemu)
|
||||||
|
|
||||||
|
use wasm_bindgen::prelude::*;
|
||||||
|
|
||||||
|
#[wasm_bindgen]
|
||||||
|
extern {
|
||||||
|
pub fn alert(s: &str);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[wasm_bindgen]
|
||||||
|
pub fn greet(name: &str) {
|
||||||
|
alert(&format!("Hello, {}!", name));
|
||||||
|
}
|
||||||
|
|
Reference in New Issue