tversteeg / const-tweaker Goto Github PK
View Code? Open in Web Editor NEW🤪 Tweak constant variables live when running a program
License: GNU Affero General Public License v3.0
🤪 Tweak constant variables live when running a program
License: GNU Affero General Public License v3.0
Hi. That would help in packaging for fedora to have a license file include in the crate.
Constants are only added when they are accessed, this is a problem now because constants that are accessed in a later stage are not displayed in the web GUI.
The comment above this line is inaccurate as to what it is doing, and the usage of transmute here to create a reference with longer lifetime is not sound.
const-tweaker/macro/src/lib.rs
Lines 118 to 120 in fd94d62
The transmute itself does not cause a leak of the value. It is purely a pointer cast, and has no semantic effect on the machine state. What this is doing is the opposite, it is asserting to the compiler that your code has done something to the effect of leaking the value, but that the compiler just can't see. That, however, is wrong.
Also note that creating a statically shared reference to the value is not what you want as that would disallow any mutable reference being created for the whole remaining program lifetime. Creating any mutable reference is UB as long as a shared reference exists, thus it would be allowed for the compiler to optimize out any of the writes done by the web server. More likely though, it will instead deduplicate some reads of the referred-to value which could cause writes to appear to have no effect.
Uriopass on reddit suggested this. Organizing/grouping the widgets per module would make the interface a lot better.
On windows the \ isn't escaped so you end up with oninput="send('src\main.rs::VALUE', Number(this.value), 'f64')"
, which is an invalid path because the backslash escapes the m.
padraig_oh on reddit suggested to create a list of generated constant values that can be copied. I would like to add this to the web GUI as a textbox where you can copy the changed values.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.