Skip to content

Commit 02d5dc4

Browse files
committed
chore!: rename to CreatorAssembler
1 parent 55cb944 commit 02d5dc4

11 files changed

Lines changed: 36 additions & 36 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
2-
name = "creator-compiler"
2+
name = "creator-assembler"
33
version = "2.0.0"
44
edition = "2021"
55
license = "LGPL-2.1-or-later"
6-
description = "A reimplementation of Creator (https://creatorsim.github.io/)'s compiler"
6+
description = "A reimplementation of Creator (https://creatorsim.github.io/)'s assembler"
77
categories = ["command-line-utilities", "compilers"]
88
keywords = ["compiler", "assembly", "assembler", "Creator"]
99
rust-version = "1.89"
@@ -17,7 +17,7 @@ crate-type = [
1717
]
1818

1919
[[bin]]
20-
name = "creator-compiler"
20+
name = "creator-assembler"
2121
required-features = ["cli"]
2222

2323
[features]

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Creator Compiler
1+
# CREATOR Assembler
22

3-
Reimplementation of the compiler used by [Creator](https://creatorsim.github.io/)
3+
Reimplementation of the assembler used by [CREATOR](https://creatorsim.github.io/)
44
to have better performance, more helpful error messages, and a more correct output.
55

66
## Building
@@ -11,20 +11,20 @@ The only requirement is the rust toolchain, which can be installed through [`rus
1111

1212
### Running locally (CLI)
1313

14-
The compiler can be built from source using `cargo build --release`, which will
15-
place the binary in `./target/release/creator-compiler`. The `--release` flag can
14+
The assembler can be built from source using `cargo build --release`, which will
15+
place the binary in `./target/release/creator-assembler`. The `--release` flag can
1616
be omitted to generate debug binaries. Additionally, `cargo run --release -- [<ARGS>]`
1717
can be used as a shortcut to build and run the binary. Running the application
1818
without arguments provides a short description of the application and subcommands,
19-
and using `creator-compiler help <command>` provides a description and usage
19+
and using `creator-assembler help <command>` provides a description and usage
2020
instructions for each command.
2121

22-
The compiler currently supports 3 modes of execution:
22+
The assembler currently supports 3 modes of execution:
2323

24-
- Print architecture specification schema to `stdout`: `creator-compiler schema`
25-
- Validate architecture specification file: `creator-compiler validate <architecture.json>`
24+
- Print architecture specification schema to `stdout`: `creator-assembler schema`
25+
- Validate architecture specification file: `creator-assembler validate <architecture.json>`
2626
- Compile assembly input and print the result to `stdout`:
27-
`creator-compiler compile <architecture.json> <assembly.s>`
27+
`creator-assembler compile <architecture.json> <assembly.s>`
2828
- The `-v`/`--verbose` flag can be used to also print the parsed AST
2929

3030
### JS Bindings
@@ -46,4 +46,4 @@ use the generated package, both for the web and Node.js:
4646
which allows loading the page at `localhost:8080/js_example`.
4747
- `web.js`: main module for the web example, shows how to load the package in the web
4848
- `node.js`: main module for the Node.js example, shows how to load the package in Node.js
49-
- `compiler.mjs`: module responsible for interaction with the package, shows how to use the provided API
49+
- `assembler.mjs`: module responsible for interaction with the package, shows how to use the provided API

benches/benchmark.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use std::collections::HashMap;
66
use std::hint::black_box;
77
use std::time::Duration;
88

9-
use creator_compiler::parser::AST;
10-
use creator_compiler::prelude::*;
9+
use creator_assembler::parser::AST;
10+
use creator_assembler::prelude::*;
1111

1212
static ARCH_JSON: &str = include_str!("arch.json");
1313
static CODE: &str = include_str!("sample.s");

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function BuildFull() {
3232

3333

3434
function Help() {
35-
printf "Builds the compiler for usage in WebAssembly
35+
printf "Builds the assembler for usage in WebAssembly
3636
3737
Usage: \`./build.sh <command>\`
3838
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
**/
77

88
/**
9-
* @param {import("../pkg/web/creator_compiler.d.ts")} wasm
9+
* @param {import("../pkg/web/creator_assembler.d.ts")} wasm
1010
* @param {string} json_arch
11-
* @returns {import("../pkg/web/creator_compiler.d.ts").ArchitectureJS}
11+
* @returns {import("../pkg/web/creator_assembler.d.ts").ArchitectureJS}
1212
**/
1313
export function load(wasm, json_arch) {
1414
const arch = wasm.ArchitectureJS.from_json(json_arch);
1515
return arch
1616
}
1717

1818
/**
19-
* @param {import("../pkg/web/creator_compiler.d.ts")} wasm
20-
* @param {import("../pkg/web/creator_compiler.d.ts").DataCategoryJS} category
19+
* @param {import("../pkg/web/creator_assembler.d.ts")} wasm
20+
* @param {import("../pkg/web/creator_assembler.d.ts").DataCategoryJS} category
2121
* @returns {string}
2222
**/
2323
function data_category(wasm, category) {
@@ -30,8 +30,8 @@ function data_category(wasm, category) {
3030
}
3131

3232
/**
33-
* @param {import("../pkg/web/creator_compiler.d.ts")} wasm
34-
* @param {import("../pkg/web/creator_compiler.d.ts").ArchitectureJS} arch
33+
* @param {import("../pkg/web/creator_assembler.d.ts")} wasm
34+
* @param {import("../pkg/web/creator_assembler.d.ts").ArchitectureJS} arch
3535
* @param {string} code
3636
* @returns {CompilationResult}
3737
**/

js_example/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<title>Creator Compiler JS Example</title>
5+
<title>CREATOR Assembler JS Example</title>
66
</head>
77
<body>
88
<noscript>This page contains webassembly and javascript content, please enable javascript in your browser.</noscript>

js_example/node.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const fs = require("fs");
2-
const wasm = require('../pkg/nodejs/creator_compiler.js');
3-
/**@type {import("./compiler.mjs")} compiler */
4-
import("./compiler.mjs").then(compiler => {
2+
const wasm = require('../pkg/nodejs/creator_assembler.js');
3+
/**@type {import("./assembler.mjs")} assembler */
4+
import("./assembler.mjs").then(assembler => {
55
const json_arch = fs.readFileSync(__dirname + "/../tests/architecture.json", "utf8")
66

7-
const arch = compiler.load(wasm, json_arch)
7+
const arch = assembler.load(wasm, json_arch)
88
const src = fs.readFileSync(process.argv[2], "utf8")
99

1010
try {
11-
const compiled = compiler.compile(wasm, arch, src);
11+
const compiled = assembler.compile(wasm, arch, src);
1212
console.log(compiled.msg);
1313
console.log(compiled.instructions);
1414
console.log(compiled.data);

js_example/web.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import init, * as wasm from "../pkg/web/creator_compiler.js";
2-
import * as compiler from "./compiler.mjs";
1+
import init, * as wasm from "../pkg/web/creator_assembler.js";
2+
import * as assembler from "./assembler.mjs";
33

44
await init({})
55

66
const json_arch = await (await fetch("../tests/architecture.json")).text()
77

8-
const arch = compiler.load(wasm, json_arch)
8+
const arch = assembler.load(wasm, json_arch)
99
console.log(arch.toString())
1010
window["arch"] = arch
1111

@@ -14,7 +14,7 @@ const out = document.getElementById("result");
1414

1515
document.getElementById("compile_btn").onclick = function () {
1616
try {
17-
const compiled = compiler.compile(wasm, arch, src.value);
17+
const compiled = assembler.compile(wasm, arch, src.value);
1818
window["instructions"] = compiled.instructions
1919
window["data"] = compiled.data
2020
window["instructions"] = compiled.label_table

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
#![doc = include_str!("../README.md")]
2222
//! # Example
2323
//!
24-
//! Example usage of the compiler from Rust:
24+
//! Example usage of the assembler from Rust:
2525
//!
2626
//! ```
27-
//! use creator_compiler::prelude::*;
27+
//! use creator_assembler::prelude::*;
2828
//! use std::collections::HashMap;
2929
//!
3030
//! let arch_json = include_str!("../tests/architecture.json");

0 commit comments

Comments
 (0)