Skip to content

opensourceworks-org/xsd-convert

Repository files navigation

<xsd ⚡> xsd-convert

running at https://xsd-convert.com

Introduction

🏃 this is a running example of the <yaxp ⚡> Yet Another XSD Parser project
<xsd ⚡> convert

Takes in an xsd schema and tranforms to arrow, avro, duckdb, json, json representation of spark schema, jsonschema, polars. WIP: pandas and protobuf.

📌 Note: Because it's a client side application, it runs completely locally. No data is sent to any server, nor is anything logged.

Written in rust with leptos.
Compiled to webassembly using trunk.
Served behind openresty.
Running on raspberry pi.

Running locally

You'll need a few things to get going. And an additional step if you're on Apple Silicon.

  1. rust

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. trunk

    cargo install --locked trunk
  3. wasm toolchain

    rustup target add wasm32-unknown-unknown
  4. Apple Silicon: llvm (not xcode)

    brew install llvm

    Then add the following to your shell profile:

    (verify the path with brew info llvm)

    export PATH=/opt/homebrew/opt/llvm/bin:$PATH
  5. Run the thing

    trunk serve

    Then open your browser to http://localhost:3000 (see the Trunk.toml file to modify and more options).

    You can also use the --open flag to open the browser automatically.

    trunk serve --open
    

Building for production

  1. Build the thing

    trunk build --release

TODO

  • Input from file
  • Copy to clipboard icon
  • pandas and protobuf
  • Syntax highlighting
  • Input validation
  • Save output to file
  • timestamp overrides for timezone/unit (ms, µs, ns)
  • option to lowercase column names