Giter Club home page Giter Club logo

toml-edit-labview's Introduction

toml-edit-labview

A LabVIEW wrapper around the Rust toml_edit library (built into a DLL).

Rust LabVIEW Version

At present, there are 32-bit and 64-bit Windows DLLs in the lv_src folder that are kept up-to-date. So, you should be able to clone the git repo and run the code in LabVIEW 2020 or greater on Windows. On Mac or Linux, you can download the latest shared libraries from the Releases or the Actions artifacts. There's no VI Package yet, but that will happen in time.

Current Status --> Alpha / Experimental

There's a lot that's in flux and/or not currently working:

  • The shared library runs in the user interface thread (i.e. it's not multi-thread safe), but we're looking into it here -> #2
  • It might crash LabVIEW -- we're currently tightening up all the code to ensure it won't crash LabVIEW, buy LabVIEW does crash often when we're working on the code and tweaking things.
  • It might have memory leaks -- we haven't tested that much yet.
  • The names of the VIs (and shared library/functions) are in flux and likely to change.

Key Features

Not all of these are available right now, but will be coming over time (see Roadmap, below).

  • Built on top of a production-quality toml library (toml_edit) that's written in Rust.
  • Provides a simple-to-use API that feels a bit like LabVIEW's config file VIs
  • Provides a low-level API that exposes all the features of TOML that you might need for reading and writing to toml files.
  • Cross-platform support for LabVIEW 32-bit and 64-bit on Windows, Mac, Linux, and NI-Linux Real-time.

Goals of this Project

  • To provide a cross-platform, production-quality, toml file library in LabVIEW
    • To support/preserve comments and other user formatting in the TOML data.
    • To be as easy to use as the LabVIEW Config File VIs for very basic use cases.
    • To expose lower-level capabilities of TOML for more complex/advanced use-cases.
  • To showcase (and learn) how to interoperate between LabVIEW and Rust.
    • We use the toml_edit Rust crate, under the hood, as cross-platform a shared library built using Rust.

Roadmap

  • Cross-platform LabVIEW Support
    • Windows
      • 32-bit LabVIEW - in progress...
      • 64-bit LabIVEW
    • MacOSX - in progress...
      • Intel - in progress...
      • ARM (M1/M2/etc.)
    • Linux Desktop - in progress...
    • NI Linux Real-Time (e.g. cRIO and PXI)
  • TOML data types supported
    • Scalar types
      • String
      • Integer
      • Float
      • Boolean
      • Datetime
  • Aggregate types
    • Tables
    • Subtables
    • Inline Tables
    • Arrays
  • VI Package
    • Installable in the palettes
    • Published on vipm.io

Development System Setup

See our Developer Docs for lots more info.

Rust Installation details: rust-lang.org

Windows Setup

Install Rust

Download and Run rustup-init.exe.

This installer will run in a terminal/console and will prompt you to install MS Visual Studio Community Edition, in order to install the MSVC++ compiler and Windows APIs. This takes up a bit of space (~4GB) and is required for building the DLL on Windows.

More details: rust-lang.org >> other-installation-methods >> windows >> rustup-init.exe

Install "just" (a nice command-line tool we'll use to build)

cargo install just

Install other Dev Packages

just develop

Build DLLs

just build

Note: on Mac and Linux the build process will be a little bit different. You can take a look at the Rust Build CI/CD Action (.github/workflows/rust.yml) to see how it works.

toml-edit-labview's People

Contributors

jamesmc86 avatar jimkring avatar laura-jki avatar tom-mcquillan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.