No description
Find a file
2025-02-10 22:21:05 +09:00
src refactor: loosen dep compat & separate bin as feature 2025-02-10 22:21:05 +09:00
.gitignore init with cargo new 2025-01-29 01:55:23 +09:00
.gitlab-ci.yml Add CI 2025-02-07 09:10:04 +00:00
build.rs new: embed generation metadata (generator & xml) 2025-02-07 17:49:34 +09:00
Cargo.lock refactor: loosen dep compat & separate bin as feature 2025-02-10 22:21:05 +09:00
Cargo.toml refactor: loosen dep compat & separate bin as feature 2025-02-10 22:21:05 +09:00
CHANGELOG.md bump to v0.1.0 2025-02-07 19:48:18 +09:00
README-ja.md Prepare for release (Refine cli, writing docs) 2025-02-07 10:37:18 +00:00
README.md Prepare for release (Refine cli, writing docs) 2025-02-07 10:37:18 +00:00

Endcap SL Software RI Generator

日本語版

Generates register interface for mpsoc software from register map in xml format.

The XML and its schema definition are in L0 Muon Endcap/Endcap Sl CSR XML. The generated code is intended to be used in MPSoC Software, which provides definition of register traits (RegisterSpec) used in the generated code.

Usage

This project provides both binary and library crates. Binary crates can be used from shell, while library crates can be used in other programs.

Setting up building environment

This code is written in Rust, so you need to install rustup. You can use either officially provided curl script, or system package manager to install. You can check the installation by executing cargo in the terminal.

Note that cargo is available on lxplus, so you might be able to use that (it is not the latest version though).

Binary crate usage

Execute

cargo build --bins --release

to build. --release is optional(this is a compiler optimization config).

Execute the binary generated in target/release/, or run with cargo run -- <XML> <OUT>.

See the --help for more information.

Library crate usage

See the doc, which is available with

cargo doc --open

Development

See the doc with private items with

cargo doc --document-private-items --open

You can execute test, format and lint with:

$ cargo test # test
$ cargo fmt # format
$ cargo clippy # lint (run `rustup component add clippy` to install)

rust-analyzer

It is heavily recommended to use rust-analyzer in development. It is not only essential for displaying inferred types and completion, but also it can execute formatter and clippy.

About CI

In the CI, test for build, format and clippy run. Please format your code and check clippy before pushing.

About Rust

You can learn Rust with the following webpage.

Or in terminal, execute

rustup doc

It has a lot of links to helpful documents (personally, I appreciate "The Book", std library doc and "Rust By Example").